JavaBuilder javabuilder;
String strObjType;
- int boundschknum = 0;
public BuildCode(State st, Hashtable temptovar, TypeUtil typeutil, CallGraph callgraph, JavaBuilder javabuilder) {
this(st, temptovar, typeutil, null, callgraph, javabuilder);
outclassdefs.println(" volatile int notifycount;");
outclassdefs.println(" volatile int objlock;");
if(state.MULTICOREGC) {
- outclassdefs.println(" int marked;");
+ //outclassdefs.println(" int marked;");
}
}
if (state.TASK) {
outclassdefs.println(" int mutex;");
outclassdefs.println(" volatile int lockcount;");
if(state.MULTICOREGC) {
- outclassdefs.println(" int marked;");
+ //outclassdefs.println(" int marked;");
}
}
if(state.OPTIONAL) {
classdefout.println(" volatile int notifycount;");
classdefout.println(" volatile int objlock;");
if(state.MULTICOREGC) {
- classdefout.println(" int marked;");
+ //classdefout.println(" int marked;");
}
}
if (state.TASK) {
classdefout.println(" int mutex;");
classdefout.println(" volatile int lockcount;");
if(state.MULTICOREGC) {
- classdefout.println(" int marked;");
+ //classdefout.println(" int marked;");
}
}
if (state.OPTIONAL) {
bcx.additionalCodePreNode(fm, fn, output);
}
+
switch(fn.kind()) {
case FKind.FlatAtomicEnterNode:
generateFlatAtomicEnterNode(fm, (FlatAtomicEnterNode) fn, output);
if (this.state.ARRAYBOUNDARYCHECK && fen.needsBoundsCheck()) {
output.println("if (unlikely(((unsigned int)"+generateTemp(fm, fen.getIndex())+") >= "+generateTemp(fm,fen.getSrc()) + "->___length___))");
- output.println("failedboundschk(" + (boundschknum++) + ");");
+ output.println("failedboundschk(__LINE__, " +generateTemp(fm, fen.getIndex()) +", "+ generateTemp(fm, fen.getSrc()) + ");");
}
output.println(generateTemp(fm, fen.getDst())+"=(("+ type+"*)(((char *) &("+ generateTemp(fm,fen.getSrc())+"->___length___))+sizeof(int)))["+generateTemp(fm, fen.getIndex())+"];");
+ if (fen.getDst().getType().isPtr())
+ ;
}
protected void generateFlatSetElementNode(FlatMethod fm, FlatSetElementNode fsen, PrintWriter output) {
if (this.state.ARRAYBOUNDARYCHECK && fsen.needsBoundsCheck()) {
output.println("if (unlikely(((unsigned int)"+generateTemp(fm, fsen.getIndex())+") >= "+generateTemp(fm,fsen.getDst()) + "->___length___))");
- output.println("failedboundschk(" + (boundschknum++) + ");");
+ output.println("failedboundschk(__LINE__, " +generateTemp(fm, fsen.getIndex()) +", "+ generateTemp(fm, fsen.getDst()) + ");");
}
if (state.FASTCHECK) {
String dst=generateTemp(fm, fsen.getDst());
output.println(dst+"->"+nextobjstr+"="+fcrevert+";");
output.println(fcrevert+"=(struct ___Object___ *)"+dst+";");
}
-
for(BuildCodeExtension bcx: extensions) {
bcx.additionalCodeNewObject(output, dst, fn);
}