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

Issue 2322243002: Preparse inner functions. (Closed)

Created:
4 years, 3 months ago by marja
Modified:
4 years ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Preparse inner functions. This is an overly pessimistic approach where PreParser only keeps track of unresolved variables, but doesn't declare anything. This will result in context-allocating variables in the outer function unnecessarily, if the variable names clash with variable names used by the inner function (even if the variables are not the same). However, we have been unable to prove that this approach wouldn't be good enough for the practical purposes. Committed: https://crrev.com/e1341ca8fa486bb2c9e4236672a64ec7756a164d Cr-Commit-Position: refs/heads/master@{#39469}

Patch Set 1 #

Patch Set 2 : wip - some tests now pass. #

Patch Set 3 : mjsunit passes but this overapproximates free vars #

Patch Set 4 : rebased #

Patch Set 5 : cleanup (still just free variables - no declaring) #

Patch Set 6 : fix arm compile #

Patch Set 7 : ugly fixes #

Patch Set 8 : cleanup #

Patch Set 9 : rebased #

Patch Set 10 : more cleanup #

Patch Set 11 : ditto #

Patch Set 12 : fixes #

Patch Set 13 : flag + more fixes #

Patch Set 14 : more fixes #

Patch Set 15 : fixing harder #

Patch Set 16 : cleanup #

Patch Set 17 : turning the flag off - for try runs #

Patch Set 18 : flag on again #

Patch Set 19 : moar fixes #

Patch Set 20 : turning the flag off - for try runs #

Patch Set 21 : flag on again #

Total comments: 12

Patch Set 22 : code review (vogelheim, adamk) #

Patch Set 23 : rebased #

Patch Set 24 : fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+183 lines, -88 lines) Patch
M src/ast/scopes.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -2 lines 0 comments Download
M src/ast/scopes.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +6 lines, -4 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M src/parsing/parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +4 lines, -2 lines 0 comments Download
M src/parsing/parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 15 chunks +101 lines, -47 lines 0 comments Download
M src/parsing/parser-base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +7 lines, -4 lines 0 comments Download
M src/parsing/preparser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 6 chunks +15 lines, -13 lines 0 comments Download
M src/parsing/preparser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +46 lines, -16 lines 0 comments Download

Messages

Total messages: 44 (32 generated)
marja
ptal Note: I didn't yet refactor parsing modes but added TODOs instead. This is because ...
4 years, 3 months ago (2016-09-15 11:37:30 UTC) #21
marja
+nikolaos too, in case you'd like to have a look too
4 years, 3 months ago (2016-09-15 11:38:42 UTC) #23
marja
And some roadmap into the patch sets: - Try jobs are in patch set 19 ...
4 years, 3 months ago (2016-09-15 11:40:30 UTC) #26
adamk
lgtm % a nit and a question https://codereview.chromium.org/2322243002/diff/400001/src/parsing/preparser.cc File src/parsing/preparser.cc (right): https://codereview.chromium.org/2322243002/diff/400001/src/parsing/preparser.cc#newcode97 src/parsing/preparser.cc:97: // scope_state_. ...
4 years, 3 months ago (2016-09-15 18:20:09 UTC) #27
nednguyen
On 2016/09/15 18:20:09, adamk wrote: > lgtm % a nit and a question > > ...
4 years, 3 months ago (2016-09-15 19:58:10 UTC) #29
vogelheim
lgtm w/ some nitpicks... I'm a bit confused about the parenthesized function thing; please have ...
4 years, 3 months ago (2016-09-16 08:13:05 UTC) #30
marja
thanks for review! https://codereview.chromium.org/2322243002/diff/400001/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/2322243002/diff/400001/src/parsing/parser.cc#newcode2981 src/parsing/parser.cc:2981: scope()->AllowsLazyParsingWithoutUnresolvedVariables(); On 2016/09/16 08:13:04, vogelheim wrote: ...
4 years, 3 months ago (2016-09-16 08:38:16 UTC) #31
nickie
It looks OK but I'm not to be trusted on this, as I don't think ...
4 years, 3 months ago (2016-09-16 09:47:49 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2322243002/440001
4 years, 3 months ago (2016-09-16 09:59:39 UTC) #39
commit-bot: I haz the power
Committed patchset #23 (id:440001)
4 years, 3 months ago (2016-09-16 10:01:53 UTC) #41
commit-bot: I haz the power
Patchset 23 (id:??) landed as https://crrev.com/e1341ca8fa486bb2c9e4236672a64ec7756a164d Cr-Commit-Position: refs/heads/master@{#39469}
4 years, 3 months ago (2016-09-16 10:02:43 UTC) #43
marja
4 years, 3 months ago (2016-09-16 10:43:08 UTC) #44
Message was sent while issue was closed.
A revert of this CL (patchset #23 id:440001) has been created in
https://codereview.chromium.org/2349473004/ by marja@chromium.org.

The reason for reverting is: This approach is not good - breaks when we
recompile..

Powered by Google App Engine
This is Rietveld 408576698