https://codereview.chromium.org/1225413005/diff/20001/src/parser.cc
File src/parser.cc (right):
https://codereview.chromium.org/1225413005/diff/20001/src/parser.cc#newcode4435
src/parser.cc:4435: if (inner_scope)
CheckConflictingVarDeclarations(inner_scope, CHECK_OK);
On 2015/07/15 21:12:30, adamk wrote:
CHECK_OK shouldn't be used in a single-statement if like this (even if
it would
turn out to do the right thing). Better to add a block here.
You could also guard the above inner_block->set_scope() call with this
check
while you're at it. (and nit: change the condition to inner_scope !=
nullptr to
match surrounding code)
Done.
https://codereview.chromium.org/1225413005/diff/20001/src/scopes.cc
File src/scopes.cc (right):
https://codereview.chromium.org/1225413005/diff/20001/src/scopes.cc#newcode582
src/scopes.cc:582: // If the declaration scope is a (declaration) block
scope, also continue
On 2015/07/15 21:12:30, adamk wrote:
This weird duality of "declaration" scopes is beginning to worry me.
Do you have
reason to think there aren't more places that depend on there being a
single
declaration scope for a given scope?
I admit this is hacky, but I'm not sure I fully understand your
question. There should always be a single declaration scope. But in this
particular case, we also want to check that it doesn't overlap with the
surrounding one.
https://codereview.chromium.org/1225413005/
--
--
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.