https://chromiumcodereview.appspot.com/16268009/diff/1/src/hydrogen-instructions.cc
File src/hydrogen-instructions.cc (right):

https://chromiumcodereview.appspot.com/16268009/diff/1/src/hydrogen-instructions.cc#newcode1317
src/hydrogen-instructions.cc:1317: bool spans_zero = lower < 0 && 0 <
upper;
There's Range::CanBeZero(). It checks for '<=' instead of '<' for both
relations, but that shouldn't make a difference here.

https://chromiumcodereview.appspot.com/16268009/diff/1/src/hydrogen-instructions.cc#newcode1327
src/hydrogen-instructions.cc:1327: if (r.IsSmi())
result->TruncateToSmi();
Is this needed? Doesn't r.IsSmi() imply
value()->representation().IsSmi(), which in turn implies that
value()->range() is within Smi range anyway?

https://chromiumcodereview.appspot.com/16268009/diff/1/src/hydrogen-instructions.h
File src/hydrogen-instructions.h (right):

https://chromiumcodereview.appspot.com/16268009/diff/1/src/hydrogen-instructions.h#newcode278
src/hydrogen-instructions.h:278: void TruncateToInt32() {
Considering that lower_ and upper_ are int32_t, this function is always
a no-op. I don't think we need no-op functions :-)

https://chromiumcodereview.appspot.com/16268009/diff/11001/src/hydrogen-instructions.cc
File src/hydrogen-instructions.cc (right):

https://chromiumcodereview.appspot.com/16268009/diff/11001/src/hydrogen-instructions.cc#newcode1317
src/hydrogen-instructions.cc:1317: bool spans_zero = lower < 0 && 0 <
upper;
There's Range::CanBeZero(). It checks for '<=' instead of '<' for both
relations, but that shouldn't make a difference here.

https://chromiumcodereview.appspot.com/16268009/diff/11001/src/hydrogen-instructions.cc#newcode1321
src/hydrogen-instructions.cc:1321: if (r.IsSmi()) result->ClampToSmi();
Is this needed? Doesn't r.IsSmi() imply
value()->representation().IsSmi(), which in turn implies that
value()->range() is within Smi range anyway?

https://chromiumcodereview.appspot.com/16268009/diff/11001/src/hydrogen-instructions.h
File src/hydrogen-instructions.h (right):

https://chromiumcodereview.appspot.com/16268009/diff/11001/src/hydrogen-instructions.h#newcode278
src/hydrogen-instructions.h:278: void ClampToInt32() {
Considering that lower_ and upper_ are int32_t, this function is always
a no-op. I don't think we need no-op functions :-)

https://chromiumcodereview.appspot.com/16268009/

--
--
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