public class MutableCFG<X,T extends IBasicBlock<X>> extends SparseNumberedGraph<T> implements ControlFlowGraph<X,T>
Modifier and Type | Method and Description |
---|---|
static <I,T extends IBasicBlock<I>> |
copyFrom(ControlFlowGraph<I,T> cfg) |
T |
entry()
Return the entry basic block in the CFG
|
T |
exit() |
T |
getBlockForInstruction(int index) |
BitVector |
getCatchBlocks() |
Collection<T> |
getExceptionalPredecessors(T b)
The order of blocks returned should be arbitrary but deterministic.
|
List<T> |
getExceptionalSuccessors(T b)
The order of blocks returned must indicate the exception-handling scope.
|
X[] |
getInstructions() |
IMethod |
getMethod() |
Collection<T> |
getNormalPredecessors(T b)
The order of blocks returned should be arbitrary but deterministic.
|
Collection<T> |
getNormalSuccessors(T b)
The order of blocks returned should be arbitrary but deterministic.
|
int |
getProgramCounter(int index)
TODO: move this into IR?
|
getEdgeManager, getNodeManager
getMaxNumber, getNode, getNumber, getPredNodeNumbers, getSuccNodeNumbers, iterateNodes
addEdge, addNode, containsNode, getNumberOfNodes, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, iterator, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
removeNodeAndEdges
getMaxNumber, getNode, getNumber, iterateNodes
addNode, containsNode, getNumberOfNodes, iterator, removeNode
forEach, spliterator
getPredNodeNumbers, getSuccNodeNumbers
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdges
public static <I,T extends IBasicBlock<I>> MutableCFG<I,T> copyFrom(ControlFlowGraph<I,T> cfg)
public T entry()
ControlFlowGraph
entry
in interface ControlFlowGraph<X,T extends IBasicBlock<X>>
public T exit()
exit
in interface ControlFlowGraph<X,T extends IBasicBlock<X>>
public BitVector getCatchBlocks()
getCatchBlocks
in interface ControlFlowGraph<X,T extends IBasicBlock<X>>
public T getBlockForInstruction(int index)
getBlockForInstruction
in interface ControlFlowGraph<X,T extends IBasicBlock<X>>
index
- an instruction indexpublic X[] getInstructions()
getInstructions
in interface ControlFlowGraph<X,T extends IBasicBlock<X>>
public int getProgramCounter(int index)
ControlFlowGraph
getProgramCounter
in interface ControlFlowGraph<X,T extends IBasicBlock<X>>
index
- an instruction indexpublic IMethod getMethod()
getMethod
in interface ControlFlowGraph<X,T extends IBasicBlock<X>>
public List<T> getExceptionalSuccessors(T b)
ControlFlowGraph
getExceptionalSuccessors
in interface ControlFlowGraph<X,T extends IBasicBlock<X>>
public Collection<T> getNormalSuccessors(T b)
ControlFlowGraph
getNormalSuccessors
in interface ControlFlowGraph<X,T extends IBasicBlock<X>>
public Collection<T> getExceptionalPredecessors(T b)
ControlFlowGraph
getExceptionalPredecessors
in interface ControlFlowGraph<X,T extends IBasicBlock<X>>
public Collection<T> getNormalPredecessors(T b)
ControlFlowGraph
getNormalPredecessors
in interface ControlFlowGraph<X,T extends IBasicBlock<X>>