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

Issue 1102523003: Implement a 'trial parse' step, that will abort pre-parsing excessively (Closed)

Created:
5 years, 8 months ago by vogelheim
Modified:
5 years, 7 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Implement a 'trial parse' step, that will abort pre-parsing excessively long and trivial functions, so that they can be eagerly compiled after all. This essentially allows the parser to renege on its earlier decision to lazy-parse, if additional information suggests it was a bad decision. BUG=chromium:470930 LOG=Y Committed: https://crrev.com/be9570027f34f8dbf60a7b530fe2499ff52c1a3d Cr-Commit-Position: refs/heads/master@{#28252}

Patch Set 1 #

Total comments: 14

Patch Set 2 : ResetToBookmark cannot fail + some simplification. #

Patch Set 3 : The Great Rebase Adventure. #

Total comments: 4

Patch Set 4 : . #

Patch Set 5 : Fix assertion. #

Patch Set 6 : Fix int conversion on funky platforms. #

Patch Set 7 : Fix int conversion on funky platforms, again, and maybe for real this time. #

Patch Set 8 : Improve comments + naming. (Marja's feedback.) #

Total comments: 8

Patch Set 9 : Address feedback. #

Patch Set 10 : Use a seperate 'hint' bit for "to be executed once" code aging. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+292 lines, -35 lines) Patch
M src/ast.h View 1 2 3 4 5 6 7 8 9 4 chunks +15 lines, -1 line 0 comments Download
M src/compiler.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M src/parser.h View 1 2 3 4 5 6 7 3 chunks +14 lines, -9 lines 0 comments Download
M src/parser.cc View 1 2 3 4 5 6 7 8 9 7 chunks +36 lines, -7 lines 0 comments Download
M src/preparser.h View 1 2 3 4 5 6 7 8 3 chunks +9 lines, -4 lines 0 comments Download
M src/preparser.cc View 1 2 3 4 5 6 7 8 5 chunks +34 lines, -7 lines 0 comments Download
M src/scanner.h View 1 2 3 4 5 6 7 8 9 5 chunks +72 lines, -0 lines 0 comments Download
M src/scanner.cc View 1 2 3 4 5 6 7 8 9 2 chunks +62 lines, -1 line 0 comments Download
M src/scanner-character-streams.h View 1 2 3 4 5 6 7 8 3 chunks +14 lines, -0 lines 0 comments Download
M src/scanner-character-streams.cc View 1 2 3 4 5 6 7 8 3 chunks +32 lines, -6 lines 0 comments Download

Messages

Total messages: 23 (4 generated)
vogelheim
I'm not quite done, but this should be close to its final form. I'd be ...
5 years, 8 months ago (2015-04-22 15:07:19 UTC) #2
marja
Generally LG, but I think this can be simpler - either that or I'm missing ...
5 years, 8 months ago (2015-04-22 16:40:56 UTC) #3
vogelheim
Thanks for the quick review. Not a full answer here, just a quick reply on ...
5 years, 8 months ago (2015-04-22 17:08:35 UTC) #4
marja
I'll have a closer look at your comments tomorrow, just two quick replies. Re: streaming; ...
5 years, 8 months ago (2015-04-22 17:51:00 UTC) #5
marja
... and when we reset we'd basically ask the stream to fill the buffer fresh ...
5 years, 8 months ago (2015-04-22 17:52:34 UTC) #6
vogelheim
[from more offline discussion / debugging:] The scanner/stream state at the point of bookmarking looks ...
5 years, 8 months ago (2015-04-23 13:30:15 UTC) #7
marja
To continue: as discussed offline, IMO it's OK to store the current and next token ...
5 years, 8 months ago (2015-04-23 13:52:06 UTC) #8
vogelheim
Addressed: - ResetToBookmark cannot fail. - Some simplification (... I hope ...) around setting the ...
5 years, 8 months ago (2015-04-23 15:08:29 UTC) #9
vogelheim
PTAL. I changed things quite a bit...
5 years, 8 months ago (2015-04-24 11:50:53 UTC) #10
marja
lgtm, much clearer now! Pls run perf tryjobs before landing. https://codereview.chromium.org/1102523003/diff/40001/src/preparser.cc File src/preparser.cc (right): https://codereview.chromium.org/1102523003/diff/40001/src/preparser.cc#newcode211 ...
5 years, 8 months ago (2015-04-24 12:08:13 UTC) #11
vogelheim
On 2015/04/24 12:08:13, marja (ooo - no reviews) wrote: > lgtm, much clearer now! > ...
5 years, 7 months ago (2015-04-30 13:02:57 UTC) #12
jochen (gone - plz use gerrit)
lgtm with a bunch of nits https://codereview.chromium.org/1102523003/diff/140001/src/preparser.cc File src/preparser.cc (right): https://codereview.chromium.org/1102523003/diff/140001/src/preparser.cc#newcode261 src/preparser.cc:261: if (maybe_reset && ...
5 years, 7 months ago (2015-04-30 13:20:18 UTC) #13
vogelheim
https://codereview.chromium.org/1102523003/diff/140001/src/preparser.cc File src/preparser.cc (right): https://codereview.chromium.org/1102523003/diff/140001/src/preparser.cc#newcode261 src/preparser.cc:261: if (maybe_reset && (!starts_with_identifier || ++count_statements > 200)) { ...
5 years, 7 months ago (2015-04-30 15:35:06 UTC) #14
vogelheim
PTAL. The previous implementation would inadvertently 'set_should_eager_compile()' a lot more functions than merely the discovered ...
5 years, 7 months ago (2015-05-05 16:32:20 UTC) #16
vogelheim
PTAL. The previous implementation would inadvertently 'set_should_eager_compile()' a lot more functions than merely the discovered ...
5 years, 7 months ago (2015-05-05 16:32:24 UTC) #17
jochen (gone - plz use gerrit)
Still lgtm
5 years, 7 months ago (2015-05-05 18:17:59 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1102523003/180001
5 years, 7 months ago (2015-05-06 10:19:39 UTC) #21
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 7 months ago (2015-05-06 10:21:25 UTC) #22
commit-bot: I haz the power
5 years, 7 months ago (2015-05-06 10:21:40 UTC) #23
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/be9570027f34f8dbf60a7b530fe2499ff52c1a3d
Cr-Commit-Position: refs/heads/master@{#28252}

Powered by Google App Engine
This is Rietveld 408576698