T
- the type of MergeableState
handled by this PostOrderNodeIteratorpublic abstract class PostOrderNodeIterator<T extends MergeableState<T>> extends Object
For this iterator the CFG is defined by the classical CFG nodes (ControlSplitNode
,
AbstractMergeNode
...) and the next
pointers of
FixedWithNextNode
.
While iterating it maintains a user-defined state by calling the methods available in
MergeableState
.
Modifier and Type | Field and Description |
---|---|
private Deque<AbstractBeginNode> |
nodeQueue |
private Map<FixedNode,T> |
nodeStates |
private FixedNode |
start |
protected T |
state |
private NodeBitMap |
visitedEnds |
Constructor and Description |
---|
PostOrderNodeIterator(FixedNode start,
T initialState) |
Modifier and Type | Method and Description |
---|---|
void |
apply() |
protected Set<Node> |
controlSplit(ControlSplitNode controlSplit) |
protected void |
end(EndNode endNode) |
protected void |
finished() |
private void |
finishLoopEnds(LoopEndNode end) |
protected void |
invoke(Invoke invoke) |
protected void |
loopBegin(LoopBeginNode loopBegin) |
protected void |
loopEnd(LoopEndNode loopEnd) |
protected void |
merge(AbstractMergeNode merge) |
private FixedNode |
nextQueuedNode() |
protected abstract void |
node(FixedNode node) |
private void |
queueMerge(EndNode end) |
private void |
queueSuccessors(FixedNode x,
Set<Node> successors) |
private final NodeBitMap visitedEnds
private final Deque<AbstractBeginNode> nodeQueue
private final Map<FixedNode,T extends MergeableState<T>> nodeStates
protected T extends MergeableState<T> state
public PostOrderNodeIterator(FixedNode start, T initialState)
public void apply()
private void queueSuccessors(FixedNode x, Set<Node> successors)
private FixedNode nextQueuedNode()
private void finishLoopEnds(LoopEndNode end)
private void queueMerge(EndNode end)
protected void merge(AbstractMergeNode merge)
protected void loopBegin(LoopBeginNode loopBegin)
protected void loopEnd(LoopEndNode loopEnd)
protected Set<Node> controlSplit(ControlSplitNode controlSplit)
protected void finished()