https://codereview.chromium.org/1234213004/diff/1/src/parser.cc
File src/parser.cc (right):

https://codereview.chromium.org/1234213004/diff/1/src/parser.cc#newcode4310
src/parser.cc:4310: bool Parser::NeedsParameterInitializationBlock(
On 2015/07/16 12:53:47, rossberg wrote:
Make this into IsSimpleParameterList, to match what's in the spec. In
particular, it needs to check for rest as well.

Acknowledged.

https://codereview.chromium.org/1234213004/diff/1/src/parser.cc#newcode4383
src/parser.cc:4383: if (fvar != nullptr) {
On 2015/07/16 12:53:47, rossberg wrote:
Hm, why do you need to move (and duplicate) fvar initialisation and
IsConstruct
assert?

it seems that these need to happen before the init block. I suppose it
could just use `result->insertAt(0)` instead though

https://codereview.chromium.org/1234213004/diff/1/test/mjsunit/strong/destructuring.js
File test/mjsunit/strong/destructuring.js (right):

https://codereview.chromium.org/1234213004/diff/1/test/mjsunit/strong/destructuring.js#newcode10
test/mjsunit/strong/destructuring.js:10: var a = f({ x: undefined });
On 2015/07/16 12:53:47, rossberg wrote:
On 2015/07/15 20:35:44, caitp wrote:
> this move kind of makes destructuring initializers not very good,
but maybe
this
> is actually intentional? Not sure.

Not sure I understand. What's not good?



It's okay for the VM, but having to fill out each field is sort of
inconvenient and hurts one of the conveniences of using destructuring in
the first place.

eg, `function f({ x = true }) { "use strong"; return x; } f({})` would
throw because `x` does not exist in `{}` --- so it makes destructuring
initializers sort of pointless, because you always need to be explicit.

Btw, language mode vs parameter destructuring is a much bigger problem
than I
thought yesterday. Will post something later.

Yeah, this doesn't quite cut it although it does keep existing tests
passing at least.

https://codereview.chromium.org/1234213004/

--
--
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