PTAL (comments addressed; sorry for rebase)

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())) {
On 2014/11/25 15:23:36, rossberg wrote:
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?

I'd prefer to share logic with the backends. Michi?

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;
On 2014/11/25 15:23:36, rossberg wrote:
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;
Hmm, I like my version better since it puts the variable mode first.
I did a hybrid of the two which I think is more readable

https://codereview.chromium.org/749633002/diff/80001/src/variables.h#newcode146
src/variables.h:146: op != Token::INIT_CONST;
On 2014/11/25 15:23:36, rossberg wrote:
Can this even occur when mode is CONST_LEGACY?

No, done

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.

Reply via email to