protected static class AbstractAnalysis.Worklist extends Object
| Modifier and Type | Class and Description | 
|---|---|
class  | 
AbstractAnalysis.Worklist.BackwardDFOComparator
Comparators to allow priority queue to order blocks by their depth-first order, using by
 backward analysis. 
 | 
class  | 
AbstractAnalysis.Worklist.ForwardDFOComparator
Comparators to allow priority queue to order blocks by their depth-first order, using by
 forward analysis. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
protected IdentityHashMap<Block,Integer> | 
depthFirstOrder
Map all blocks in the CFG to their depth-first order. 
 | 
protected PriorityQueue<Block> | 
queue
The backing priority queue. 
 | 
| Constructor and Description | 
|---|
Worklist(Analysis.Direction direction)
Create a Worklist. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
add(Block block)
Add the given block to  
queue. | 
boolean | 
contains(Block block)
Check if  
queue contains the block which is passed as the argument. | 
boolean | 
isEmpty()
 | 
@Nullable Block | 
poll()
See  
PriorityQueue.poll(). | 
void | 
process(ControlFlowGraph cfg)
Process the control flow graph, add the blocks to  
depthFirstOrder. | 
String | 
toString()  | 
protected final IdentityHashMap<Block,Integer> depthFirstOrder
protected final PriorityQueue<Block> queue
public Worklist(Analysis.Direction direction)
direction - the direction (forward or backward)public void process(ControlFlowGraph cfg)
depthFirstOrder.cfg - the control flow graph to process@EnsuresNonNullIf(result=false, expression="poll()") public boolean isEmpty()
queue is empty else falseAbstractCollection.isEmpty()public boolean contains(Block block)
queue contains the block which is passed as the argument.block - the given block to checkqueue contains the given blockpublic void add(Block block)
queue.block - the block to add to queuepublic @Nullable Block poll()
PriorityQueue.poll().queuePriorityQueue.poll()