public class MethodTypeFlow extends TypeFlow<AnalysisMethod>
| Modifier and Type | Field and Description |
|---|---|
protected MethodFlowsGraph |
flowsGraph |
protected PointsToAnalysisMethod |
method |
| Constructor and Description |
|---|
MethodTypeFlow(PointsToAnalysisMethod method) |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureFlowsGraphCreated(PointsToAnalysis bb,
InvokeTypeFlow reason)
Trigger parsing and create the flows graph, blocking until ready.
|
protected void |
ensureFlowsGraphSealed() |
boolean |
flowsGraphCreated()
The flows graph is created lazily only when the method is implementation invoked.
|
TypeState |
foldTypeFlow(PointsToAnalysis bb,
TypeFlow<?> originalTypeFlow)
Return the type state of the original flow.
|
Collection<MethodFlowsGraph> |
getFlows() |
org.graalvm.collections.EconomicMap<Object,InvokeTypeFlow> |
getInvokes() |
PointsToAnalysisMethod |
getMethod() |
MethodFlowsGraph |
getMethodFlowsGraph()
Accessor for the flowsGraph that assumes that the graph was already created.
|
MethodFlowsGraphInfo |
getMethodFlowsGraphInfo()
Accessor for the flowsGraph that assumes that the graph was already created.
|
MethodFlowsGraphInfo |
getOrCreateMethodFlowsGraphInfo(PointsToAnalysis bb,
InvokeTypeFlow reason)
Returns the flows graph info for this method, blocking until parsing is finished if
necessary.
|
TypeFlow<?> |
getParameter(int idx) |
Object |
getParsingReason() |
int |
getReturnedParameterIndex()
Returns the index of the parameter that is the only return value of this method, or -1 if the
method does not always return a parameter.
|
protected void |
initFlowsGraph(PointsToAnalysis bb,
List<TypeFlow<?>> postInitFlows)
Run type flow initialization.
|
boolean |
isSaturated(PointsToAnalysis bb,
TypeFlow<?> originalTypeFlow)
Check if the type flow is saturated, i.e., any of its clones is saturated.
|
void |
setAsStubFlow()
Signals that a STUB graphkind should be generated upon creation.
|
String |
toString() |
void |
update(PointsToAnalysis bb) |
boolean |
updateFlowsGraph(PointsToAnalysis bb,
MethodFlowsGraph.GraphKind newGraphKind,
InvokeTypeFlow newParsingReason,
boolean forceReparse)
Updates the kind of flow graph of associated with the type flow.
|
addInput, addObservee, addObserver, addObserver, addState, addState, addUse, addUse, canSaturate, clearInputs, clearObservees, clearObservers, clearUses, copy, declaredTypeFilter, declaredTypeFilter, doAddUse, equals, filter, filterUncheckedInterface, format, formatSource, getDeclaredType, getInputs, getObservees, getObservers, getSlot, getSource, getState, getUses, graphRef, hashCode, id, initFlow, invalidate, isAllInstantiated, isClone, isContextInsensitive, isSaturated, isValid, method, needsInitialization, notifyObserverOfSaturation, notifyUseOfSaturation, onInputSaturated, onObservedSaturated, onObservedUpdate, onSaturated, onSaturated, receiver, removeObserver, removeUse, replacedObservedWith, replaceObservedWith, setObserved, setSaturated, setSlot, setState, swapAtObserver, swapAtUse, swapOutprotected final PointsToAnalysisMethod method
protected volatile MethodFlowsGraph flowsGraph
public MethodTypeFlow(PointsToAnalysisMethod method)
public PointsToAnalysisMethod getMethod()
public void setAsStubFlow()
public MethodFlowsGraphInfo getOrCreateMethodFlowsGraphInfo(PointsToAnalysis bb, InvokeTypeFlow reason)
public MethodFlowsGraphInfo getMethodFlowsGraphInfo()
public MethodFlowsGraph getMethodFlowsGraph()
protected void ensureFlowsGraphSealed()
public boolean flowsGraphCreated()
public void ensureFlowsGraphCreated(PointsToAnalysis bb, InvokeTypeFlow reason)
protected void initFlowsGraph(PointsToAnalysis bb, List<TypeFlow<?>> postInitFlows)
TypeFlowGraphBuilder.build(). Their initialization
needs to be triggered only after the graph is fully materialized such that lazily constructed
type flows (like InovkeTypeFlow.actualReturn) can observe the type state that other flows may
generate on initialization.public Collection<MethodFlowsGraph> getFlows()
public org.graalvm.collections.EconomicMap<Object,InvokeTypeFlow> getInvokes()
public TypeFlow<?> getParameter(int idx)
public boolean isSaturated(PointsToAnalysis bb, TypeFlow<?> originalTypeFlow)
public TypeState foldTypeFlow(PointsToAnalysis bb, TypeFlow<?> originalTypeFlow)
public int getReturnedParameterIndex()
public Object getParsingReason()
public void update(PointsToAnalysis bb)
update in class TypeFlow<AnalysisMethod>public boolean updateFlowsGraph(PointsToAnalysis bb, MethodFlowsGraph.GraphKind newGraphKind, InvokeTypeFlow newParsingReason, boolean forceReparse)
public String toString()
toString in class TypeFlow<AnalysisMethod>