Cristian bug fixes.
authorbdemsky <bdemsky>
Fri, 16 Apr 2004 21:13:37 +0000 (21:13 +0000)
committerbdemsky <bdemsky>
Fri, 16 Apr 2004 21:13:37 +0000 (21:13 +0000)
Repair/RepairCompiler/MCC/IR/RelationInclusion.java
Repair/RepairCompiler/MCC/IR/RepairGenerator.java
Repair/RepairCompiler/MCC/IR/SetInclusion.java

index 58e2664..b31700c 100755 (executable)
@@ -88,7 +88,7 @@ public class RelationInclusion extends Inclusion {
         }
 
         String addeditem = (VarDescriptor.makeNew("addeditem")).getSafeSymbol();
-       if (!Compiler.REPAIR) {
+       /*      if (!Compiler.REPAIR) {
            writer.outputline("int " + addeditem + ";");
            if (relation.testUsage(RelationDescriptor.IMAGE)) {
                writer.outputline(addeditem + " = " + relation.getSafeSymbol() + "_hash->add((int)" + ld.getSafeSymbol() + ", (int)" + rd.getSafeSymbol() + ");");
@@ -97,9 +97,9 @@ public class RelationInclusion extends Inclusion {
            if (relation.testUsage(RelationDescriptor.INVIMAGE)) {
                writer.outputline(addeditem + " = " + relation.getSafeSymbol() + "_hashinv->add((int)" + rd.getSafeSymbol() + ", (int)" + ld.getSafeSymbol() + ");");
            }
-       } else {
+           } else {*/
            Repair.generate_dispatch(writer, relation, ld.getSafeSymbol(), rd.getSafeSymbol());
-       }
+           //  }
        
         if (RelationInclusion.worklist) {
             writer.outputline("if (" + addeditem + ")");
index ab4d026..fb78939 100755 (executable)
@@ -1392,8 +1392,7 @@ public class RepairGenerator {
            cr.outputline(addeditem + " = " + rd.getSafeSymbol() + "_hashinv->add((int)" + rightvar + ", (int)" + leftvar + ");");
        }
        
-       cr.outputline("if (" + addeditem + ")");
-       cr.startblock();
+
 
         Vector dispatchrules = getrulelist(rd);
         
@@ -1406,12 +1405,12 @@ public class RepairGenerator {
        dispatchrules.removeAll(toremove);
         if (dispatchrules.size() == 0) {
             cr.outputline("// nothing to dispatch");
-           cr.endblock();
             return;
         }
-       
-       cr.outputline("if ("+addeditem+")");
+
+       cr.outputline("if (" + addeditem + ")");
        cr.startblock();
+       
         for(int i = 0; i < dispatchrules.size(); i++) {
             Rule rule = (Rule) dispatchrules.elementAt(i);
            if (rule.getGuardExpr().getRequiredDescriptors().contains(rd)) {
@@ -1427,7 +1426,7 @@ public class RepairGenerator {
                }
            }
         }
-       cr.endblock();
+
        cr.endblock();
     }
 
index b18b08e..51a5113 100755 (executable)
@@ -64,13 +64,13 @@ public class SetInclusion extends Inclusion {
 
 
         if (dostore) {
-           if (!Compiler.REPAIR) {
+           /*      if (!Compiler.REPAIR) {
                writer.outputline("int " + addeditem + " = 1;");
                writer.outputline(addeditem + " = " + set.getSafeSymbol() + "_hash->add((int)" + vd.getSafeSymbol() 
                                  +  ", (int)" + vd.getSafeSymbol() + ");");
-           } else {
+                                 } else {*/
                Repair.generate_dispatch(writer, set, vd.getSafeSymbol());
-           }
+               //          }
            
             if (SetInclusion.worklist) {
                 writer.outputline("if (" + addeditem + ")");