From ab6d009292bac1b2eb2102c3c1926368496a3faa Mon Sep 17 00:00:00 2001 From: bdemsky Date: Fri, 25 Mar 2011 21:34:22 +0000 Subject: [PATCH] changes --- Robust/src/IR/Flat/RuntimeConflictResolver.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Robust/src/IR/Flat/RuntimeConflictResolver.java b/Robust/src/IR/Flat/RuntimeConflictResolver.java index 8014d1cc..24529164 100644 --- a/Robust/src/IR/Flat/RuntimeConflictResolver.java +++ b/Robust/src/IR/Flat/RuntimeConflictResolver.java @@ -43,7 +43,7 @@ public class RuntimeConflictResolver { private State globalState; // initializing variables can be found in printHeader() - private static final String allocSiteInC = "allocsite"; + private static final String allocSite = "allocsite"; private static final String queryAndAddToVistedHashtable = "hashRCRInsert"; private static final String enqueueInC = "enqueueRCRQueue("; private static final String dequeueFromQueueInC = "dequeueRCRQueue()"; @@ -184,7 +184,7 @@ public class RuntimeConflictResolver { cFile.println(" if(traverserState=="+state.getID()+") {"); } - printAllocChecksInsideState("ptr->allocsite", state, taskOrStallSite, var, "ptr", 0, weakID); + printAllocChecksInsideState(state, taskOrStallSite, var, "ptr", 0, weakID); cFile.println(" break;"); } @@ -223,11 +223,11 @@ public class RuntimeConflictResolver { cFile.flush(); } - public void printAllocChecksInsideState(String input, SMFEState state, FlatNode fn, TempDescriptor tmp, String prefix, int depth, int weakID) { + public void printAllocChecksInsideState(SMFEState state, FlatNode fn, TempDescriptor tmp, String prefix, int depth, int weakID) { EffectsTable et = new EffectsTable(state); boolean needswitch=et.getAllAllocs().size()>1; if (needswitch) { - cFile.println(" switch(" + input + ") {"); + cFile.println(" switch(" + prefix+"->"+allocSite + ") {"); } //we assume that all allocs given in the effects are starting locs. @@ -235,9 +235,9 @@ public class RuntimeConflictResolver { if (needswitch) { cFile.println(" case "+a.getUniqueAllocSiteID()+": {"); } else { - cFile.println(" if("+input+"=="+a.getUniqueAllocSiteID()+") {"); + cFile.println(" if("+prefix+"->"+allocSite+"=="+a.getUniqueAllocSiteID()+") {"); } - addChecker(a, fn, tmp, state, et, input, 0, weakID); + addChecker(a, fn, tmp, state, et, prefix, 0, weakID); if (needswitch) { cFile.println(" }"); cFile.println(" break;"); @@ -291,7 +291,7 @@ public class RuntimeConflictResolver { cFile.println(" "+currPtr+"= (struct ___Object___ * ) " + childPtr + ";"); cFile.println(" if (" + currPtr + " != NULL) { "); - printAllocChecksInsideState(currPtr+"->"+allocSiteInC, tr, fn, tmp, currPtr, pdepth+1, weakID); + printAllocChecksInsideState(tr, fn, tmp, currPtr, pdepth+1, weakID); cFile.println(" }"); //break for internal switch and if } else { //non-inlineable cases -- 2.34.1