LGTM with nits/improvements that can be done in the future.
https://codereview.chromium.org/1130623004/diff/80001/src/pattern-rewriter.cc
File src/pattern-rewriter.cc (right):
https://codereview.chromium.org/1130623004/diff/80001/src/pattern-rewriter.cc#newcode222
src/pattern-rewriter.cc:222: // TODO(dslomov): computed property names.
Also:
TODO(dslomov): Add support for initializer
let {x: y = e1} = e2;
=>
t1 = e2;
let y = (t2 = t1.x) === undefined ? e1 : t2;
https://codereview.chromium.org/1130623004/diff/80001/src/pattern-rewriter.cc#newcode255
src/pattern-rewriter.cc:255: NOT_A_PATTERN(Property)
I think this one still belongs with the implement ones above to make
sure we remember to handle it.
https://codereview.chromium.org/1130623004/diff/80001/src/pattern-rewriter.cc#newcode260
src/pattern-rewriter.cc:260: NOT_A_PATTERN(BreakStatement)
Sort these...
https://codereview.chromium.org/1130623004/diff/80001/src/pattern-rewriter.cc#newcode295
src/pattern-rewriter.cc:295: }
#undef NOT_A_PATTERN
https://codereview.chromium.org/1130623004/diff/80001/test/mjsunit/harmony/destructuring.js
File test/mjsunit/harmony/destructuring.js (right):
https://codereview.chromium.org/1130623004/diff/80001/test/mjsunit/harmony/destructuring.js#newcode12
test/mjsunit/harmony/destructuring.js:12: var {z} = { z : 3 };
Maybe add let and const tests too and add TDZ check.
let {x, y} = {x: 1, y};
^
TDZ
https://codereview.chromium.org/1130623004/
--
--
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.