protected DirectInvokeTypeFlow(BigBang bb, MethodFlowsGraph methodFlows, DirectInvokeTypeFlow original) { super(bb, methodFlows, original); this.callerContext = methodFlows.context(); }
protected BytecodeSensitiveVirtualInvokeTypeFlow(BigBang bb, MethodFlowsGraph methodFlows, BytecodeSensitiveVirtualInvokeTypeFlow original) { super(bb, methodFlows, original); calleesFlows = new ConcurrentHashMap<>(4, 0.75f, 1); callerContext = methodFlows.context(); }
private TypeFlow(T source, AnalysisType declaredType, TypeState typeState, int slot, boolean isClone, MethodFlowsGraph graphRef) { this.id = nextId.incrementAndGet(); this.source = source; this.declaredType = declaredType; this.slot = slot; this.isClone = isClone; this.graphRef = graphRef; this.context = graphRef != null ? graphRef.context() : null; this.state = typeState; this.uses = new ConcurrentLightHashSet<>(); this.inputs = new ConcurrentLightHashSet<>(); this.observers = new ConcurrentLightHashSet<>(); this.observees = new ConcurrentLightHashSet<>(); this.usedAsAParameter = false; this.usedAsAReceiver = false; }
@Override public TypeFlow<ValueNode> copy(BigBang bb, MethodFlowsGraph methodFlows) { AnalysisContext enclosingContext = methodFlows.context(); AnalysisContext allocContext = bb.contextPolicy().allocationContext(enclosingContext, PointstoOptions.MaxHeapContextDepth.getValue(bb.getOptions())); return new CloneTypeFlow(bb, this, methodFlows, allocContext); }
@Override public TypeFlow<ValueNode> copy(BigBang bb, MethodFlowsGraph methodFlows) { AnalysisContext enclosingContext = methodFlows.context(); AnalysisContext allocContext = bb.contextPolicy().allocationContext(enclosingContext, PointstoOptions.MaxHeapContextDepth.getValue(bb.getOptions())); return new DynamicNewInstanceTypeFlow(bb, this, methodFlows, allocContext); }
/** Create the type state for a clone. */ protected TypeState cloneSourceState(BigBang bb, MethodFlowsGraph methodFlows) { assert !this.isClone(); AnalysisContext allocatorContext = methodFlows.context(); AnalysisContext allocationContext = bb.contextPolicy().allocationContext(allocatorContext, PointstoOptions.MaxHeapContextDepth.getValue(bb.getOptions())); if (bb.analysisPolicy().isContextSensitiveAllocation(bb, type, allocationContext)) { /* * If the analysis is context sensitive create a new heap object for the new context, or * return an existing one. The original NewInstanceTypeFlow is the one that stores the * (Context->HeapObject) mapping. */ AnalysisObject newHeapObject = createHeapObject(bb, allocationContext); return TypeState.forNonNullObject(bb, newHeapObject); } else { /* * In the heap insensitive case instead of more precise heap abstractions (i.e. * allocation site) we use just the type of the object wrapped into the AbstractObject * base class. There is no cloning in this case. */ return TypeState.forExactType(bb, type, false); } }