harpoon.Analysis
Interface BasicBlockInterf

All Known Implementing Classes:
BasicBlock, FCFGBasicBlock

public interface BasicBlockInterf

BasicBlockInterf is the interface that needs to be implemented by any "basic block"-like structure. Basic block views of the code groups together lists of consecutive instructions in basic blocks. For each basic block, we have a list of statements contained by it, a set of predecessor basic blocks and a set of successor basic blocks. Different implementations of BasicBlockInterf respect different sets of constraints.

Version:
$Id: BasicBlockInterf.java,v 1.2 2002/02/25 20:56:09 cananian Exp $
Author:
Alexandru SALCIANU <salcianu@MIT.edu>

Method Summary
 void accept(BasicBlockInterfVisitor visitor)
          Calls the appropriate visit method from visitor.
 HCodeElement getFirst()
          Returns the first statement of the basic block.
 HCodeElement getLast()
          Returns the last statement of the basic block.
 Set nextSet()
          Returns all the successors of the basic block, according to the normal and the exceptional control flow.
 Set prevSet()
          Returns all the predecessors of the basic block, according to the normal and the exceptional control flow.
 List statements()
          Returns the list of the statements composing the basic block.
 

Method Detail

getFirst

public HCodeElement getFirst()
Returns the first statement of the basic block.


getLast

public HCodeElement getLast()
Returns the last statement of the basic block.


prevSet

public Set prevSet()
Returns all the predecessors of the basic block, according to the normal and the exceptional control flow.


nextSet

public Set nextSet()
Returns all the successors of the basic block, according to the normal and the exceptional control flow.


statements

public List statements()
Returns the list of the statements composing the basic block.


accept

public void accept(BasicBlockInterfVisitor visitor)
Calls the appropriate visit method from visitor. The concept of BasicBlockInterfVisitor is similar to the concept of QuadVisitor. Both of them were introduced to allow pure object oriented programming, that is virtual methods instead of instanceof tests.