Enable lazy compilation for non-trivial outer contexts.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 12 Jun 2012 15:57:50 +0000 (15:57 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 12 Jun 2012 15:57:50 +0000 (15:57 +0000)
commit19ece2bec83f51f0a194f986078516a516653451
tree46b1ba0ea0f9c40f6b1f1588955b06e0d26f3de8
parentfa072704af64b922c11e068510e8b113ccab7a60
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.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
15 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/runtime.cc
src/scopes.cc
src/scopes.h
test/cctest/test-debug.cc
test/cctest/test-heap.cc
test/mjsunit/debug-script-breakpoints-nested.js [new file with mode: 0644]