Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index bd1dd403a79cbd397b2a9c56a48a590c71443216..74f7da8597616ebf0f98d27cc7f674f20e09405f 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -1757,11 +1757,15 @@ class HChange: public HUnaryOperation { |
ASSERT(!value->representation().IsNone() && !to.IsNone()); |
ASSERT(!value->representation().Equals(to)); |
set_representation(to); |
- set_type(HType::TaggedNumber()); |
SetFlag(kUseGVN); |
if (deoptimize_on_undefined) SetFlag(kDeoptimizeOnUndefined); |
if (is_truncating) SetFlag(kTruncatingToInt32); |
- if (to.IsTagged()) SetGVNFlag(kChangesNewSpacePromotion); |
+ if (value->type().IsSmi()) { |
+ set_type(HType::Smi()); |
+ } else { |
+ set_type(HType::TaggedNumber()); |
+ if (to.IsTagged()) SetGVNFlag(kChangesNewSpacePromotion); |
+ } |
} |
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); |