Various style nits follow.
I think I'm about as uneasy as rossberg is about undeclaring variables.
https://codereview.chromium.org/1127063003/diff/300001/src/parser.cc
File src/parser.cc (right):
https://codereview.chromium.org/1127063003/diff/300001/src/parser.cc#newcode1146
src/parser.cc:1146: bool hasParameterExpressions = false;
Same style nit, use_underscores. I think this shows up a bunch of other
places, should be an easy search/replace.
https://codereview.chromium.org/1127063003/diff/300001/src/parser.cc#newcode1147
src/parser.cc:1147: ZoneList<Expression*>* initializers =
Please add a TODO here, since you're just dropping this on the floor.
https://codereview.chromium.org/1127063003/diff/300001/src/parser.cc#newcode3424
src/parser.cc:3424: ZoneList<Statement*>* body = new (zone())
ZoneList<Statement*>(0, zone());
Don't you know how big a list you need here (initializers->length())?
https://codereview.chromium.org/1127063003/diff/300001/src/parser.cc#newcode3431
src/parser.cc:3431: static const int capacity = 1;
More style nits: kCapacity
https://codereview.chromium.org/1127063003/diff/300001/src/parser.cc#newcode3432
src/parser.cc:3432: static const bool is_initializer_block = true; // ?
kIsInitializerBlock.
Also the "// ?" should either be gone or better explained.
https://codereview.chromium.org/1127063003/diff/300001/src/parser.cc#newcode3436
src/parser.cc:3436: static const VariableMode mode = LET;
kMode (though I'm not sure this adds much)
https://codereview.chromium.org/1127063003/diff/300001/src/parser.cc#newcode3452
src/parser.cc:3452: new (zone()) ZoneList<Expression*>(0, zone());
s/0/1/ for the capacity arg here.
https://codereview.chromium.org/1127063003/diff/300001/src/parser.cc#newcode3456
src/parser.cc:3456: if (initializer) {
if (initializer != nullptr)
https://codereview.chromium.org/1127063003/diff/300001/src/parser.cc#newcode3459
src/parser.cc:3459: new (zone()) ZoneList<Expression*>(0, zone());
s/0/1/ again.
https://codereview.chromium.org/1127063003/diff/300001/src/parser.h
File src/parser.h (right):
https://codereview.chromium.org/1127063003/diff/300001/src/parser.h#newcode1076
src/parser.h:1076: Scope* scope, bool hasParameterExpressions,
Style nit: has_parameter_expressions
https://codereview.chromium.org/1127063003/
--
--
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.