If the input to an HChange is of type smi, then no need to mark gvn flag...

If the input to an HChange is of type smi, then no need to mark gvn flag changes new space promotion.

BUG=

Review URL: https://codereview.chromium.org/14253010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent cd99870e
......@@ -1757,12 +1757,16 @@ 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 (value->type().IsSmi()) {
set_type(HType::Smi());
} else {
set_type(HType::TaggedNumber());
if (to.IsTagged()) SetGVNFlag(kChangesNewSpacePromotion);
}
}
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
virtual HType CalculateInferredType();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment