changes
[IRC.git] / Robust / src / IR / Flat / TempDescriptor.java
index 8cff4119c883f66e6ca74cdd89770b2addbda080..22daa68850c434f767e323277ee27f8ad71f7b89 100644 (file)
@@ -5,11 +5,17 @@ public class TempDescriptor {
     static int currentid=0;
     int id;
     String safename;
+    TypeDescriptor type;
 
     public TempDescriptor(String name) {
        safename="__"+name+"__";
        id=currentid++;
     }
+
+    public TempDescriptor(String name, TypeDescriptor td) {
+       this(name);
+       type=td;
+    }
     
     public static TempDescriptor tempFactory() {
        return new TempDescriptor("temp_"+currentid);
@@ -19,7 +25,20 @@ public class TempDescriptor {
        return new TempDescriptor(name+currentid);
     }
 
+    public static TempDescriptor tempFactory(String name, TypeDescriptor td) {
+       return new TempDescriptor(name+currentid,td);
+    }
+
+
     public String toString() {
        return safename;
     }
+
+    public void setType(TypeDescriptor td) {
+       type=td;
+    }
+
+    public TypeDescriptor getType() {
+       return type;
+    }
 }