Enable lazy compilation for non-trivial outer contexts.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 19 Jun 2012 14:29:48 +0000 (14:29 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 19 Jun 2012 14:29:48 +0000 (14:29 +0000)
commita760b82cab3f95a36ebc73b5fc865357095e3739
treea71a607b6d56268f772added3e4e1a0881125a8c
parenta40f7b516e431166746aec9a223169a7374f4880
Enable lazy compilation for non-trivial outer contexts.

This changes the compiler to be more aggressive about lazy compilation
of closures with non-trivial outer context. Compilation can only be
triggered with a valid outer context now. One exception is the debugger,
which can request compilation of arbitrary shared code, but it ensures
to trigger compilation only at points where no context is needed.

This relands r11782, r11783, r11790 and a minor fix.

R=ulan@chromium.org
TEST=mjsunit/debug-script-breakpoints-nested

Review URL: https://chromiumcodereview.appspot.com/10543141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
17 files changed:
src/ast.cc
src/ast.h
src/compiler.cc
src/debug.cc
src/debug.h
src/full-codegen.cc
src/objects-inl.h
src/objects.cc
src/objects.h
src/parser.cc
src/runtime.cc
src/scopes.cc
src/scopes.h
test/cctest/test-debug.cc
test/cctest/test-heap.cc
test/mjsunit/debug-script-breakpoints-closure.js [new file with mode: 0644]
test/mjsunit/debug-script-breakpoints-nested.js [new file with mode: 0644]