Chromium Code Reviews

Issue 1064433008: Re-apply formal argument, arrow function parsing refactors (Closed)

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

Description

Re-apply formal argument, arrow function parsing refactors This reapplies the following changesets: https://codereview.chromium.org/1083953002 https://codereview.chromium.org/1061983004 https://codereview.chromium.org/1083623002 https://codereview.chromium.org/1078093002 On top of those changesets, we refactor to avoid building a temporary list of formal parameters, instead adding to the scope directly. LOG=N BUG= R=marja@chromium.org

Patch Set 1 #

Patch Set 2 : Refactor to add formal parameters directly to the scope #

Total comments: 2

Patch Set 3 : git cl format, fix nit #

Patch Set 4 : Avoid DuplicateFinder for the full parser #

Total comments: 1

Patch Set 5 : Fix duplicate detection of "argument" formal #

Patch Set 6 : Remove stale declaration that crept in with last patch #

Total comments: 1
Unified diffs Side-by-side diffs Stats (+529 lines, -371 lines)
M src/messages.js View 1 chunk +5 lines, -1 line 0 comments
M src/parser.h View 5 chunks +23 lines, -8 lines 0 comments
M src/parser.cc View 8 chunks +133 lines, -165 lines 0 comments
M src/preparser.h View 25 chunks +250 lines, -116 lines 1 comment
M src/preparser.cc View 2 chunks +15 lines, -54 lines 0 comments
M src/scopes.h View 1 chunk +1 line, -1 line 0 comments
M src/scopes.cc View 2 chunks +3 lines, -1 line 0 comments
M test/cctest/test-parsing.cc View 2 chunks +77 lines, -14 lines 0 comments
A + test/message/formal-parameters-bad-rest.js View 1 chunk +2 lines, -2 lines 0 comments
A test/message/formal-parameters-bad-rest.out View 1 chunk +4 lines, -0 lines 0 comments
A + test/message/formal-parameters-strict-body.js View 1 chunk +1 line, -3 lines 0 comments
A test/message/formal-parameters-strict-body.out View 1 chunk +4 lines, -0 lines 0 comments
A + test/message/formal-parameters-trailing-comma.js View 1 chunk +1 line, -3 lines 0 comments
A test/message/formal-parameters-trailing-comma.out View 1 chunk +4 lines, -0 lines 0 comments
A + test/message/strict-formal-parameters.js View 1 chunk +2 lines, -3 lines 0 comments
A test/message/strict-formal-parameters.out View 1 chunk +4 lines, -0 lines 0 comments

Messages

Total messages: 16 (2 generated)
wingo
This CL reapplies the parser refactors and eval/arguments arrow function fixes from last week. Instead ...
5 years, 8 months ago (2015-04-20 12:09:01 UTC) #3
marja
lgtm (as in, the original CLs were reviewed, and I skimmed through the changes and ...
5 years, 8 months ago (2015-04-20 12:31:02 UTC) #4
marja
Try jobs started...
5 years, 8 months ago (2015-04-20 13:02:50 UTC) #5
wingo
Tx for review and for poking the perf trybot. Updated patch fixes nit (and a ...
5 years, 8 months ago (2015-04-20 13:26:54 UTC) #6
marja
I think it's cleaner now.
5 years, 8 months ago (2015-04-20 13:29:40 UTC) #7
marja
Hmm, still seems to be a regression though :( (Around 3-4%.)
5 years, 8 months ago (2015-04-20 13:31:11 UTC) #8
wingo
On 2015/04/20 13:31:11, marja wrote: > Hmm, still seems to be a regression though :( ...
5 years, 8 months ago (2015-04-20 13:34:44 UTC) #9
wingo
On 2015/04/20 13:34:44, wingo wrote: > On 2015/04/20 13:31:11, marja wrote: > > Hmm, still ...
5 years, 8 months ago (2015-04-21 07:47:43 UTC) #10
marja
https://codereview.chromium.org/1064433008/diff/100001/src/parser.h File src/parser.h (right): https://codereview.chromium.org/1064433008/diff/100001/src/parser.h#newcode751 src/parser.h:751: Variable* var = scope->DeclareParameter(name, VAR, is_rest); As discussed offline: ...
5 years, 8 months ago (2015-04-21 08:01:50 UTC) #11
wingo
On 2015/04/21 08:01:50, marja wrote: > https://codereview.chromium.org/1064433008/diff/100001/src/parser.h > File src/parser.h (right): > > https://codereview.chromium.org/1064433008/diff/100001/src/parser.h#newcode751 > ...
5 years, 8 months ago (2015-04-21 08:22:32 UTC) #12
wingo
New patch fixes duplicate detection of "arguments". Note that I had to re-introduce the O(n^2) ...
5 years, 8 months ago (2015-04-21 09:05:00 UTC) #13
marja
Could you also add tests which expose the "arguments" bug?
5 years, 8 months ago (2015-04-21 09:12:16 UTC) #14
wingo
https://codereview.chromium.org/1064433008/diff/140001/src/preparser.h File src/preparser.h (right): https://codereview.chromium.org/1064433008/diff/140001/src/preparser.h#newcode1431 src/preparser.h:1431: V8_INLINE bool IsDeclared(DuplicateFinder* duplicate_finder, This decl is vestigial, will ...
5 years, 8 months ago (2015-04-21 09:32:25 UTC) #15
wingo
5 years, 8 months ago (2015-04-21 10:48:07 UTC) #16
Closing in favor of https://codereview.chromium.org/1077153005/ and predecessor,
which split this CL into two.

Powered by Google App Engine