mapDescriptorToNumUpdates;
+
// allocate various structures that are not local
// to a single class method--should be done once
protected void allocateStructures() {
break;
case FKind.FlatCall: {
+ MethodDescriptor mdCaller = fmContaining.getMethod();
FlatCall fc = (FlatCall) fn;
MethodDescriptor mdCallee = fc.getMethod();
FlatMethod fmCallee = state.getMethodFlat( mdCallee );
+ boolean writeDebugDOTs =
+ mdCaller.getSymbol().equals( state.DISJOINTDEBUGCALLER ) &&
+ mdCallee.getSymbol().equals( state.DISJOINTDEBUGCALLEE );
+
// calculate the heap this call site can reach--note this is
// not used for the current call site transform, we are
rg.makeCalleeView( fc,
fmCallee,
callerNodesCopiedToCallee,
- callerEdgesCopiedToCallee
+ callerEdgesCopiedToCallee,
+ writeDebugDOTs
);
if( !heapForThisCall_cur.equals( heapForThisCall_old ) ) {
fmPossible,
rgEffect,
callerNodesCopiedToCallee,
- callerEdgesCopiedToCallee
+ callerEdgesCopiedToCallee,
+ writeDebugDOTs
);
}
makeCalleeView( FlatCall fc,
FlatMethod fm,
Set<HeapRegionNode> callerNodesCopiedToCallee,
- Set<RefEdge> callerEdgesCopiedToCallee
+ Set<RefEdge> callerEdgesCopiedToCallee,
+ boolean writeDebugDOTs
) {
// the callee view is a new graph: DON'T MODIFY
}
- /*
- try {
- rg.writeGraph( "calleeview", true, false, false, false, true, true );
- } catch( IOException e ) {}
-
-
- if( fc.getMethod().getSymbol().equals( "addSomething" ) ) {
- System.exit( 0 );
+ if( writeDebugDOTs ) {
+ try {
+ rg.writeGraph( "calleeview", true, false, false, false, true, true );
+ } catch( IOException e ) {}
}
- */
+
return rg;
}
FlatMethod fm,
ReachGraph rgCallee,
Set<HeapRegionNode> callerNodesCopiedToCallee,
- Set<RefEdge> callerEdgesCopiedToCallee
+ Set<RefEdge> callerEdgesCopiedToCallee,
+ boolean writeDebugDOTs
) {
- if( fc.getMethod().getSymbol().equals( "addBar" ) ) {
-
+ if( writeDebugDOTs ) {
try {
- writeGraph( "caller", true, false, false, false, true, true, callerNodesCopiedToCallee, callerEdgesCopiedToCallee );
+ this.writeGraph( "caller", true, false, false, false, true, true,
+ callerNodesCopiedToCallee, callerEdgesCopiedToCallee );
rgCallee.writeGraph( "callee", true, false, false, false, true, true );
} catch( IOException e ) {}
-
- //System.exit( 0 );
}
// 4. Global sweep it.
+ System.out.println( );
+
+
// 1. mark what callee elements have satisfied predicates
Set<HeapRegionNode> calleeNodesSatisfied =
)
) {
calleeNodesSatisfied.add( hrnCallee );
+
+
+
+
+
}
Iterator<RefEdge> reItr = hrnCallee.iteratorToReferencees();
}
- /*
// 3. callee elements with satisfied preds come in
// 3.a) nodes
}
// 3.c) resolve out-of-context -> callee edges
- */
+
// 4.
globalSweep();
*/
- if( fc.getMethod().getSymbol().equals( "addBar" ) ) {
-
+ if( writeDebugDOTs ) {
try {
- writeGraph( "callerAfter", true, false, false, false, true, true, null, null );
+ writeGraph( "callerAfter",
+ true, false, false, false, true, true,
+ null, null );
} catch( IOException e ) {}
-
- //System.exit( 0 );
}
}