boolean summary;
FlatNew node;
AllocSiteNode as;
-
+
public AllocNode(int allocsite, FlatNew node, boolean summary) {
this.allocsite=allocsite;
this.summary=summary;
public boolean isSummary() {
return summary;
}
-
+
public int hashCode() {
return allocsite<<1^(summary?0:1);
}
-
+
public boolean equals(Object o) {
if (o instanceof AllocNode) {
- AllocNode an=(AllocNode)o;
- return (allocsite==an.allocsite)&&(summary==an.summary);
+ AllocNode an=(AllocNode)o;
+ return (allocsite==an.allocsite)&&(summary==an.summary);
}
return false;
}
public String getID() {
if (summary)
- return "SUM"+allocsite;
+ return "SUM"+allocsite;
else
- return "SING"+allocsite;
+ return "SING"+allocsite;
}
}
public static class AllocSiteNode implements Alloc {
int allocsite;
FlatNew node;
-
+
public AllocSiteNode(int allocsite, FlatNew node) {
this.allocsite=allocsite;
this.node=node;
public int hashCode() {
return allocsite;
}
-
+
public boolean equals(Object o) {
if (o instanceof AllocSiteNode) {
- AllocSiteNode an=(AllocSiteNode)o;
- return (allocsite==an.allocsite);
+ AllocSiteNode an=(AllocSiteNode)o;
+ return (allocsite==an.allocsite);
}
return false;
}
public String toStringBrief() {
return getID();
}
-
+
public String toString() {
return getID();
}
TypeDescriptor stringtd=new TypeDescriptor(stringcd);
TypeDescriptor stringarraytd=stringtd.makeArray(state);
StringArray=new AllocNode(0, new FlatNew(stringarraytd, null, false), false);
+ StringArray.as=getAllocSite(StringArray);
Strings=new AllocNode(1, new FlatNew(stringtd, null, false), true);
+ Strings.as=getAllocSite(Strings);
}
public int getSiteNumber(FlatNew node) {