// special field descriptors for array elements
private Hashtable<TypeDescriptor, FieldDescriptor> mapTypeToArrayField;
+ public static final String arrayElementFieldName = "___element_";
// special field descriptors for variables with type, no field name
private Hashtable<TypeDescriptor, FieldDescriptor> mapTypeToVarField;
if( d instanceof MethodDescriptor ) {
MethodDescriptor md = (MethodDescriptor) d;
Set dependents = callGraph.getCallerSet(md);
+
if( dependents != null ) {
Iterator depItr = dependents.iterator();
while( depItr.hasNext() ) {
Iterator<MethodContext> itrmc = mcs.iterator();
while( itrmc.hasNext() ) {
- methodContextsToVisit.add( itrmc.next() );
+ MethodContext methodcontext=itrmc.next();
+ methodContextsToVisit.add( methodcontext );
}
}
}
returnNodesToCombineForCompleteOwnershipGraph,
og);
+
/*
- if( mc.getDescriptor().getSymbol().equals( "addFlightPlan" ) ) {
+ if( mc.getDescriptor().getSymbol().equals( "main" ) ) {
debugSnapshot(og,fn);
}
*/
paramIndex );
} else {
// this parameter is not aliased to others, give it
- // a fresh parameter heap region
-
+ // a fresh parameter heap region
og.assignTempEqualToParamAlloc(tdParam,
mc.getDescriptor() instanceof TaskDescriptor,
paramIndex );
FlatCastNode fcn = (FlatCastNode) fn;
lhs = fcn.getDst();
rhs = fcn.getSrc();
+
TypeDescriptor td = fcn.getType();
assert td != null;
if( fdElement == null ) {
fdElement = new FieldDescriptor(new Modifiers(Modifiers.PUBLIC),
tdElement,
- "_element",
+ arrayElementFieldName,
null,
false);
mapTypeToArrayField.put( tdElement, fdElement );
if( fdElement == null ) {
fdElement = new FieldDescriptor(new Modifiers(Modifiers.PUBLIC),
tdElement,
- "_element",
+ arrayElementFieldName,
null,
false);
mapTypeToArrayField.put( tdElement, fdElement );
Set<Integer> aliasedParamIndices =
ogMergeOfAllPossibleCalleeResults.calculateAliasedParamSet(fc, md.isStatic(), flatm);
- MethodContext mcNew = new MethodContext( md, aliasedParamIndices );
+
+ MethodContext mcNew = new MethodContext( md, aliasedParamIndices );
+ Set contexts = mapDescriptorToAllMethodContexts.get( md );
+ assert contexts != null;
+ contexts.add( mcNew );
+
OwnershipGraph onlyPossibleCallee = mapMethodContextToCompleteOwnershipGraph.get( mcNew );
if( onlyPossibleCallee == null ) {
methodContextsToVisit.add( mcNew );
} else {
- ogMergeOfAllPossibleCalleeResults.resolveMethodCall(fc, md.isStatic(), flatm, onlyPossibleCallee);
+ ogMergeOfAllPossibleCalleeResults.resolveMethodCall(fc, md.isStatic(), flatm, onlyPossibleCallee, mc);
}
} else {
Set<Integer> aliasedParamIndices =
ogCopy.calculateAliasedParamSet(fc, possibleMd.isStatic(), pflatm);
+
MethodContext mcNew = new MethodContext( possibleMd, aliasedParamIndices );
+ Set contexts = mapDescriptorToAllMethodContexts.get( md );
+ assert contexts != null;
+ contexts.add( mcNew );
+
OwnershipGraph ogPotentialCallee = mapMethodContextToCompleteOwnershipGraph.get( mcNew );
if( ogPotentialCallee == null ) {
methodContextsToVisit.add( mcNew );
} else {
- ogCopy.resolveMethodCall(fc, possibleMd.isStatic(), pflatm, ogPotentialCallee);
+ ogCopy.resolveMethodCall(fc, possibleMd.isStatic(), pflatm, ogPotentialCallee, mc);
}
ogMergeOfAllPossibleCalleeResults.merge(ogCopy);