LGTM after a small refactoring.

https://codereview.chromium.org/14320021/diff/5001/src/hydrogen-instructions.cc
File src/hydrogen-instructions.cc (right):

https://codereview.chromium.org/14320021/diff/5001/src/hydrogen-instructions.cc#newcode2255
src/hydrogen-instructions.cc:2255: if
(observed_output_representation_.is_more_general_than(rep)) {
Simplifying this a bit and extracting a predicate makes this much more
readable:

-----------------------------------------------
bool HBinaryoperation::IgnoreObservedOutputRepresentation(Representation
rep) {
  return observed_output_representation_.IsDouble() &&
      rep.IsInteger32() &&
      !this->IsDiv() &&
      CheckUsesForFlag(kTruncatingToInt32);
}


In HBinaryOperation::RepresentationFromInputs:
...
  if (observed_output_representation_.is_more_general_than(rep) &&
      !IgnoreObservedOutputRepresentation(rep)) {
    rep = observed_output_representation_;
  }
...
-----------------------------------------------

https://codereview.chromium.org/14320021/

--
--
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/groups/opt_out.


Reply via email to