+ } else {
+ if (delaycomp.optimizeTrans(lb, faen.getAtomicEnter())&&(!state.STMARRAY||state.DUALVIEW)) {
+ AtomicRecord ar=atomicmethodmap.get(faen.getAtomicEnter());
+ output.println("LIGHTWEIGHTCOMMIT("+ar.name+", &primitives_"+ar.name+", &"+localsprefix+", "+paramsprefix+", transretry"+faen.getAtomicEnter().getIdentifier()+");");
+ //copy out
+ for(Iterator<TempDescriptor> tmpit=ar.liveout.iterator();tmpit.hasNext();) {
+ TempDescriptor tmp=tmpit.next();
+ output.println(tmp.getSafeSymbol()+"=primitives_"+ar.name+"."+tmp.getSafeSymbol()+";");
+ }
+ } else if (delaycomp.needsFission(lb, faen.getAtomicEnter())) {
+ AtomicRecord ar=atomicmethodmap.get(faen.getAtomicEnter());
+ //do call
+ output.println("if (transCommit((void (*)(void *, void *, void *))&"+ar.name+", &primitives_"+ar.name+", &"+localsprefix+", "+paramsprefix+")) {");
+ output.println("if (unlikely(needtocollect)) checkcollect("+localsprefixaddr+");");
+ output.println("goto transretry"+faen.getAtomicEnter().getIdentifier()+";");
+ output.println("}");
+ //copy out
+ output.println("else {");
+ for(Iterator<TempDescriptor> tmpit=ar.liveout.iterator();tmpit.hasNext();) {
+ TempDescriptor tmp=tmpit.next();
+ output.println(tmp.getSafeSymbol()+"=primitives_"+ar.name+"."+tmp.getSafeSymbol()+";");
+ }
+ output.println("}");
+ } else {
+ output.println("if (transCommit(NULL, NULL, NULL, NULL)) {");
+ output.println("if (unlikely(needtocollect)) checkcollect("+localsprefixaddr+");");
+ output.println("goto transretry"+faen.getAtomicEnter().getIdentifier()+";");
+ output.println("}");
+ }