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

Issue 10543141: 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. This relands r11782, r11783, r11790 and a minor fix. R=ulan@chromium.org TEST=mjsunit/debug-script-breakpoints-nested Committed: https://code.google.com/p/v8/source/detail?r=11866

Patch Set 1 #

Patch Set 2 : Added regression test. #

Patch Set 3 : Fixed compilation trigger for closures. #

Total comments: 4

Patch Set 4 : Addressed comments by Ulan Degenbaev. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -227 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 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 17 chunks +87 lines, -38 lines 0 comments Download
M src/full-codegen.cc View 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/parser.cc View 2 chunks +0 lines, -3 lines 0 comments Download
M src/runtime.cc View 1 2 3 11 chunks +99 lines, -90 lines 0 comments Download
M src/scopes.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/scopes.cc View 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-closure.js View 1 1 chunk +25 lines, -22 lines 0 comments Download
A + test/mjsunit/debug-script-breakpoints-nested.js View 3 chunks +34 lines, -41 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Michael Starzinger
Patch Set 1: That's just a reland of previously reviewed CLs. Patch Set 2: That's ...
8 years, 6 months ago (2012-06-13 17:21:22 UTC) #1
ulan
LGTM. I reviewed diffs between patch sets 2/3 and 1. Rubber-stamping patch set 1. https://chromiumcodereview.appspot.com/10543141/diff/8001/src/runtime.cc ...
8 years, 6 months ago (2012-06-14 08:37:24 UTC) #2
Michael Starzinger
8 years, 6 months ago (2012-06-19 13:08:13 UTC) #3
Comments addressed. Landing ...

https://chromiumcodereview.appspot.com/10543141/diff/8001/src/runtime.cc
File src/runtime.cc (right):

https://chromiumcodereview.appspot.com/10543141/diff/8001/src/runtime.cc#newc...
src/runtime.cc:11718: continue;
On 2012/06/14 08:37:24, ulan wrote:
> Instead of multiple "continue" statements, I think it would be more readable
to
> make a boolean variable with descriptive name (e.g.
> "found_lazily_compilable_candidate") and then do a single check
> 
> if (!found...) continue.

Done. Named the flag "found_next_candidate", because it also considers functions
that are already compiled.

https://chromiumcodereview.appspot.com/10543141/diff/8001/src/runtime.cc#newc...
src/runtime.cc:11774: if (target_function.is_null()) {
On 2012/06/14 08:37:24, ulan wrote:
> Maybe add ASSERT(target->allows_lazy_compilation_without_context()) ?

That assert is already in SharedFunctionInfo::CompileLazy.

Powered by Google App Engine
This is Rietveld 408576698