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

Issue 1178523002: Support rest parameters in arrow functions (Closed)

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

Description

Support rest parameters in arrow functions R=dslomov@chromium.org, rossberg@chromium.org LOG=Y BUG=v8:2700 Committed: https://crrev.com/e7a62c24855ac2bb34271e997ffae5ffcf57862d Cr-Commit-Position: refs/heads/master@{#28908}

Patch Set 1 #

Patch Set 2 : Remove bogus DCHECK; function could be of simple x=>y form, thus not valid ArrowFormalParameters #

Total comments: 4

Patch Set 3 : Use Spread expression to mark rest parameters rather than ExpressionClassifier bit #

Patch Set 4 : Add test for duplicate formal param detection #

Total comments: 3

Patch Set 5 : Context-dependent error reporting #

Patch Set 6 : Fix error locations for param-after-rest errors #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+257 lines, -63 lines) Patch
M src/parser.h View 1 2 1 chunk +1 line, -5 lines 0 comments Download
M src/parser.cc View 1 2 4 chunks +23 lines, -18 lines 0 comments Download
M src/preparser.h View 1 2 3 4 5 7 chunks +42 lines, -6 lines 0 comments Download
A + test/message/arrow-bare-rest-param.js View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
A test/message/arrow-bare-rest-param.out View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A + test/message/arrow-param-after-rest.js View 1 2 3 4 1 chunk +2 lines, -4 lines 0 comments Download
A + test/message/arrow-param-after-rest.out View 1 2 3 4 1 chunk +2 lines, -2 lines 1 comment Download
A + test/message/arrow-param-after-rest-2.js View 1 2 3 4 1 chunk +2 lines, -4 lines 0 comments Download
A + test/message/arrow-param-after-rest-2.out View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
A + test/message/arrow-two-rest-params.js View 1 2 3 4 1 chunk +2 lines, -4 lines 0 comments Download
A + test/message/arrow-two-rest-params.out View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
A + test/message/invalid-spread.js View 1 2 3 4 1 chunk +2 lines, -4 lines 0 comments Download
A test/message/invalid-spread.out View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A + test/message/invalid-spread-2.js View 1 2 3 4 1 chunk +2 lines, -4 lines 0 comments Download
A test/message/invalid-spread-2.out View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A test/mjsunit/harmony/arrow-rest-params.js View 1 chunk +142 lines, -0 lines 0 comments Download
A + test/mjsunit/harmony/regress/regress-arrow-duplicate-params.js View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M test/mjsunit/harmony/rest-params-lazy-parsing.js View 1 2 2 chunks +17 lines, -1 line 0 comments Download

Messages

Total messages: 26 (6 generated)
wingo
5 years, 6 months ago (2015-06-10 10:05:02 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/1178523002/20001
5 years, 6 months ago (2015-06-10 10:18:49 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-10 10:43:22 UTC) #5
Dmitry Lomov (no reviews)
https://codereview.chromium.org/1178523002/diff/20001/src/expression-classifier.h File src/expression-classifier.h (right): https://codereview.chromium.org/1178523002/diff/20001/src/expression-classifier.h#newcode40 src/expression-classifier.h:40: ArrowFormalParametersWithRestProduction = 1 << 7, I am not too ...
5 years, 6 months ago (2015-06-10 11:04:41 UTC) #6
wingo
Fixed to use Spread expression to mark rest parameter presence; ptal :) https://codereview.chromium.org/1178523002/diff/20001/src/expression-classifier.h File src/expression-classifier.h ...
5 years, 6 months ago (2015-06-10 13:21:10 UTC) #7
wingo
On 2015/06/10 13:21:10, wingo wrote: > On 2015/06/10 11:04:41, Dmitry S. Lomov wrote: > https://codereview.chromium.org/1178523002/diff/20001/src/parser.cc#newcode3811 ...
5 years, 6 months ago (2015-06-10 13:28:22 UTC) #8
rossberg
https://codereview.chromium.org/1178523002/diff/60001/src/preparser.h File src/preparser.h (right): https://codereview.chromium.org/1178523002/diff/60001/src/preparser.h#newcode2266 src/preparser.h:2266: ReportMessageAt(scanner()->peek_location(), Nit: Should this really be an eager error ...
5 years, 6 months ago (2015-06-10 13:43:53 UTC) #9
caitp (gmail)
https://codereview.chromium.org/1178523002/diff/60001/src/preparser.h File src/preparser.h (right): https://codereview.chromium.org/1178523002/diff/60001/src/preparser.h#newcode2266 src/preparser.h:2266: ReportMessageAt(scanner()->peek_location(), On 2015/06/10 13:43:53, rossberg wrote: > Nit: Should ...
5 years, 6 months ago (2015-06-10 14:30:49 UTC) #11
wingo
On 2015/06/10 13:43:53, rossberg wrote: > https://codereview.chromium.org/1178523002/diff/60001/src/preparser.h > File src/preparser.h (right): > > https://codereview.chromium.org/1178523002/diff/60001/src/preparser.h#newcode2266 > ...
5 years, 6 months ago (2015-06-10 14:54:27 UTC) #12
wingo
Fixed nits, PTAL :)
5 years, 6 months ago (2015-06-10 15:22:34 UTC) #13
wingo
On 2015/06/10 15:22:34, wingo wrote: > Fixed nits, PTAL :) Gaah, it looks like some ...
5 years, 6 months ago (2015-06-10 15:24:48 UTC) #14
rossberg
lgtm
5 years, 6 months ago (2015-06-10 15:26:43 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1178523002/100001
5 years, 6 months ago (2015-06-10 15:31:49 UTC) #18
arv (Not doing code reviews)
On 2015/06/10 15:24:48, wingo wrote: > On 2015/06/10 15:22:34, wingo wrote: > > Fixed nits, ...
5 years, 6 months ago (2015-06-10 15:34:14 UTC) #19
wingo
On 2015/06/10 15:34:14, arv wrote: > On 2015/06/10 15:24:48, wingo wrote: > > On 2015/06/10 ...
5 years, 6 months ago (2015-06-10 15:35:34 UTC) #20
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/1178523002/diff/100001/test/message/arrow-param-after-rest.out File test/message/arrow-param-after-rest.out (right): https://codereview.chromium.org/1178523002/diff/100001/test/message/arrow-param-after-rest.out#newcode3 test/message/arrow-param-after-rest.out:3: ^ I Thought you meant that this should ...
5 years, 6 months ago (2015-06-10 15:40:01 UTC) #22
wingo
On 2015/06/10 15:40:01, arv wrote: > LGTM > > https://codereview.chromium.org/1178523002/diff/100001/test/message/arrow-param-after-rest.out > File test/message/arrow-param-after-rest.out (right): > ...
5 years, 6 months ago (2015-06-10 15:50:51 UTC) #23
arv (Not doing code reviews)
On 2015/06/10 15:50:51, wingo wrote: > On 2015/06/10 15:40:01, arv wrote: > > LGTM > ...
5 years, 6 months ago (2015-06-10 15:54:20 UTC) #24
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 6 months ago (2015-06-10 16:11:30 UTC) #25
commit-bot: I haz the power
5 years, 6 months ago (2015-06-10 16:11:39 UTC) #26
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/e7a62c24855ac2bb34271e997ffae5ffcf57862d
Cr-Commit-Position: refs/heads/master@{#28908}

Powered by Google App Engine
This is Rietveld 408576698