#endif
struct typemap * allocatetypemap() {
- struct typemap *thisvar=(struct typemap *) malloc(sizeof(struct typemap));
#ifdef CHECKTYPE||CHECKMEMORY
+ struct typemap *thisvar=(struct typemap *) malloc(sizeof(struct typemap));
thisvar->alloctree=rbinit();
thisvar->typetree=rbinit();
thisvar->low=GC_linux_stack_base();
-#endif
return thisvar;
+#else
+ return NULL;
+#endif
}
void freefunction(void *ptr) {
}
void typemapreset(struct typemap *ptr) {
+#ifdef CHECKTYPE||CHECKMEMORY
rbdestroy(ptr->typetree,freefunction);
ptr->typetree=rbinit();
if (ptr->low<ptr->high)
rbdelete(ptr->low,ptr->alloctree);
else
rbdelete(ptr->high,ptr->alloctree);
+#endif
}
void initializetypemapstack(struct typemap * ptr, void *high) {
+#ifdef CHECKTYPE||CHECKMEMORY
ptr->high=high;
if (ptr->low<ptr->high)
rbinsert(ptr->low,ptr->high,NULL,ptr->alloctree);
else
rbinsert(ptr->high,ptr->low,NULL,ptr->alloctree);
+#endif
}
struct structuremap * allocatestructuremap(int s) {
generate_teardown();
CodeWriter crhead = new StandardCodeWriter(this.outputhead);
craux = new StandardCodeWriter(this.outputaux);
+ craux.outputline("return noerrors;");
craux.emptyBuffer();
craux.endblock();
craux.outputline("int abstractcount;");
}
- crhead.outputline("void doanalysis"+postfix+"(struct "+name+"_state *);");
- craux.outputline("void doanalysis"+postfix+"(struct "+name+"_state * thisvar)");
+ crhead.outputline("int doanalysis"+postfix+"(struct "+name+"_state *);");
+ craux.outputline("int doanalysis"+postfix+"(struct "+name+"_state * thisvar)");
+
craux.startblock();
craux.outputline("int highmark;"); /* This declaration is special...need it to be first */
+ craux.outputline("int noerrors=1;");
craux.startBuffer();
if (Compiler.TIME) {
cr.outputline("if (maybe)");
cr.startblock();
cr.outputline("printf(\"maybe fail " + escape(constraint.toString()) + ". \\n\");");
+ cr.outputline("noerrors=0;");
//cr.outputline("exit(1);");
cr.endblock();
cr.outputline("else if (!" + constraintboolean.getSafeSymbol() + ")");
cr.startblock();
+ cr.outputline("noerrors=0;");
if (!Compiler.REPAIR||Compiler.GENERATEDEBUGHOOKS)
cr.outputline("printf(\"fail " + escape(constraint.toString()) + ". \\n\");");