Looking good. Some open questions on my side. I think the runtime bit is going to be gnarly because e.g. we never have a loop inside an expression, currently, and that is going to throw off all kinds of things in the compiler, seems to me.

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

https://codereview.chromium.org/1309813007/diff/10001/src/preparser.h#newcode708
src/preparser.h:708: }
I don't see how you are going to implement the desugaring without
implementing an internal version of do expressions, and if you have done
that then it seems to me that the rewrite can be pushed down into the
main body of ParseAssignmentExpression.  WDYT?

Or are you doing this here because it could be that the expression is a
valid assignmentexpression but actually is an arrow function formal
parameter?  I guess that's possible too.  In any case I think a comment
is warranted :)

https://codereview.chromium.org/1309813007/diff/10001/src/preparser.h#newcode811
src/preparser.h:811: void SetCoverInitializedNameLocation(int begin, int
end) override {
Some comments here would be great :)

https://codereview.chromium.org/1309813007/diff/10001/test/cctest/test-parsing.cc
File test/cctest/test-parsing.cc (right):

https://codereview.chromium.org/1309813007/diff/10001/test/cctest/test-parsing.cc#newcode7078
test/cctest/test-parsing.cc:7078: kError, NULL, 0, always_flags,
arraysize(always_flags));
Change to kSuccess?  Not sure if the to-do is done tho.

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

--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to