Reviewers: Søren Gjesse, Kasper Lund,

Message:
This is an implementation of name inference for anonymous functions
which I discussed previously.

I wired my AST pass with AstOptimizer's, as Ivan suggested that I better
not introduce another AST pass. I looked over all AstVisitors we have
and didn't found a more natural place. But this forced me to make
AstOptimizer running for all functions, not only for those which have a
local context.

I will update XCode project files before uploading. I just don't have a
Mac at hand.

Description:
Add name inference for anonymous functions to facilitate debugging and
profiling of JS code.

Currently function name inference is wired with AST optimization pass to
avoid introducing another pass over AST. A better solution would be to
rewrite AST visitors so they can be naturally combined together in a
single pass, as their current implementation doesn't allow it.

For examples of cases where function names can be inferred, see the
tests file.

Please review this at http://codereview.chromium.org/62146

Affected files:
   M src/SConscript
   M src/ast.h
   M src/codegen-arm.h
   M src/codegen-ia32.h
   M src/codegen.cc
   M src/compiler.cc
   A src/func-name-inferrer.h
   A src/func-name-inferrer.cc
   M src/heap.cc
   M src/objects-inl.h
   M src/objects.h
   M src/objects.cc
   M src/prettyprinter.cc
   M src/rewriter.cc
   M src/runtime.h
   M src/runtime.cc
   M test/cctest/SConscript
   A test/cctest/test-func-name-inference.cc
   M tools/visual_studio/v8_base.vcproj
   M tools/visual_studio/v8_cctest.vcproj



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to