mstarzinger should judge the change to the graph builder.
https://codereview.chromium.org/749633002/diff/80001/src/compiler/ast-graph-builder.cc
File src/compiler/ast-graph-builder.cc (right):
https://codereview.chromium.org/749633002/diff/80001/src/compiler/ast-graph-builder.cc#newcode2016
src/compiler/ast-graph-builder.cc:2016: if
(variable->IsSignallingAssignmentToConst(op, strict_mode())) {
I'm not sure I like this factorisation, since it breaks the symmetry
with the other cases below and thereby makes the code less readable. It
also duplicates some of the cases analysis. Better factor it out into
the two relevant cases below.
Michi, what do you think?
https://codereview.chromium.org/749633002/diff/80001/src/compiler/ast-graph-builder.cc#newcode2044
src/compiler/ast-graph-builder.cc:2044: if
(variable->IsSignallingAssignmentToConst(op, strict_mode())) {
Same here.
https://codereview.chromium.org/749633002/diff/80001/src/variables.h
File src/variables.h (right):
https://codereview.chromium.org/749633002/diff/80001/src/variables.h#newcode142
src/variables.h:142: if (mode() == CONST) return op !=
Token::INIT_CONST;
Hm, wouldn't it be easier and more accurate to implement this as
follows:
if (strict_mode = SLOPPY) return false;
if (op == Token::INIT_CONST || op == Token::INIT_CONST_LEGACY) return
false;
return mode() == CONST || mode() == CONST_LEGACY;
https://codereview.chromium.org/749633002/diff/80001/src/variables.h#newcode146
src/variables.h:146: op != Token::INIT_CONST;
Can this even occur when mode is CONST_LEGACY?
https://codereview.chromium.org/749633002/
--
--
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.