ibis.satin.impl.syncrewriter.controlflow
Class BasicBlock

java.lang.Object
  extended by ibis.satin.impl.syncrewriter.controlflow.BasicBlock

public class BasicBlock
extends Object

A BasicBlock is a sequence of instructions with only one entry point and only one exit point. Instructions don't branch to other instructions and instructions are not targeted by other basic blocks.


Method Summary
 boolean contains(org.apache.bcel.generic.InstructionHandle ih)
          Tests whether this basic block contains InstructionHandle ih
 org.apache.bcel.verifier.structurals.InstructionContext getEnd()
          Returns the last InstructionContext of the basic block.
 int getId()
          Returns the id of the basic block.
 ArrayList<org.apache.bcel.verifier.structurals.InstructionContext> getInstructions()
          Returns an ArrayList of the instructions of the basic block.
 String toString()
          Returns a string representation of the basic block.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

contains

public boolean contains(org.apache.bcel.generic.InstructionHandle ih)
Tests whether this basic block contains InstructionHandle ih

Parameters:
ih - the instruction handle that will be tested
Returns:
true if this basic block contains ih; false otherwise

toString

public String toString()
Returns a string representation of the basic block.

Overrides:
toString in class Object

getId

public int getId()
Returns the id of the basic block. Note: This is the index of the basic block in the method. So, basic block with id + 1 is the following basic block in the instruction list of the method. It is not necessarily targeted by the previous one.

Returns:
the id, which is the index of the basic block in the method.

getEnd

public org.apache.bcel.verifier.structurals.InstructionContext getEnd()
Returns the last InstructionContext of the basic block.

Returns:
the last instruction context of the basic block.

getInstructions

public ArrayList<org.apache.bcel.verifier.structurals.InstructionContext> getInstructions()
Returns an ArrayList of the instructions of the basic block. The instruction are in execution order.

Returns:
The instructions of the basic block in execution order.


The Ibis project