Revision: 14401
Author:   [email protected]
Date:     Wed Apr 24 02:14:56 2013
Log: 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
http://code.google.com/p/v8/source/detail?r=14401

Modified:
 /branches/bleeding_edge/src/hydrogen-instructions.h

=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Tue Apr 23 06:08:10 2013 +++ /branches/bleeding_edge/src/hydrogen-instructions.h Wed Apr 24 02:14:56 2013
@@ -1757,11 +1757,15 @@
     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);

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