coins.flow
Class BBlockHirNodeIteratorImpl

java.lang.Object
  extended bycoins.flow.BBlockHirNodeIteratorImpl
All Implemented Interfaces:
BBlockNodeIterator

public class BBlockHirNodeIteratorImpl
extends java.lang.Object
implements BBlockNodeIterator

BBlockHirNodeIteratorImpl class Basic block node iterator to traverse node in a basic block.


Field Summary
protected  int fDbgLevel
           
protected  boolean fJumpReturnAppeared
           
 FlowRoot flowRoot
           
protected  int fNextNodeIndex
           
protected  Stmt fNextStmt
           
 SubpFlow fSubpFlow
           
 
Constructor Summary
BBlockHirNodeIteratorImpl(FlowRoot pFlowRoot, BBlock pBBlock)
           
 
Method Summary
 HIR getNextExecutableNode()
          getNextExecutableNode Get the node that refer/set data or change control flow directly.
 boolean hasNext()
          hasNext
 IR next()
          next Get the next node in this basic block.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

flowRoot

public final FlowRoot flowRoot

fDbgLevel

protected int fDbgLevel

fNextNodeIndex

protected int fNextNodeIndex

fSubpFlow

public final SubpFlow fSubpFlow

fNextStmt

protected Stmt fNextStmt

fJumpReturnAppeared

protected boolean fJumpReturnAppeared
Constructor Detail

BBlockHirNodeIteratorImpl

public BBlockHirNodeIteratorImpl(FlowRoot pFlowRoot,
                                 BBlock pBBlock)
Method Detail

next

public IR next()
Description copied from interface: BBlockNodeIterator
next Get the next node in this basic block. By repetitively invoking "next", all nodes in the basic block are traversed.

Specified by:
next in interface BBlockNodeIterator

hasNext

public boolean hasNext()
Description copied from interface: BBlockNodeIterator
hasNext

Specified by:
hasNext in interface BBlockNodeIterator
Returns:
true if there is next node remaining in the basic block.

getNextExecutableNode

public HIR getNextExecutableNode()
Description copied from interface: BBlockNodeIterator
getNextExecutableNode Get the node that refer/set data or change control flow directly. The iterator skips such non-executable nodes as labelNode, blockNode, listNode, stmtNode, ifNode, forNode, whileNode, untilNode, switchNode, progNode, subpDefNode, labelDefNode, infNode, subpNode, typeNode, labeledStmtNode with non-null Stmt body, nullNode and get executable statement body or expression under the skipped node. If a labeled statement has null statement body, it is not skipped.

Specified by:
getNextExecutableNode in interface BBlockNodeIterator