Reviewers: arv, Dmitry Lomov (chromium),

Message:
I'm making progress on this --- It's not ready to land, but it would be nice to
get some pointers on a few things.

The following known issues are present:

1) Rest parameter construction is broken when optimized (doesn't crash, just
doesn't do anything), and does not trigger deoptimization (mainly because I'm
not quite sure how to do that yet)

2) Rest parameter construction is always a runtime function, although I can
probably implement a fast mode in full-codegen shortly

3) Constructing the rest parameter array mutates the parameters on the stack, which causes `arguments` to report an incorrect value. (I am not sure what the best way around this is, since I'd prefer not to always allocate a context for
functions with rest parameters)

4) Parsing rest parameters does not work at all for arrow functions, I'm not
sure the best approach to fixing this. My gut feeling is that
ParseAssignmentExpression would check for a "..." token before doing any work,
and annotate the resulting expression to indicate that it is a rest/spread
expression --- but it would be good to get some pointers for that

Description:
WIP Implement ES6 rest parameters

LOG=Y
BUG=v8:2159
[email protected], [email protected], [email protected]

Please review this at https://codereview.chromium.org/816913003/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+434, -10 lines):
  M src/bootstrapper.cc
  M src/code-stubs.h
  M src/code-stubs.cc
  M src/compiler.cc
  M src/flag-definitions.h
  M src/messages.js
  M src/parser.cc
  M src/preparser.h
  M src/preparser.cc
  M src/runtime/runtime.h
  M src/runtime/runtime-scopes.cc
  M src/scanner.cc
  M src/scopes.h
  M src/scopes.cc
  M src/token.h
  M src/variables.h
  M src/variables.cc
  M src/x64/code-stubs-x64.cc
  M src/x64/full-codegen-x64.cc
  A test/mjsunit/harmony/rest-params.js


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to