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

Issue 997823003: [es6] support rest parameters in arrow functions (alternative) (Closed)

Created:
5 years, 9 months ago by caitp (gmail)
Modified:
5 years, 3 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

[es6] support rest parameters in arrow functions (alternative) BUG=v8:2159 LOG=N R=marja@chromium.org, arv@chromium.org, dslomov@chromium.org

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+206 lines, -42 lines) Patch
M src/ast.h View 3 chunks +26 lines, -0 lines 0 comments Download
M src/ast-numbering.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/ast-loop-assignment-analyzer.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M src/full-codegen.cc View 2 chunks +10 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M src/parser.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/parser.cc View 3 chunks +7 lines, -2 lines 0 comments Download
M src/preparser.h View 24 chunks +105 lines, -35 lines 3 comments Download
M src/preparser.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/prettyprinter.cc View 3 chunks +21 lines, -0 lines 0 comments Download
M src/typing.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M test/cctest/test-parsing.cc View 2 chunks +4 lines, -1 line 0 comments Download
M test/mjsunit/harmony/rest-params.js View 3 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
caitp (gmail)
Alternative version of https://crrev.com/987083003 --- this one doesn't change the parser to incorporate an extra ...
5 years, 9 months ago (2015-03-11 05:58:27 UTC) #1
marja
Yeah, preparser doesn't check duplicates in arrow function param lists, since when we start parsing ...
5 years, 9 months ago (2015-03-11 18:15:44 UTC) #2
arv (Not doing code reviews)
5 years, 9 months ago (2015-03-11 18:59:13 UTC) #3
https://codereview.chromium.org/997823003/diff/1/src/preparser.h
File src/preparser.h (right):

https://codereview.chromium.org/997823003/diff/1/src/preparser.h#newcode2005
src/preparser.h:2005: case Token::ELLIPSIS:
Beware of fall through here.

https://codereview.chromium.org/997823003/diff/1/src/preparser.h#newcode2406
src/preparser.h:2406: // TODO(caitp): the error is an unexpected `...`, it would
be nice if we
Can you store the position before calling ParseConditionalExpression?

https://codereview.chromium.org/997823003/diff/1/src/preparser.h#newcode2416
src/preparser.h:2416: // TODO(caitp): report an error if an unexpected `...`
occurred.
Here it would be good to have an ast ;-)

I'm not really sure how to best track this. Potentially we could pass in a
Location pointer but it gets ugly.

Powered by Google App Engine
This is Rietveld 408576698