Record that we allocated a new object.
[repair.git] / Repair / RepairCompiler / MCC / IR / Sources.java
index 73af6898033014c7e4459edcfb1d90e88793d178..da41331993a17e23987906569d991798bde6b30b 100755 (executable)
@@ -45,7 +45,7 @@ public class Sources {
        e.generate(cr, size);
        cr.popSymbolTable();
        cr.outputline(td.getGenerateType().getSafeSymbol()+" "+vd.getSafeSymbol()+"=("+td.getGenerateType().getSafeSymbol()+") calloc(1,"+size.getSafeSymbol()+");");
-       
+       cr.outputline("alloc("+vd.getSafeSymbol()+","+size.getSafeSymbol()+");");
        if (Compiler.ALLOCATECPLUSPLUS) {
            if (td instanceof StructureTypeDescriptor) {
                if (((StructureTypeDescriptor)td).size()>0) {
@@ -54,7 +54,7 @@ public class Sources {
                        String vtable="_ZTV";
                        vtable+=td.getSymbol().length();
                        vtable+=td.getSymbol();
-                       cr.outputline("((int**) &"+vd.getSafeSymbol()+")[0] = (int *)"+vtable+"+2;");
+                       cr.outputline("((int**) "+vd.getSafeSymbol()+")[0] = (int *) & "+vtable+"+2;");
                    }
                }
            }