Revision: 14365
Author: [email protected]
Date: Mon Apr 22 01:00:28 2013
Log: Infer smi-range for smi-typed values.
Review URL: https://chromiumcodereview.appspot.com/14192034
http://code.google.com/p/v8/source/detail?r=14365
Modified:
/branches/bleeding_edge/src/hydrogen-instructions.cc
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Fri Apr 19
06:26:47 2013
+++ /branches/bleeding_edge/src/hydrogen-instructions.cc Mon Apr 22
01:00:28 2013
@@ -1683,9 +1683,15 @@
Range* HValue::InferRange(Zone* zone) {
- // Untagged integer32 cannot be -0, all other representations can.
- Range* result = new(zone) Range();
- result->set_can_be_minus_zero(!representation().IsInteger32());
+ Range* result;
+ if (type().IsSmi()) {
+ result = new(zone) Range(Smi::kMinValue, Smi::kMaxValue);
+ result->set_can_be_minus_zero(false);
+ } else {
+ // Untagged integer32 cannot be -0, all other representations can.
+ result = new(zone) Range();
+ result->set_can_be_minus_zero(!representation().IsInteger32());
+ }
return result;
}
--
--
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.