Fixed some errors in the Repair Generator code.
[repair.git] / Repair / RepairCompiler / MCC / IR / SetExpr.java
index b2a37cf1a41cefc20071012049c6e797de73b312..9deb8ac083cd343ce08662a1b599498edaf20a13 100755 (executable)
@@ -9,7 +9,31 @@ public class SetExpr extends Expr {
     public SetExpr(SetDescriptor sd) {
         this.sd = sd;
     }
-    
+
+    public String name() {
+       return sd.toString();
+    }
+
+    public boolean equals(Map remap, Expr e) {
+       if (e==null||!(e instanceof SetExpr))
+           return false;
+       SetExpr se=(SetExpr)e;
+       if (sd!=se.sd)
+           return false;
+       return true;
+    }
+
+    public boolean usesDescriptor(Descriptor s) {
+       return (s==sd);
+    }
+
+    public Set useDescriptor(Descriptor s) {
+       HashSet newset=new HashSet();
+       if (s==sd)
+           newset.add(this);
+       return newset;
+    }
+
     public SetExpr() {
         this.sd = null;
     }
@@ -18,6 +42,10 @@ public class SetExpr extends Expr {
         return new HashSet();
     }
 
+    public Descriptor getDescriptor() {
+       return sd;
+    }
+
     public Set getRequiredDescriptors() {
         HashSet v = new HashSet();
         v.add(sd);