It's taking me longer than I'd like to boot up on this (hard to keep the
whole
thing in my head), but here's some feedback in the meantime (while I read
and
re-read).
https://codereview.chromium.org/1309813007/diff/150001/src/ast.h
File src/ast.h (right):
https://codereview.chromium.org/1309813007/diff/150001/src/ast.h#newcode227
src/ast.h:227: inline bool IsPatternOrLiteral() const {
Nit: "inline" is redundant here
https://codereview.chromium.org/1309813007/diff/150001/src/preparser.h
File src/preparser.h (left):
https://codereview.chromium.org/1309813007/diff/150001/src/preparser.h#oldcode2684
src/preparser.h:2684: this->ExpressionUnexpectedToken(classifier);
Sorry, what happened here? Is this supposed to be dependent on the
allow_destructuring_assignment flag?
https://codereview.chromium.org/1309813007/diff/150001/src/preparser.h
File src/preparser.h (right):
https://codereview.chromium.org/1309813007/diff/150001/src/preparser.h#newcode777
src/preparser.h:777: #define DECLARE_BOOLEAN_STATE_ON_STACK(type,
state_var) \
This whole thing looks pretty big for what it's doing.
I'm not convinced you need to add Push and Pop, for one, since it seems
like you should always be able to use RAII. And the Is() accessor seems
like unnecessary boilerplate given that the state is directly available
from the parser.
Overall I think this stuff should be as minimal as possible (if you
could get away without the macro that'd be even better).
https://codereview.chromium.org/1309813007/diff/150001/src/preparser.h#newcode800
src/preparser.h:800: friend class type##State
No need to friend an inner class.
https://codereview.chromium.org/1309813007/diff/150001/src/preparser.h#newcode2477
src/preparser.h:2477: bool old_state_ = PushArrowFormalsState(true);
Can't you wrap the next few lines in a block and use an RAII object here
instead of calling these directly?
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.