Class BasicBlockInContext<T extends ISSABasicBlock>
java.lang.Object
com.ibm.wala.util.graph.impl.NodeWithNumber
com.ibm.wala.ipa.cfg.BasicBlockInContext<T>
- All Implemented Interfaces:
IBasicBlock<SSAInstruction>, ISSABasicBlock, INodeWithNumber, Iterable<SSAInstruction>
public final class BasicBlockInContext<T extends ISSABasicBlock>
extends NodeWithNumber
implements ISSABasicBlock
A helper class to make the ipcfg work correctly with context-sensitive call graphs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintGet the index of the first instruction in the basic block.intGet the index of the last instruction in the basic block.getNode()intEach basic block should have a unique number in its cfginthashCode()booleanIs this block a catch blockbooleanDoes this block represent the unique entry to aControlFlowGraphbooleanDoes this block represent the unique exit from aControlFlowGraph?iterator()toString()Methods inherited from class NodeWithNumber
getGraphNodeId, setGraphNodeIdMethods inherited from interface INodeWithNumber
getGraphNodeId, setGraphNodeIdMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
BasicBlockInContext
-
-
Method Details
-
getFirstInstructionIndex
public int getFirstInstructionIndex()Description copied from interface:IBasicBlockGet the index of the first instruction in the basic block. The value is an index into the instruction array that contains all the instructions for the method.If the result is < 0, the block has no instructions
- Specified by:
getFirstInstructionIndexin interfaceIBasicBlock<T extends ISSABasicBlock>- Returns:
- the instruction index for the first instruction in the basic block.
- See Also:
-
getLastInstructionIndex
public int getLastInstructionIndex()Description copied from interface:IBasicBlockGet the index of the last instruction in the basic block. The value is an index into the instruction array that contains all the instructions for the method.If the result is < 0, the block has no instructions
- Specified by:
getLastInstructionIndexin interfaceIBasicBlock<T extends ISSABasicBlock>- Returns:
- the instruction index for the last instruction in the basic block
- See Also:
-
iterator
- Specified by:
iteratorin interfaceIterable<T extends ISSABasicBlock>- See Also:
-
getMethod
- Specified by:
getMethodin interfaceIBasicBlock<T extends ISSABasicBlock>- Returns:
- governing method for this block
- See Also:
-
getNumber
public int getNumber()Description copied from interface:IBasicBlockEach basic block should have a unique number in its cfg- Specified by:
getNumberin interfaceIBasicBlock<T extends ISSABasicBlock>- Returns:
- the basic block's number
- See Also:
-
isCatchBlock
public boolean isCatchBlock()Description copied from interface:ISSABasicBlockIs this block a catch block- Specified by:
isCatchBlockin interfaceIBasicBlock<T extends ISSABasicBlock>- Specified by:
isCatchBlockin interfaceISSABasicBlock- Returns:
- true if the basic block represents a catch block.
- See Also:
-
isEntryBlock
public boolean isEntryBlock()Description copied from interface:ISSABasicBlockDoes this block represent the unique entry to aControlFlowGraph- Specified by:
isEntryBlockin interfaceIBasicBlock<T extends ISSABasicBlock>- Specified by:
isEntryBlockin interfaceISSABasicBlock- Returns:
- true if the basic block represents the unique entry block.
- See Also:
-
isExitBlock
public boolean isExitBlock()Description copied from interface:ISSABasicBlockDoes this block represent the unique exit from aControlFlowGraph?- Specified by:
isExitBlockin interfaceIBasicBlock<T extends ISSABasicBlock>- Specified by:
isExitBlockin interfaceISSABasicBlock- Returns:
- true if the basic block represents the unique exit block.
- See Also:
-
hashCode
-
equals
-
getDelegate
-
getNode
-
toString
-
getCaughtExceptionTypes
- Specified by:
getCaughtExceptionTypesin interfaceISSABasicBlock- Returns:
- the set of exception types this block may catch.
-
getLastInstruction
- Specified by:
getLastInstructionin interfaceISSABasicBlock- Returns:
- the last instruction in this block.
-
iteratePhis
- Specified by:
iteratePhisin interfaceISSABasicBlock- Returns:
- the phi instructions incoming to this block
-
iteratePis
- Specified by:
iteratePisin interfaceISSABasicBlock- Returns:
- the pi instructions incoming to this block
-