return s;
}
+ public boolean equalsSpecific( Object o ) {
+ if( o == null ) {
+ return false;
+ }
+
+ if( !(o instanceof AllocSite) ) {
+ return false;
+ }
+
+ AllocSite as = (AllocSite) o;
+
+ return this.id == as.id;
+ }
public int hashCodeSpecific() {
return id;
return canonicalValue;
}
+
+
+ abstract public boolean equalsSpecific( Object o );
+
+ final public boolean equals( Object o ) {
+ if( o == null ) {
+ return false;
+ }
+
+ if( !(o instanceof Canonical) ) {
+ return false;
+ }
+
+ Canonical c = (Canonical) o;
+
+ if( this.canonicalValue == 0 ||
+ c.canonicalValue == 0
+ ) {
+ return equalsSpecific( o );
+ }
+
+ return this.canonicalValue == c.canonicalValue;
+ }
+
// canonical objects should never be modified
// and therefore have changing hash codes, so
private boolean hasHash = false;
private int oldHash;
final public int hashCode() {
+
+ // the quick mode
+ if( DisjointAnalysis.releaseMode && hasHash ) {
+ return oldHash;
+ }
+
+ // the safe mode
int hash = hashCodeSpecific();
if( hasHash ) {
}
-
-
// mapping of a non-trivial operation to its result
private static Hashtable<CanonicalOp, Canonical>
op2result = new Hashtable<CanonicalOp, Canonical>();
}
- public boolean equals(Object o) {
+ public boolean equalsSpecific( Object o ) {
if( o == null ) {
return false;
}
}
- public boolean equals( Object o ) {
+ public boolean equalsSpecific( Object o ) {
if( o == null ) {
return false;
}
}
+ // run in faster mode, only when bugs wrung out!
+ public static boolean releaseMode;
+
// data from the compiler
public State state;
public CallGraph callGraph;
ArrayReferencees arrayReferencees
) throws java.io.IOException {
- analysisComplete = false;
+ analysisComplete = false;
this.state = state;
this.typeUtil = typeUtil;
this.liveness = liveness;
this.arrayReferencees = arrayReferencees;
this.allocationDepth = state.DISJOINTALLOCDEPTH;
+ this.releaseMode = state.DISJOINTRELEASEMODE;
this.writeFinalDOTs = state.DISJOINTWRITEDOTS && !state.DISJOINTWRITEALL;
this.writeAllIncrementalDOTs = state.DISJOINTWRITEDOTS && state.DISJOINTWRITEALL;
- public boolean equals( Object o ) {
+ public boolean equalsSpecific( Object o ) {
if( o == null ) {
return false;
}
}
- public boolean equals( Object o ) {
+ public boolean equalsSpecific( Object o ) {
if( o == null ) {
return false;
}
}
- public boolean equals( Object o ) {
+ public boolean equalsSpecific( Object o ) {
if( o == null ) {
return false;
}
}
- public boolean equals( Object o ) {
+ public boolean equalsSpecific( Object o ) {
if( o == null ) {
return false;
}
}
- public boolean equals( Object o ) {
+ public boolean equalsSpecific( Object o ) {
if( o == null ) {
return false;
}
#SNAPFLAGS= -disjoint-debug-snap-method innerKMeansSetting 1 20 true
-BSFLAGS= -recover -justanalyze -disjoint -disjoint-k 1 -disjoint-write-dots final -disjoint-alias-file aliases.txt normal -enable-assertions
+#BSFLAGS= -recover -justanalyze -disjoint -disjoint-k 1 -disjoint-write-dots final -disjoint-alias-file aliases.txt normal -enable-assertions
+BSFLAGS= -recover -justanalyze -disjoint -disjoint-k 1 -disjoint-write-dots final -disjoint-alias-file aliases.txt normal -disjoint-release-mode
all:
$(BUILDSCRIPT) $(BSFLAGS) $(DEBUGFLAGS) $(SNAPFLAGS) *.java
public String OWNERSHIPDEBUGCALLER=null;
public boolean DISJOINT=false;
+ public boolean DISJOINTRELEASEMODE=false;
public int DISJOINTALLOCDEPTH=3;
public boolean DISJOINTWRITEDOTS=false;
public boolean DISJOINTWRITEALL=false;
} else {
throw new Error("disjoint-debug-snap-method requires arguments <method symbol> <# visit to start> <# visits to snap> <T/F stop after>");
}
+
+ } else if( option.equals( "-disjoint-release-mode" ) ) {
+ state.DISJOINTRELEASEMODE = true;
}
+
else if (option.equals("-optional"))
state.OPTIONAL=true;