Changes:
[IRC.git] / Robust / src / IR / Flat / TempTagPair.java
index a5fb9bc4d86cb2dffc7eab4b5a78dc92f57e02a5..2231a000722413b4e8783091a3d95d290c6e4d00 100644 (file)
@@ -12,7 +12,7 @@ public class TempTagPair {
        this.td=td;
     }
     public int hashCode() {
-       return tagd.hashCode()^td.hashCode()^tagt.hashCode();
+       return td.hashCode()^tagt.hashCode();
     }
     
     public TempDescriptor getTemp() {
@@ -31,7 +31,15 @@ public class TempTagPair {
        if (!(o instanceof TempTagPair))
            return false;
        TempTagPair ttp=(TempTagPair)o;
-       return ttp.tagd.equals(tagd)&&ttp.tagt==tagt&&ttp.td==td;
+       if (ttp.tagt==tagt&&ttp.td==td) {
+           if (ttp.tagd!=null) {
+               if (!ttp.tagd.equals(tagd))
+                   throw new Error();
+           } else if (tagd!=null)
+               throw new Error();
+           
+           return true;
+       } else return false;
     }
 
     public String toString() {