bug fixing
authorjzhou <jzhou>
Wed, 5 Nov 2008 23:00:01 +0000 (23:00 +0000)
committerjzhou <jzhou>
Wed, 5 Nov 2008 23:00:01 +0000 (23:00 +0000)
Robust/src/ClassLibrary/Integer.java
Robust/src/IR/Flat/BuildFlat.java

index b287800fd6c1a0ac9f6fbc31837e02fe3d32ce2b..523acb2b2e7abf876834da943cb7e126f45f4061 100644 (file)
@@ -57,4 +57,17 @@ public class Integer {
   public String toString() {
     return String.valueOf(value);
   }
+  
+  public int hashCode() {
+      return value;
+  }
+
+  public boolean equals(Object o) {
+      if (o.getType()!=getType())
+         return false;
+      Integer s=(Integer)o;
+      if (s.intValue()!=this.value)
+         return false;
+      return true;
+  }
 }
index 9562bd279cdd8931e01f2fab1f1d3fb3b08a390f..52f92b5c6aa702d0630614526e1e6ec8ba910b50 100644 (file)
@@ -415,7 +415,7 @@ public class BuildFlat {
       if (base!=null) {
        //If it is a preinc we need to store the initial value
        TempDescriptor src_tmp2=pre ? TempDescriptor.tempFactory("src",an.getDest().getType()) : out_temp;
-       TempDescriptor tmp=TempDescriptor.tempFactory("srctmp3",an.getDest().getType());
+       TempDescriptor tmp=TempDescriptor.tempFactory("srctmp3_",an.getDest().getType());
        FlatFieldNode ffn=new FlatFieldNode(fan.getField(), dst_tmp, src_tmp2);
        last.addNext(ffn);
        last=ffn;
@@ -466,7 +466,7 @@ public class BuildFlat {
       if (base!=null) {
        //If it is a preinc we need to store the initial value
        TempDescriptor src_tmp2=pre ? TempDescriptor.tempFactory("src",an.getDest().getType()) : out_temp;
-       TempDescriptor tmp=TempDescriptor.tempFactory("srctmp3",an.getDest().getType());
+       TempDescriptor tmp=TempDescriptor.tempFactory("srctmp3_",an.getDest().getType());
 
        FlatElementNode fen=new FlatElementNode(dst_tmp, index_tmp, src_tmp2);
        last.addNext(fen);
@@ -518,7 +518,7 @@ public class BuildFlat {
        if (base!=null) {
          //If it is a preinc we need to store the initial value
          TempDescriptor src_tmp2=pre ? TempDescriptor.tempFactory("src",an.getDest().getType()) : out_temp;
-         TempDescriptor tmp=TempDescriptor.tempFactory("srctmp3",an.getDest().getType());
+         TempDescriptor tmp=TempDescriptor.tempFactory("srctmp3_",an.getDest().getType());
 
          FlatFieldNode ffn=new FlatFieldNode(fan.getField(), dst_tmp, src_tmp2);
          last.addNext(ffn);
@@ -559,7 +559,7 @@ public class BuildFlat {
          if (base!=null) {
            //If it is a preinc we need to store the initial value
            TempDescriptor src_tmp2=pre ? TempDescriptor.tempFactory("src",an.getDest().getType()) : out_temp;
-           TempDescriptor tmp=TempDescriptor.tempFactory("srctmp3",an.getDest().getType());
+           TempDescriptor tmp=TempDescriptor.tempFactory("srctmp3_",an.getDest().getType());
 
            FlatFieldNode ffn=new FlatFieldNode(nn.getField(), getTempforVar(nn.getVar()), src_tmp2);
            if (first==null)
@@ -605,7 +605,7 @@ public class BuildFlat {
          if (base!=null) {
            //If it is a preinc we need to store the initial value
            TempDescriptor src_tmp2=getTempforVar(nn.getVar());
-           TempDescriptor tmp=TempDescriptor.tempFactory("srctmp3",an.getDest().getType());
+           TempDescriptor tmp=TempDescriptor.tempFactory("srctmp3_",an.getDest().getType());
            if (!pre) {
              FlatOpNode fon=new FlatOpNode(out_temp, src_tmp2, null, new Operation(Operation.ASSIGN));
              if (first==null)