public class MethodFlowsGraph extends Object implements MethodFlowsGraphInfo
| Modifier and Type | Class and Description |
|---|---|
static class |
MethodFlowsGraph.GraphKind
The type of method flows graph.
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
id |
protected org.graalvm.collections.EconomicMap<Object,InstanceOfTypeFlow> |
instanceOfFlows |
protected org.graalvm.collections.EconomicMap<Object,InvokeTypeFlow> |
invokeFlows |
protected boolean |
isLinearized |
protected TypeFlow<?>[] |
linearizedGraph |
protected PointsToAnalysisMethod |
method |
protected List<TypeFlow<?>> |
miscEntryFlows |
protected org.graalvm.collections.EconomicMap<org.graalvm.compiler.nodes.EncodedGraph.EncodedNodeReference,TypeFlow<?>> |
nodeFlows |
protected org.graalvm.collections.EconomicSet<Object> |
nonUniqueBcis |
protected FormalParamTypeFlow[] |
parameters |
protected FormalReturnTypeFlow |
returnFlow |
| Constructor and Description |
|---|
MethodFlowsGraph(PointsToAnalysisMethod method,
MethodFlowsGraph.GraphKind graphKind)
Constructor for the 'original' method flows graph.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMiscEntryFlow(TypeFlow<?> entryFlow) |
void |
addNodeFlow(org.graalvm.compiler.nodes.EncodedGraph.EncodedNodeReference key,
TypeFlow<?> flow) |
void |
addNodeFlow(PointsToAnalysis bb,
org.graalvm.compiler.graph.Node node,
TypeFlow<?> input) |
List<MethodFlowsGraph> |
callers(PointsToAnalysis bb)
Get the list of all context sensitive callers.
|
static boolean |
crossMethodUse(TypeFlow<?> flow,
TypeFlow<?> use) |
protected void |
ensureLinearized() |
Iterable<TypeFlow<?>> |
flows()
Creates an iterator containing all flows which are internal to this method.
|
FormalReceiverTypeFlow |
getFormalReceiver() |
MethodFlowsGraph.GraphKind |
getGraphKind() |
org.graalvm.collections.EconomicMap<Object,InstanceOfTypeFlow> |
getInstanceOfFlows() |
org.graalvm.collections.EconomicMap<Object,InvokeTypeFlow> |
getInvokes() |
TypeFlow<?>[] |
getLinearizedGraph()
Return the linearized graph, i.e., the graph represented as an array where each flow has a
unique slot, blocking until the array is available.
|
PointsToAnalysisMethod |
getMethod() |
Collection<TypeFlow<?>> |
getMiscFlows() |
org.graalvm.collections.EconomicMap<org.graalvm.compiler.nodes.EncodedGraph.EncodedNodeReference,TypeFlow<?>> |
getNodeFlows() |
FormalParamTypeFlow |
getParameter(int idx) |
TypeFlow<?>[] |
getParameters() |
FormalReturnTypeFlow |
getReturnFlow() |
int |
id() |
InvokeTypeFlow |
invokeFlow(MethodFlowsGraph callerFlowGraph,
PointsToAnalysis bb)
Given a context sensitive caller, i.e., another MethodFlowsGraph, identify the InvokeTypeFlow
belonging to the caller that linked to this callee.
|
boolean |
isLinearized() |
boolean |
isStub() |
<T extends TypeFlow<?>> |
lookupCloneOf(PointsToAnalysis bb,
T original) |
static boolean |
nonCloneableFlow(TypeFlow<?> flow) |
static boolean |
nonMethodFlow(TypeFlow<?> flow) |
void |
setParameter(int index,
FormalParamTypeFlow parameter) |
void |
setReturnFlow(FormalReturnTypeFlow returnFlow) |
String |
toString() |
protected final int id
protected final PointsToAnalysisMethod method
protected TypeFlow<?>[] linearizedGraph
protected FormalParamTypeFlow[] parameters
protected org.graalvm.collections.EconomicMap<org.graalvm.compiler.nodes.EncodedGraph.EncodedNodeReference,TypeFlow<?>> nodeFlows
protected org.graalvm.collections.EconomicSet<Object> nonUniqueBcis
protected org.graalvm.collections.EconomicMap<Object,InstanceOfTypeFlow> instanceOfFlows
protected org.graalvm.collections.EconomicMap<Object,InvokeTypeFlow> invokeFlows
protected FormalReturnTypeFlow returnFlow
protected volatile boolean isLinearized
public MethodFlowsGraph(PointsToAnalysisMethod method, MethodFlowsGraph.GraphKind graphKind)
null context and null original method flows.public <T extends TypeFlow<?>> T lookupCloneOf(PointsToAnalysis bb, T original)
public static boolean nonCloneableFlow(TypeFlow<?> flow)
public static boolean nonMethodFlow(TypeFlow<?> flow)
public TypeFlow<?>[] getLinearizedGraph()
protected void ensureLinearized()
public final Iterable<TypeFlow<?>> flows()
public int id()
public PointsToAnalysisMethod getMethod()
getMethod in interface MethodFlowsGraphInfopublic boolean isStub()
isStub in interface MethodFlowsGraphInfopublic MethodFlowsGraph.GraphKind getGraphKind()
public FormalReceiverTypeFlow getFormalReceiver()
getFormalReceiver in interface MethodFlowsGraphInfopublic void setParameter(int index,
FormalParamTypeFlow parameter)
public FormalParamTypeFlow getParameter(int idx)
getParameter in interface MethodFlowsGraphInfopublic TypeFlow<?>[] getParameters()
public void addNodeFlow(PointsToAnalysis bb, org.graalvm.compiler.graph.Node node, TypeFlow<?> input)
public void addNodeFlow(org.graalvm.compiler.nodes.EncodedGraph.EncodedNodeReference key,
TypeFlow<?> flow)
public Collection<TypeFlow<?>> getMiscFlows()
public org.graalvm.collections.EconomicMap<org.graalvm.compiler.nodes.EncodedGraph.EncodedNodeReference,TypeFlow<?>> getNodeFlows()
public void addMiscEntryFlow(TypeFlow<?> entryFlow)
public void setReturnFlow(FormalReturnTypeFlow returnFlow)
public FormalReturnTypeFlow getReturnFlow()
getReturnFlow in interface MethodFlowsGraphInfopublic org.graalvm.collections.EconomicMap<Object,InvokeTypeFlow> getInvokes()
public org.graalvm.collections.EconomicMap<Object,InstanceOfTypeFlow> getInstanceOfFlows()
public boolean isLinearized()
public List<MethodFlowsGraph> callers(PointsToAnalysis bb)
public InvokeTypeFlow invokeFlow(MethodFlowsGraph callerFlowGraph, PointsToAnalysis bb)
callerFlowGraph - the context sensitive caller.