output.println(" while(rec!=NULL) {");
output.println(" for(idx2=0;idx2<rec->index;idx2++) {");
- // HACK!!! PART OF THE allHashStructures HACK in
- // RuntimeConflictResolver.java as well, the problem
- // is that we are just using ONE hashtable for the momen
- //int weaklyConnectedComponentIndex = rcr.getWeakID(inset.get(i),fsen);
- int weaklyConnectedComponentIndex = 0;
+ int weaklyConnectedComponentIndex = rcr.getWeakID(inset.get(i),fsen);
output.println(" rcr_RETIREHASHTABLE(hashstruct["+
weaklyConnectedComponentIndex+
String strrcr=taint.isRBlockTaint()?"&record->rcrRecords["+index+"], ":"NULL, ";
String tasksrc=taint.isRBlockTaint()?"(SESEcommon *) record, ":"(SESEcommon *)(((INTPTR)record)|1LL), ";
-
-
- // YUCKY HACK FOR NOW, ALWAYS USE ONE HASH TABLE
- // (CONSVERATIVELY PUT ALL PARAMS INTO ONE CONNECTED COMPONENT)
- // UNTIL WE FIGURE OUT WHY YOU SOMETIMES GET DIFFERENT
- // heaprootNum VALUES WHEN THEY SHOULD BE THE SAME
- // We should use the commented lines in the if statements...
- int heaprootNum = 0;
//Do call if we need it.
if(primConfWrite||objConfWrite) {
- //int heaprootNum = connectedHRHash.get(taint).id;
+ int heaprootNum = connectedHRHash.get(taint).id;
assert heaprootNum != -1;
int allocSiteID = connectedHRHash.get(taint).getWaitingQueueBucketNum(curr);
int traverserID = doneTaints.get(taint);
else
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;
+ int heaprootNum = connectedHRHash.get(taint).id;
assert heaprootNum != -1;
int allocSiteID = connectedHRHash.get(taint).getWaitingQueueBucketNum(curr);
int traverserID = doneTaints.get(taint);
num2WeaklyConnectedHRGroup.add(weaklyConnectedHRCounter, hg);
weaklyConnectedHRCounter++;
}
+
if(t.isRBlockTaint()) {
- int id=connectedHRHash.get(t).id;
- Tuple tup=new Tuple(t.getVar(),t.getSESE());
- if (weakMap.containsKey(tup)) {
- if (weakMap.get(tup).intValue()!=id)
- throw new Error("Var/SESE not unique for weak component.");
- } else weakMap.put(tup, new Integer(id));
+ int id=connectedHRHash.get(t).id;
+ Tuple tup=new Tuple(t.getVar(),t.getSESE());
+ if (weakMap.containsKey(tup)) {
+ if (weakMap.get(tup).intValue()!=id)
+ throw new Error("Var/SESE not unique for weak component.");
+ } else
+ weakMap.put(tup, new Integer(id));
}
}
}
Iterator<Taint> it = oldGroup.connectedHRs.iterator();
Taint relatedTaint;
- while((relatedTaint = it.next()) != null && !connectedHRs.contains(relatedTaint)) {
- this.add(relatedTaint);
+ while(it.hasNext() && (relatedTaint = it.next()) != null) {
+ if(!connectedHRs.contains(relatedTaint)){
+ this.add(relatedTaint);
+ }
}
}
}