https://codereview.chromium.org/1274193004/diff/40001/src/parser.cc
File src/parser.cc (right):
https://codereview.chromium.org/1274193004/diff/40001/src/parser.cc#newcode2016
src/parser.cc:2016: // Similarly, strict mode eval scope does not leak
variable declarations to
This comment's getting pretty outdated, but if you want to leave it here
this sentence should also mention lexical variables in sloppy mode.
https://codereview.chromium.org/1274193004/diff/40001/src/parser.cc#newcode2019
src/parser.cc:2019: declaration_scope->is_strict_eval_scope() ||
I think it would be clearer to get rid of this line (and the
is_strict_eval_scope method, which is only used here)...
https://codereview.chromium.org/1274193004/diff/40001/src/parser.cc#newcode2023
src/parser.cc:2023: (declaration_scope->is_eval_scope() &&
IsLexicalVariableMode(mode))) {
...and replace this condition with:
(declaration_scope->is_eval_scope() &&
(is_strict(language_mode()) || IsLexicalVariableMode(mode)))
That makes it clear when eval is handled here.
https://codereview.chromium.org/1274193004/diff/40001/src/parser.cc#newcode2104
src/parser.cc:2104: !IsLexicalVariableMode(mode)) {
It's weird that this isn't part of an else/if clause of the above if
statement, but I suppose it's not any weirder now than it was before.
https://codereview.chromium.org/1274193004/
--
--
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.