rg.merge(rgPrevContext);
mapDescriptorToInitialContext.put(d, rg);
+ if( doDefiniteReachAnalysis ) {
+ FlatMethod fm = (FlatMethod) fn;
+ Set<TempDescriptor> params = new HashSet<TempDescriptor>();
+ for( int i = 0; i < fm.numParameters(); ++i ) {
+ params.add( fm.getParameter( i ) );
+ }
+ definiteReachAnalysis.methodEntry( fn, params );
+ }
} break;
case FKind.FlatOpNode:
// transfer func
rg.assignTempXEqualToTempY(lhs, rhs);
+
+ if( doDefiniteReachAnalysis ) {
+ definiteReachAnalysis.copy( fn, lhs, rhs );
+ }
}
break;
// transfer func
rg.assignTempXEqualToCastedTempY(lhs, rhs, td);
+
+ if( doDefiniteReachAnalysis ) {
+ definiteReachAnalysis.copy( fn, lhs, rhs );
+ }
break;
case FKind.FlatFieldNode:
if( shouldAnalysisTrack(fld.getType() ) ) {
// transfer func
rg.assignTempXEqualToTempYFieldF(lhs, rhs, fld, fn);
+
+ if( doDefiniteReachAnalysis ) {
+ definiteReachAnalysis.load( fn, lhs, rhs, fld );
+ }
}
// after transfer, use updated graph to
if( shouldAnalysisTrack(fld.getType() ) ) {
// transfer func
strongUpdate = rg.assignTempXFieldFEqualToTempY(lhs, fld, rhs, fn);
+
+ if( doDefiniteReachAnalysis ) {
+ definiteReachAnalysis.store( fn, lhs, fld, rhs );
+ }
}
// use transformed graph to do effects analysis
if( shouldAnalysisTrack(lhs.getType() ) ) {
// transfer func
rg.assignTempXEqualToTempYFieldF(lhs, rhs, fdElement, fn);
+
+ if( doDefiniteReachAnalysis ) {
+ definiteReachAnalysis.load( fn, lhs, rhs, fdElement );
+ }
}
// use transformed graph to do effects analysis
if( !arrayReferencees.doesNotCreateNewReaching(fsen) ) {
rg.assignTempXFieldFEqualToTempY(lhs, fdElement, rhs, fn);
}
+
+ if( doDefiniteReachAnalysis ) {
+ definiteReachAnalysis.store( fn, lhs, fdElement, rhs );
+ }
}
// use transformed graph to do effects analysis
// transfer func
rg.assignTempEqualToNewAlloc(lhs, as);
+
+ if( doDefiniteReachAnalysis ) {
+ definiteReachAnalysis.newObject( fn, lhs );
+ }
}
break;
FlatMethod fmCallee = state.getMethodFlat(mdCallee);
-
-
-
-
-
+ if( doDefiniteReachAnalysis ) {
+ definiteReachAnalysis.methodCall( fn, fc.getReturnTemp() );
+ }
// the transformation for a call site should update the