|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectic.cfg.BasicBlock
public class BasicBlock
Represents one BasicBlock in a CFG. This implementation permits only a single instruction per block. Each block has an id number to enable you to distinguish blocks in client code, a single instruction, and a set of successor and predecessor blocks.
Field Summary | |
---|---|
protected int |
id
|
protected TInstr |
instr
|
protected Set<BasicBlock> |
predecessors
|
protected Set<BasicBlock> |
successors
|
Constructor Summary | |
---|---|
BasicBlock(int id,
TInstr instr)
Create a new block with the given id and instruction. |
Method Summary | |
---|---|
void |
addEdge(BasicBlock successor)
Add an edge from this block to successor. |
int |
getId()
Return the id of the block. |
TInstr |
getInstr()
Return the instruction in the block. |
Iterable<BasicBlock> |
getPredecessors()
Return a list of predecessors that you can iterator over. |
Iterable<BasicBlock> |
getSuccessors()
Return a list of successors that you can iterator over. |
String |
toString()
A printable rep for a block. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final int id
protected final TInstr instr
protected final Set<BasicBlock> successors
protected final Set<BasicBlock> predecessors
Constructor Detail |
---|
public BasicBlock(int id, TInstr instr)
Method Detail |
---|
public void addEdge(BasicBlock successor)
public int getId()
public TInstr getInstr()
public Iterable<BasicBlock> getPredecessors()
public Iterable<BasicBlock> getSuccessors()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |