Reviewers: adamk, Dan Ehrenberg,

Description:
[es6] Implement proper TDZ for parameters

Previously, examples like (({a = x}, x) => {})({}, 0) did not throw a
ReferenceError like they should. This CL

- Splits up DeclareFormalParameters such that the formals can be recorded first
and declared later.

- Declaration then takes the complete parameter list into account. If it is not
simple, temporaries are introduced for all parameters.

- BuildParameterInitializationBlock desugars all parameters from non-simple
lists into let-bindings.

- Rest is currently handled specially, until rest-via-destructuring has landed.

[email protected], [email protected]
BUG=v8:811
LOG=N

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

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

Affected files (+139, -36 lines):
  M src/parser.h
  M src/parser.cc
  M src/preparser.h
  M test/mjsunit/harmony/destructuring.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