From: bdemsky Date: Wed, 3 Nov 2010 10:35:16 +0000 (+0000) Subject: code changes X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8c6d20ccf9ba2a3a2c3319c32bf53914f18093c6;p=IRC.git code changes --- diff --git a/Robust/src/IR/Flat/RuntimeConflictResolver.java b/Robust/src/IR/Flat/RuntimeConflictResolver.java index 8c856eb5..aeaa4050 100644 --- a/Robust/src/IR/Flat/RuntimeConflictResolver.java +++ b/Robust/src/IR/Flat/RuntimeConflictResolver.java @@ -748,7 +748,7 @@ public class RuntimeConflictResolver { } } - int index=-1; + int index=0; if (taint.isRBlockTaint()) { FlatSESEEnterNode fsese=taint.getSESE(); TempDescriptor tmp=taint.getVar(); @@ -756,6 +756,7 @@ public class RuntimeConflictResolver { } String strrcr=taint.isRBlockTaint()?"&record->rcrRecords["+index+"], ":"NULL, "; + String tasksrc=taint.isRBlockTaint()?"(SESEcommon *) record, ":"(SESEcommon *)(((INTPTR)record)&1LL), "; //Do call if we need it. if(primConfWrite||objConfWrite) { @@ -765,9 +766,9 @@ public class RuntimeConflictResolver { int traverserID = doneTaints.get(taint); currCase.append(" int tmpkey"+depth+"=rcr_generateKey("+prefix+");\n"); if (objConfRead) - currCase.append(" int tmpvar"+depth+"=rcr_WTWRITEBINCASE(allHashStructures["+heaprootNum+"], tmpkey"+depth+", (SESEcommon *) record, "+strrcr+index+");\n"); + currCase.append(" int tmpvar"+depth+"=rcr_WTWRITEBINCASE(allHashStructures["+heaprootNum+"], tmpkey"+depth+", "+tasksrc+strrcr+index+");\n"); else - currCase.append(" int tmpvar"+depth+"=rcr_WRITEBINCASE(allHashStructures["+heaprootNum+"], tmpkey"+depth+", (SESEcommon *) record, "+strrcr+index+");\n"); + currCase.append(" int tmpvar"+depth+"=rcr_WRITEBINCASE(allHashStructures["+heaprootNum+"], tmpkey"+depth+", "+ tasksrc+strrcr+index+");\n"); } else if (primConfRead||objConfRead) { int heaprootNum = connectedHRHash.get(taint).id; assert heaprootNum != -1; @@ -775,9 +776,9 @@ public class RuntimeConflictResolver { int traverserID = doneTaints.get(taint); currCase.append(" int tmpkey"+depth+"=rcr_generateKey("+prefix+");\n"); if (objConfRead) - currCase.append(" int tmpvar"+depth+"=rcr_WTREADBINCASE(allHashStructures["+heaprootNum+"], tmpkey"+depth+", (SESEcommon *) record, "+strrcr+index+");\n"); + currCase.append(" int tmpvar"+depth+"=rcr_WTREADBINCASE(allHashStructures["+heaprootNum+"], tmpkey"+depth+", "+tasksrc+strrcr+index+");\n"); else - currCase.append(" int tmpvar"+depth+"=rcr_READBINCASE(allHashStructures["+heaprootNum+"], tmpkey"+depth+", (SESEcommon *) record, "+strrcr+index+");\n"); + currCase.append(" int tmpvar"+depth+"=rcr_READBINCASE(allHashStructures["+heaprootNum+"], tmpkey"+depth+", "+tasksrc+strrcr+index+");\n"); } if(primConfWrite||objConfWrite||primConfRead||objConfRead) {