Introduce local function declarations in Crankshaft and fix issue 1647.
authorfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 31 Aug 2011 13:26:08 +0000 (13:26 +0000)
committerfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 31 Aug 2011 13:26:08 +0000 (13:26 +0000)
commitffc6c7e56b8fe4405894f1071adb8f3f5a8f0e2b
tree57a7f98022a8adeaafacba85d232afcf61c4a51b
parent829e174a02549302ebf215080965ed62ce6ddaef
Introduce local function declarations in Crankshaft and fix issue 1647.

We have to emit code for declarations later into the body block
(and not into the start block) so that the environment contains
the correct values.

In order to capture the environment effect of the declarations
that generate code (function declarations) I inserted a separate
AST id and a HSimulate after the declarations are visited.

Also fixes handling deopt in named function expressions:
BUG=v8:1647
TEST=test/mjsunit/regress/regress-fundecl.js, test/mjsunit/regress/regress-1647.js
Review URL: http://codereview.chromium.org/7776009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/arm/full-codegen-arm.cc
src/ast.h
src/hydrogen.cc
src/ia32/full-codegen-ia32.cc
src/mips/full-codegen-mips.cc
src/parser.cc
src/x64/full-codegen-x64.cc
test/mjsunit/regress/regress-1647.js [new file with mode: 0644]
test/mjsunit/regress/regress-fundecl.js [new file with mode: 0644]