this.isNewSummary = isNewSummary;
this.allocSite = allocSite;
this.alpha = alpha;
- this.alphaNew = null;
this.description = description;
+ alphaNew = new ReachabilitySet();
+ alphaNew = alphaNew.makeCanonical();
+
referencers = new HashSet<OwnershipNode>();
memberFields = new HashSet<TempDescriptor>();
}
}
- public boolean equals( HeapRegionNode hrn ) {
- assert hrn != null;
+ public boolean equals( Object o ) {
+ if( o == null ) {
+ return false;
+ }
+
+ if( !( o instanceof HeapRegionNode) ) {
+ return false;
+ }
+
+ HeapRegionNode hrn = (HeapRegionNode) o;
return id.equals( hrn.getID() ) &&
isSingleObject == hrn.isSingleObject() &&
description.equals( hrn.getDescription() );
}
+ public int hashCode() {
+ return id.intValue();
+ }
+
public boolean isSingleObject() {
public void applyAlphaNew() {
assert alphaNew != null;
- alpha = alphaNew;
- alphaNew = null;
+
+ alpha = alphaNew;
+
+ alphaNew = new ReachabilitySet();
+ alphaNew = alphaNew.makeCanonical();
}