Small changes to allow:
[repair.git] / Repair / RepairCompiler / MCC / IR / RepairGenerator.java
index 2ece34467b8c1b6f41db3b85f6ff185d1c424198..cf2b98d22604ef4cc0a10b788470315a9e9dca97 100755 (executable)
@@ -57,7 +57,6 @@ public class RepairGenerator {
        }
     }
 
-
     private void name_updates() {
        int count=0;
        for(Iterator it=termination.updatenodes.iterator();it.hasNext();) {
@@ -494,7 +493,7 @@ public class RepairGenerator {
                 craux.outputline(relation.getSafeSymbol() + "_hashinv = noargallocateSimpleHash();");
             }
         }
-
+        craux.outputline("return thisvar;");
         craux.endblock();
         crhead.outputline("};");
         craux.outputline("void free"+name+"(struct "+ name +"* thisvar)");
@@ -547,7 +546,9 @@ public class RepairGenerator {
        crhead.outputline("void doanalysis(struct "+name+"_state *);");
        craux.outputline("void doanalysis(struct "+name+"_state * thisvar)");
        craux.startblock();
+       craux.outputline("int highmark;"); /* This declaration is special...need it to be first */
        craux.startBuffer();
+
        if (Compiler.TIME) {
            craux.outputline("struct timeval _begin_time,_end_time;");
            craux.outputline("gettimeofday(&_begin_time,NULL);");
@@ -557,7 +558,7 @@ public class RepairGenerator {
            craux.outputline("rebuildcount=0;");
            craux.outputline("abstractcount=0;");
        }
-       craux.addDeclaration("int","highmark");
+
 
        craux.addDeclaration("struct "+name+ " * ",oldmodel.getSafeSymbol());
        craux.outputline(oldmodel.getSafeSymbol()+"=0;");