Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Issue 10538102: Enable lazy compilation for non-trivial outer contexts. (Closed)

Created:
8 years, 6 months ago by Michael Starzinger
Modified:
8 years, 6 months ago
Reviewers:
ulan
CC:
v8-dev
Visibility:
Public.

Description

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 Committed: https://code.google.com/p/v8/source/detail?r=11782

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed comments by Ulan Degenbaev. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+287 lines, -127 lines) Patch
M src/ast.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/ast.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler.cc View 1 7 chunks +15 lines, -7 lines 0 comments Download
M src/debug.h View 2 chunks +10 lines, -4 lines 0 comments Download
M src/debug.cc View 1 17 chunks +87 lines, -38 lines 0 comments Download
M src/full-codegen.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/objects.h View 4 chunks +12 lines, -4 lines 0 comments Download
M src/objects.cc View 4 chunks +8 lines, -6 lines 0 comments Download
M src/objects-inl.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/runtime.cc View 11 chunks +51 lines, -56 lines 0 comments Download
M src/scopes.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/scopes.cc View 1 2 chunks +6 lines, -6 lines 0 comments Download
M test/cctest/test-debug.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M test/cctest/test-heap.cc View 1 chunk +1 line, -0 lines 0 comments Download
A test/mjsunit/debug-script-breakpoints-nested.js View 1 1 chunk +82 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Michael Starzinger
8 years, 6 months ago (2012-06-12 09:54:20 UTC) #1
ulan
LGTM https://chromiumcodereview.appspot.com/10538102/diff/1/src/debug.cc File src/debug.cc (right): https://chromiumcodereview.appspot.com/10538102/diff/1/src/debug.cc#newcode2122 src/debug.cc:2122: has_break_points_ = true; As discussed offline, we can ...
8 years, 6 months ago (2012-06-12 15:07:23 UTC) #2
Michael Starzinger
8 years, 6 months ago (2012-06-12 15:54:05 UTC) #3
https://chromiumcodereview.appspot.com/10538102/diff/1/src/debug.cc
File src/debug.cc (right):

https://chromiumcodereview.appspot.com/10538102/diff/1/src/debug.cc#newcode2122
src/debug.cc:2122: has_break_points_ = true;
On 2012/06/12 15:07:23, ulan wrote:
> As discussed offline, we can turn this to ASSERT(has_break_points);

Done.

https://chromiumcodereview.appspot.com/10538102/diff/1/src/scopes.cc
File src/scopes.cc (right):

https://chromiumcodereview.appspot.com/10538102/diff/1/src/scopes.cc#newcode675
src/scopes.cc:675: bool Scope::AllowsLazyRecompilation() const {
On 2012/06/12 15:07:23, ulan wrote:
> Now that it is the same as AllowsLazyCompilation, we can probably get rid of
it.

Done.

https://chromiumcodereview.appspot.com/10538102/diff/1/test/mjsunit/debug-scr...
File test/mjsunit/debug-script-breakpoints-nested.js (right):

https://chromiumcodereview.appspot.com/10538102/diff/1/test/mjsunit/debug-scr...
test/mjsunit/debug-script-breakpoints-nested.js:49: "    function b() {\n" +
On 2012/06/12 15:07:23, ulan wrote:
> Consider adding more local variables.

Done.

Powered by Google App Engine
This is Rietveld 408576698