Revision: 19762
Author:   [email protected]
Date:     Mon Mar 10 15:06:54 2014 UTC
Log:      Fix constant folding of %_IsMinusZero.

[email protected]

Review URL: https://codereview.chromium.org/190793015
http://code.google.com/p/v8/source/detail?r=19762

Modified:
 /branches/bleeding_edge/src/hydrogen-instructions.cc
 /branches/bleeding_edge/test/mjsunit/constant-fold-control-instructions.js

=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Mon Mar 10 14:50:01 2014 UTC +++ /branches/bleeding_edge/src/hydrogen-instructions.cc Mon Mar 10 15:06:54 2014 UTC
@@ -3145,8 +3145,8 @@
     if (constant->HasDoubleValue()) {
       *block = IsMinusZero(constant->DoubleValue())
           ? FirstSuccessor() : SecondSuccessor();
+      return true;
     }
-    return true;
   }
   if (value()->representation().IsSmiOrInteger32()) {
     // A Smi or Integer32 cannot contain minus zero.
=======================================
--- /branches/bleeding_edge/test/mjsunit/constant-fold-control-instructions.js Mon Mar 10 14:50:01 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/constant-fold-control-instructions.js Mon Mar 10 15:06:54 2014 UTC
@@ -34,6 +34,10 @@

   assertTrue(%_IsSpecObject(new Date()));
   assertFalse(%_IsSpecObject(1));
+
+  assertTrue(%_IsMinusZero(-0.0));
+  assertFalse(%_IsMinusZero(1));
+  assertFalse(%_IsMinusZero(""));
 }


--
--
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/d/optout.

Reply via email to