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

Issue 11438042: Allow lazy compilation (and thus optimisation) of functions inside eval. (Closed)

Created:
8 years ago by rossberg
Modified:
8 years ago
Reviewers:
Michael Starzinger
CC:
v8-dev
Visibility:
Public.

Description

Allow lazy compilation (and thus optimisation) of functions inside eval. For strict-mode eval, this requires _disabling_ lazy parsing of inner functions, because we need to collect their free variables to do allocation for the eval scope properly. R=mstarzinger@chromium.org BUG=v8:2315 Committed: https://code.google.com/p/v8/source/detail?r=13161

Patch Set 1 #

Patch Set 2 : Forgot regression test #

Patch Set 3 : Fixed copyright date #

Total comments: 6

Patch Set 4 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -32 lines) Patch
M src/contexts.h View 1 chunk +5 lines, -1 line 0 comments Download
M src/lithium.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/parser.cc View 1 2 3 3 chunks +9 lines, -5 lines 0 comments Download
M src/preparser.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/scopes.cc View 1 chunk +3 lines, -8 lines 0 comments Download
A + test/mjsunit/regress/regress-2315.js View 1 2 3 1 chunk +6 lines, -7 lines 0 comments Download
M test/mjsunit/regress/regress-492.js View 1 2 3 2 chunks +39 lines, -1 line 0 comments Download
M test/mjsunit/regress/regress-crbug-135066.js View 1 2 3 1 chunk +8 lines, -6 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
rossberg
8 years ago (2012-12-06 10:45:14 UTC) #1
Michael Starzinger
LGTM (with micro-nits). I also verified that it doesn't tank performance on Octane's code load ...
8 years ago (2012-12-07 09:50:17 UTC) #2
rossberg
8 years ago (2012-12-07 10:23:33 UTC) #3
https://codereview.chromium.org/11438042/diff/8001/src/parser.cc
File src/parser.cc (right):

https://codereview.chromium.org/11438042/diff/8001/src/parser.cc#newcode638
src/parser.cc:638: mode = PARSE_EAGERLY;
On 2012/12/07 09:50:17, Michael Starzinger wrote:
> Curly braces around body.

Done.

https://codereview.chromium.org/11438042/diff/8001/test/mjsunit/regress/regre...
File test/mjsunit/regress/regress-2315.js (right):

https://codereview.chromium.org/11438042/diff/8001/test/mjsunit/regress/regre...
test/mjsunit/regress/regress-2315.js:34: for (var i = 0; i < 10; ++i) foo();
On 2012/12/07 09:50:17, Michael Starzinger wrote:
> Is there a particular reason we need two separate loops here?

Now using %OptimizeFunctionOnNextCall instead.

https://codereview.chromium.org/11438042/diff/8001/test/mjsunit/regress/regre...
File test/mjsunit/regress/regress-492.js (right):

https://codereview.chromium.org/11438042/diff/8001/test/mjsunit/regress/regre...
test/mjsunit/regress/regress-492.js:90: for (var i = 0; i < 10; ++i) foo();
On 2012/12/07 09:50:17, Michael Starzinger wrote:
> Is there a particular reason we need two loops here?

Removed.

Powered by Google App Engine
This is Rietveld 408576698