Add name inference for anonymous functions to facilitate debugging and profiling...
authormikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 14 Apr 2009 00:51:59 +0000 (00:51 +0000)
committermikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 14 Apr 2009 00:51:59 +0000 (00:51 +0000)
commit3c2a7bdf21aaed61f65a018a1841660dcf0b3752
treebd2579e8b6fde22685a560bafd97940f92be41b8
parent69bdfe255bf31e51fa898c60e28f70a2ce717e15
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.

Review URL: http://codereview.chromium.org/62146

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
22 files changed:
src/SConscript
src/ast.h
src/codegen-arm.h
src/codegen-ia32.h
src/codegen.cc
src/compiler.cc
src/func-name-inferrer.cc [new file with mode: 0644]
src/func-name-inferrer.h [new file with mode: 0644]
src/heap.cc
src/objects-inl.h
src/objects.cc
src/objects.h
src/prettyprinter.cc
src/rewriter.cc
src/runtime.cc
src/runtime.h
test/cctest/SConscript
test/cctest/test-func-name-inference.cc [new file with mode: 0644]
tools/v8.xcodeproj/project.pbxproj
tools/visual_studio/v8_base.vcproj
tools/visual_studio/v8_base_arm.vcproj
tools/visual_studio/v8_cctest.vcproj