LGTM, with some suggestions.
http://codereview.chromium.org/67168/diff/1/2 File src/func-name-inferrer.cc (right): http://codereview.chromium.org/67168/diff/1/2#newcode68 Line 68: return; MaybeInferFunctionName is only called from InferAndLeave, which is inlined. It might make sense to move the check and early bailout into InferAndLeave. http://codereview.chromium.org/67168/diff/1/2#newcode74 Line 74: funcs_to_infer_.Clear(); Clearing the list deletes the backing buffer, which then gets reallocated on the first subsequent insertion and resized on the second. You might consider changing the loop to 'while (!funcs_to_infer_.is_empty()) ...' and use List::RemoveLast and FuncNameInferrer::set_inferred_name in the body. http://codereview.chromium.org/67168/diff/1/3 File src/func-name-inferrer.h (right): http://codereview.chromium.org/67168/diff/1/3#newcode60 Line 60: void Leave() { I don't think Leave is every called explicitly (only by InferAndLeave?), so you might just inline it there and remove it from the API. http://codereview.chromium.org/67168/diff/1/4 File src/rewriter.cc (right): http://codereview.chromium.org/67168/diff/1/4#newcode285 Line 285: scoped_fni.Enter(); There is also a call to ScopedFuncNameInferrer::Enter in AstOptimizer::VisitCallRuntime that is currently guarded by checking that the expression is a function literal. Do you want to allow other expression types there as well? http://codereview.chromium.org/67168 --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
