https://codereview.chromium.org/1309813007/diff/470001/src/pattern-rewriter.cc
File src/pattern-rewriter.cc (right):

https://codereview.chromium.org/1309813007/diff/470001/src/pattern-rewriter.cc#newcode276
src/pattern-rewriter.cc:276: set_context(context);
On 2015/11/25 21:41:51, caitp wrote:
On 2015/11/25 21:05:28, adamk wrote:
> Can you use an RAII object for this instead of relying on
set_context at the
end
> of the block to handle this?

Doable, but it is (relatively) a lot of code and I don't think it
needs to be
used a whole lot. I'll put that in the next patch

I'm ok with this for now if you feel like there just aren't enough
callers to be worth it.

https://codereview.chromium.org/1309813007/diff/470001/src/preparser.h
File src/preparser.h (right):

https://codereview.chromium.org/1309813007/diff/470001/src/preparser.h#newcode2493
src/preparser.h:2493: if (peek() != Token::ARROW) {
On 2015/11/25 21:41:52, caitp wrote:
On 2015/11/25 21:05:28, adamk wrote:
> Sorry, I've forgotten if you've answered this already: why are doing
this
> peeking here now (what does it have to do with parsing destructuring
assignment,
> that is)?

```

// Valid if: --harmony-destructuring-assignment
var o = ({ a: b } = someObj);

// Valid if: --harmony-default-parameters +
--harmony-destructuring-bind, only
if followed by `=>`
var f = ({ a: b } = someObj) => b;
```

Can't eagerly break the initializer in ParseAssignmentExpression
unless we know
if the ARROW is there or not, so it defers to the caller and does it
here

Thanks!

https://codereview.chromium.org/1309813007/

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