return "E";
else if (g==LocalityAnalysis.CONFLICT)
return "C";
- else throw new Error();
+ else if (g==LocalityAnalysis.SCRATCH)
+ return "S";
+ else if (g==LocalityAnalysis.NORMAL)
+ return "R";
+ else if (g==(LocalityAnalysis.STMCONFLICT))
+ return "C";
+ else if (g==(LocalityAnalysis.STMEITHER))
+ return "E";
+ else throw new Error("unknown value"+g);
}
public String getSignature() {
st+="[static] ";
} else {
if (isglobalthis.equals(LocalityAnalysis.LOCAL))
- st+="[local] ";
+ st+="[local] ";
else if (isglobalthis.equals(LocalityAnalysis.GLOBAL))
- st+="[global] ";
+ st+="[global] ";
else if (isglobalthis.equals(LocalityAnalysis.EITHER))
- st+="[either] ";
+ st+="[either] ";
else if (isglobalthis.equals(LocalityAnalysis.CONFLICT))
- st+="[conflict] ";
+ st+="[conflict] ";
+ else
+ st+="[this="+isglobalthis+"]";
}
for(int i=0; i<isglobal.length; i++)
if (isglobal[i]==null)
- st+="NULL";
+ st+="NULL";
else if (isglobal[i].equals(LocalityAnalysis.LOCAL))
- st+="local ";
+ st+="local ";
else if (isglobal[i].equals(LocalityAnalysis.GLOBAL))
- st+="global ";
+ st+="global ";
else if (isglobal[i].equals(LocalityAnalysis.EITHER))
- st+="either ";
+ st+="either ";
else if (isglobal[i].equals(LocalityAnalysis.CONFLICT))
- st+="conflict ";
+ st+="conflict ";
+ else
+ st+="["+isglobal[i]+"]";
return st;
}
return false;
for(int i=0; i<isglobal.length; i++)
if (!equiv(isglobal[i],lb.isglobal[i]))
- return false;
+ return false;
if (!equiv(isglobalthis, lb.isglobalthis))
return false;
if (a==null) {
return b==null;
} else if (b==null) {
- //a is not null
- return false;
+ return a==null;
} else return a.equals(b);
}
if (o instanceof LocalityBinding) {
LocalityBinding lb=(LocalityBinding)o;
if (md!=lb.md)
- return false;
+ return false;
for(int i=0; i<isglobal.length; i++)
- if (!equiv(isglobal[i], lb.isglobal[i]))
- return false;
+ if (!equiv(isglobal[i], lb.isglobal[i]))
+ return false;
if (!equiv(isglobalthis, lb.isglobalthis))
- return false;
+ return false;
return (isatomic==lb.isatomic);
}
return false;
int hashcode=md.hashCode();
for(int i=0; i<isglobal.length; i++) {
if (isglobal[i]!=null)
- hashcode=hashcode*31+(isglobal[i].intValue());
+ hashcode=hashcode*31+(isglobal[i].intValue());
}
- hashcode=hashcode*31+(isatomic ? 1 : 0);
+ hashcode=hashcode*31+(isatomic?1:0);
return hashcode;
}
}