return getAllocationSiteFromFlatNewPRIVATE(fn);
}
+ public AllocationSite getAllocationSiteFromHeapRegionNodeID(Integer id) {
+ return mapHrnIdToAllocationSite.get(id);
+ }
public Set<HeapRegionNode> createsPotentialAliases(Descriptor taskOrMethod,
int paramIndex1,
bw.write( "\n"+computeAliasContextHistogram() );
bw.close();
}
-
-
-
-
- /*
- getFlaggedAllocationSitesReachableFromTask(TaskDescriptor td) {
- return getFlaggedAllocationSitesReachableFromTaskPRIVATE(td);
- }
-
- public AllocationSite getAllocationSiteFromFlatNew(FlatNew fn) {
- return getAllocationSiteFromFlatNewPRIVATE(fn);
- }
- */
-
- // return the set of allocation sites for the object that the
- // given variable may reference at the given program point
- public Set<AllocationSite> possible( TempDescriptor temp,
- FlatNode ppoint ) {
- assert temp != null;
- assert ppoint != null;
-
- /*
- OwnershipGraph og = new OwnershipGraph( allocationDepth, typeUtil );
-
- assert mapDescriptorToAllMethodContexts.containsKey( d );
- HashSet<MethodContext> contexts = mapDescriptorToAllMethodContexts.get( d );
- Iterator<MethodContext> mcItr = contexts.iterator();
- while( mcItr.hasNext() ) {
- MethodContext mc = mcItr.next();
-
- OwnershipGraph ogContext = mapMethodContextToCompleteOwnershipGraph.get(mc);
- assert ogContext != null;
-
- og.merge( ogContext );
- }
-
- return og;
- */
-
- return null;
- }
///////////////////////////////////////////
//
// end public interface
private Hashtable<MethodContext, Integer> mapMethodContextToNumUpdates;
private Hashtable<Descriptor, HashSet<MethodContext> > mapDescriptorToAllMethodContexts;
private Hashtable<MethodContext, HashSet<MethodContext> > mapMethodContextToDependentContexts;
+ private Hashtable<Integer, AllocationSite> mapHrnIdToAllocationSite;
// Use these data structures to track progress of one pass of
// processing the FlatNodes of a particular method
mapDescriptorToPriority =
new Hashtable<Descriptor, Integer>();
+ mapHrnIdToAllocationSite =
+ new Hashtable<Integer, AllocationSite>();
+
if( writeAllDOTs ) {
mapMethodContextToNumUpdates = new Hashtable<MethodContext, Integer>();
for( int i = 0; i < allocationDepth; ++i ) {
Integer id = generateUniqueHeapRegionNodeID();
as.setIthOldest(i, id);
+ mapHrnIdToAllocationSite.put( id, as );
}
// the oldest node is a summary node
--- /dev/null
+package Analysis.OwnershipAnalysis;
+
+import IR.*;
+import IR.Flat.*;
+import java.util.*;
+
+// This class is useful to instantiate from objects out
+// of a completed analysis. Given a method's reachability
+// graph and a call site, what heap regions might the
+// parameter regions be decomposed into?
+//
+// Also you can build a call chain by constructing
+// a new decomposition from another decomp and a
+// flat call one step back in the chain.
+public class ParameterDecomposition {
+
+ // used to help user realize when they are
+ // asking for results of an invalid call chain
+ MethodDescriptor mdCallee;
+ MethodDescriptor mdCaller;
+
+ public ParameterDecomposition( MethodDescriptor md,
+ FlatCall fc ) {
+
+ }
+
+ public ParameterDecomposition( ParameterDecomposition pd,
+ FlatCall fc ) {
+
+ }
+
+ // this family of "gets" returns, for some
+ // parameter index, all of the associated data
+ // that parameter might decompose into
+ public Set<Integer>
+ getHeapRegionNodeIDs( Integer paramIndex ) {
+ return null;
+ }
+
+ public Set<HeapRegionNode>
+ getHeapRegionNodes( Integer paramIndex ) {
+ return null;
+ }
+
+ public Set<AllocationSite>
+ getAllocationSites( Integer paramIndex ) {
+ return null;
+ }
+
+ public Set<TypeDescriptor>
+ getTypeDescriptors( Integer paramIndex ) {
+ return null;
+ }
+
+}