From: stephey Date: Sat, 23 Oct 2010 23:03:37 +0000 (+0000) Subject: Fixed bug (for reals this time) where there will be multiple traversals on the same... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=74f6c6f4a58362a3db8f18f134a985586e04118b;p=IRC.git Fixed bug (for reals this time) where there will be multiple traversals on the same field. Turns out the .equals for ConcreteRuntimeObjNode was done incorrectly. Working on next task: +using switch statements for checking fields. +Treating arrays the same as any field (inlinable) --- diff --git a/Robust/src/IR/Flat/RuntimeConflictResolver.java b/Robust/src/IR/Flat/RuntimeConflictResolver.java index 6eb378b1..ac3422c6 100644 --- a/Robust/src/IR/Flat/RuntimeConflictResolver.java +++ b/Robust/src/IR/Flat/RuntimeConflictResolver.java @@ -1294,8 +1294,11 @@ public class RuntimeConflictResolver { } @Override - public boolean equals(Object obj) { - return original.equals(obj); + public boolean equals(Object other) { + if(other == null || !(other instanceof ConcreteRuntimeObjNode)) + return false; + + return original.equals(((ConcreteRuntimeObjNode)other).original); } public int getAllocationSite() { @@ -1342,8 +1345,9 @@ public class RuntimeConflictResolver { ObjRef other = objectRefs.get(objectRefs.indexOf(ref)); other.mergeWith(ref); } - else + else { objectRefs.add(ref); + } } public boolean isObjectArray() {