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

Issue 8662037: Don't preparse large files to find boundaries of lazy functions. (Closed)

Created:
9 years, 1 month ago by Lasse Reichstein
Modified:
9 years ago
Reviewers:
Yang, Jakob Kummerow
CC:
v8-dev
Visibility:
Public.

Description

Don't preparse large files to find boundaries of lazy functions. Instead use the preparser inline to parse only the lazy function bodies. This is still disabled for small files. More measurements are needed to determine if lazy-compiling small sources is worth it. Committed: http://code.google.com/p/v8/source/detail?r=10066

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressed review comment: updated comment. #

Patch Set 3 : Updated to match tip of bleeding edge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+334 lines, -116 lines) Patch
M src/compiler.cc View 1 2 5 chunks +11 lines, -22 lines 0 comments Download
M src/hydrogen.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/liveedit.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/parser.h View 1 2 6 chunks +20 lines, -6 lines 0 comments Download
M src/parser.cc View 1 2 8 chunks +206 lines, -42 lines 0 comments Download
M src/preparser.h View 1 2 4 chunks +30 lines, -18 lines 0 comments Download
M src/preparser.cc View 1 2 4 chunks +49 lines, -18 lines 0 comments Download
M src/scanner.h View 1 2 1 chunk +12 lines, -4 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/regress/regress-1110.js View 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Lasse Reichstein
9 years, 1 month ago (2011-11-24 08:55:59 UTC) #1
Lasse Reichstein
PTAL
9 years, 1 month ago (2011-11-24 11:47:22 UTC) #2
Lasse Reichstein
Adding Yang since Jakob is pretty busy right now.
9 years, 1 month ago (2011-11-24 11:51:08 UTC) #3
Yang
LGTM with comment. http://codereview.chromium.org/8662037/diff/1/src/parser.cc File src/parser.cc (right): http://codereview.chromium.org/8662037/diff/1/src/parser.cc#newcode4106 src/parser.cc:4106: // compile if we do not ...
9 years, 1 month ago (2011-11-24 14:28:41 UTC) #4
Lasse Reichstein
9 years ago (2011-11-24 21:16:47 UTC) #5
http://codereview.chromium.org/8662037/diff/1/src/parser.cc
File src/parser.cc (right):

http://codereview.chromium.org/8662037/diff/1/src/parser.cc#newcode4106
src/parser.cc:4106: // compile if we do not have preparser data for the
function.
That was actually correct before - if the script was large enough, we created
pre-parser data, so at this point we would have it.

This CL changes that. We now don't create preparse data ahead of time, but
instead call the preparser only on the body of the function - if we are allowed
to compile lazily (some calls to Parse expects a full AST afterwards).

So the comment is outdated now. Will change.

Powered by Google App Engine
This is Rietveld 408576698