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

Issue 1306583002: Fix parsing of arrow function formal parameters (Closed)

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

Description

Fix parsing of arrow function formal parameters Not all parenthesized AssignmentExpressions whose components are valid binding patterns are valid arrow function formal parameters. In particular (a,b,c)() is not valid, and in general the existing code wasn't catching the tail productions of ConditionalExpression, BinaryExpression, PostfixExpression, LeftHandSideExpression, and MemberExpression. Thanks to Adrian Perez for the test case. BUG=v8:4211 LOG=Y R=rossberg@chromium.org Committed: https://crrev.com/bb43d6c0324793380c95b36664fdf184e88fbdbd Cr-Commit-Position: refs/heads/master@{#30286}

Patch Set 1 #

Patch Set 2 : Add tests #

Patch Set 3 : Add ConditionalExpression tests. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -0 lines) Patch
M src/preparser.h View 1 14 chunks +14 lines, -0 lines 2 comments Download
M test/cctest/test-parsing.cc View 1 2 1 chunk +61 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (6 generated)
wingo
PTAL. This one is pretty serious and probably should be uplifted to beta (45) before ...
5 years, 4 months ago (2015-08-20 13:38:41 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1306583002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1306583002/20001
5 years, 4 months ago (2015-08-20 13:39:06 UTC) #3
wingo
On 2015/08/20 13:39:06, commit-bot: I haz the power wrote: > Dry run: CQ is trying ...
5 years, 4 months ago (2015-08-20 13:57:09 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1306583002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1306583002/60001
5 years, 4 months ago (2015-08-20 14:05:16 UTC) #7
caitp (gmail)
On 2015/08/20 14:05:16, commit-bot: I haz the power wrote: > Dry run: CQ is trying ...
5 years, 4 months ago (2015-08-20 15:13:39 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-08-20 15:20:01 UTC) #10
caitp (gmail)
https://codereview.chromium.org/1306583002/diff/60001/src/preparser.h File src/preparser.h (right): https://codereview.chromium.org/1306583002/diff/60001/src/preparser.h#newcode3604 src/preparser.h:3604: ArrowFormalParametersUnexpectedToken(classifier); probably want to make sure destructuring still works ...
5 years, 4 months ago (2015-08-20 15:22:57 UTC) #12
wingo
https://codereview.chromium.org/1306583002/diff/60001/src/preparser.h File src/preparser.h (right): https://codereview.chromium.org/1306583002/diff/60001/src/preparser.h#newcode3604 src/preparser.h:3604: ArrowFormalParametersUnexpectedToken(classifier); On 2015/08/20 15:22:57, caitp wrote: > probably want ...
5 years, 4 months ago (2015-08-20 15:47:57 UTC) #13
rossberg
lgtm
5 years, 4 months ago (2015-08-20 16:04:43 UTC) #14
caitp (gmail)
On 2015/08/20 15:47:57, wingo wrote: > https://codereview.chromium.org/1306583002/diff/60001/src/preparser.h > File src/preparser.h (right): > > https://codereview.chromium.org/1306583002/diff/60001/src/preparser.h#newcode3604 > ...
5 years, 4 months ago (2015-08-20 16:21:04 UTC) #15
wingo
On 2015/08/20 16:21:04, caitp wrote: > Since default parameters are implemented,a similar test case might ...
5 years, 4 months ago (2015-08-21 09:27:29 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1306583002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1306583002/60001
5 years, 4 months ago (2015-08-21 09:27:39 UTC) #18
commit-bot: I haz the power
Committed patchset #3 (id:60001)
5 years, 4 months ago (2015-08-21 09:28:58 UTC) #19
commit-bot: I haz the power
5 years, 4 months ago (2015-08-21 09:29:16 UTC) #20
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/bb43d6c0324793380c95b36664fdf184e88fbdbd
Cr-Commit-Position: refs/heads/master@{#30286}

Powered by Google App Engine
This is Rietveld 408576698