changeset 11887:535403a95e65

Fix problem with FloatStamp/IntegerStamp.alwaysDistinct throwing NPE
author Gilles Duboscq <duboscq@ssw.jku.at>
date Thu, 03 Oct 2013 10:38:23 +0200
parents f759edd9e809
children e0eb7619433f
files graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/FloatStamp.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IllegalStamp.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java
diffstat 3 files changed, 0 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/FloatStamp.java	Wed Oct 02 22:46:54 2013 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/FloatStamp.java	Thu Oct 03 10:38:23 2013 +0200
@@ -92,12 +92,6 @@
     }
 
     @Override
-    public boolean alwaysDistinct(Stamp otherStamp) {
-        FloatStamp other = (FloatStamp) otherStamp;
-        return (nonNaN || other.nonNaN) && (lowerBound > other.upperBound || upperBound < other.lowerBound);
-    }
-
-    @Override
     public Stamp meet(Stamp otherStamp) {
         if (otherStamp == this) {
             return this;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IllegalStamp.java	Wed Oct 02 22:46:54 2013 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IllegalStamp.java	Thu Oct 03 10:38:23 2013 +0200
@@ -40,11 +40,6 @@
     }
 
     @Override
-    public boolean alwaysDistinct(Stamp other) {
-        return true;
-    }
-
-    @Override
     public Stamp meet(Stamp other) {
         return other;
     }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java	Wed Oct 02 22:46:54 2013 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java	Thu Oct 03 10:38:23 2013 +0200
@@ -145,21 +145,6 @@
         return str.toString();
     }
 
-    @Override
-    public boolean alwaysDistinct(Stamp otherStamp) {
-        IntegerStamp other = (IntegerStamp) otherStamp;
-        if (lowerBound > other.upperBound || upperBound < other.lowerBound) {
-            return true;
-        } else if ((upMask & other.upMask) == 0 && (lowerBound > 0 || upperBound < 0 || other.lowerBound > 0 || other.upperBound < 0)) {
-            /*
-             * Zero is the only common value if the masks don't overlap. If one of the two values is
-             * less than or greater than zero, they are always distinct.
-             */
-            return true;
-        }
-        return false;
-    }
-
     private Stamp createStamp(IntegerStamp other, long newUpperBound, long newLowerBound, long newDownMask, long newUpMask) {
         assert kind() == other.kind();
         if (newLowerBound > newUpperBound || (newDownMask & (~newUpMask)) != 0) {