final class BasicBlock extends CFGNode
Represents a basic block of a method's control flow graph (CFG). The basic block is identified by referring to the first and last instruction belonging to the basic block.
- Source
- BasicBlock.scala
- Alphabetic
- By Inheritance
- BasicBlock
- CFGNode
- Node
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addPredecessor(predecessor: CFGNode): Unit
- Definition Classes
- CFGNode
- def addPredecessors(predecessor: IterableOnce[CFGNode]): Unit
- Definition Classes
- CFGNode
- def addSuccessor(successor: CFGNode): Unit
- Definition Classes
- CFGNode
- final def asBasicBlock: BasicBlock.this.type
- Definition Classes
- BasicBlock → CFGNode
- def asCatchNode: CatchNode
- Definition Classes
- CFGNode
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def copy(startPC: Int = this.startPC, endPC: Int = this.endPC, predecessors: Set[CFGNode] = this.predecessors, successors: Set[CFGNode] = this.successors): BasicBlock
- def countInstructions(implicit code: Code): Int
Counts the instructions of this basic block.
- def endPC: Int
The pc of the last instruction belonging to this basic block.
- def endPC_=(pc: Int): Unit
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(other: Any): Boolean
- Definition Classes
- Node → AnyRef → Any
- def foreach[U](f: (Int) => U)(implicit code: Code): Unit
Calls the function
f
for all instructions - identified by their respective pcs - of a basic block.Calls the function
f
for all instructions - identified by their respective pcs - of a basic block.- f
The function that will be called.
- code
The org.opalj.br.Code
object to which this
BasicBlockimplicitly belongs.
- final def foreachSuccessor(f: (Node) => Unit): Unit
Applies the given function for each successor node.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def hasSuccessors: Boolean
Returns
true
if this node has successor nodes. - def hashCode(): Int
The hash code of this node.
The hash code of this node. By default the hash code is the unique id.
- Definition Classes
- Node → AnyRef → Any
- def index(pc: Int)(implicit code: Code): Int
Returns the index of an instruction – identified by its program counter (pc) – in a basic block.
Returns the index of an instruction – identified by its program counter (pc) – in a basic block.
Example
Given a basic block which has five instructions which have the following program counters: {0,1,3,5,6}. In this case the index of the instruction with program counter 3 will be 2 and in case of the instruction with pc 6 the index will be 4.
- pc
The program counter of the instruction for which the index is needed.
pc
has to satisfy:startPC <= pc <= endPC
.- code
The code to which this basic block belongs.
- final def isAbnormalReturnExitNode: Boolean
- Definition Classes
- BasicBlock → CFGNode
- final def isBasicBlock: Boolean
- Definition Classes
- BasicBlock → CFGNode
- final def isCatchNode: Boolean
- Definition Classes
- BasicBlock → CFGNode
- final def isExitNode: Boolean
- Definition Classes
- BasicBlock → CFGNode
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def isNormalReturnExitNode: Boolean
- Definition Classes
- BasicBlock → CFGNode
- def isStartOfSubroutine: Boolean
- Definition Classes
- BasicBlock → CFGNode
- def mayThrowException: Boolean
Returns
true
if the last instruction of this basic block throws/may throw an exception; whether the exception is handled or not is not relevant!Returns
true
if the last instruction of this basic block throws/may throw an exception; whether the exception is handled or not is not relevant!- Definition Classes
- CFGNode
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def nodeId: Int
An identifier that uniquely identifies this node in the graph to which this node belongs.
An identifier that uniquely identifies this node in the graph to which this node belongs. By default two nodes are considered equal if they have the same unique id.
- Definition Classes
- BasicBlock → Node
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def predecessors: Set[CFGNode]
- Definition Classes
- CFGNode
- def reachable(reflexive: Boolean = false): Set[CFGNode]
Computes the set of all CFGNodes that are reachable from this one.
- def removePredecessor(predecessor: CFGNode): Unit
- Definition Classes
- CFGNode
- def setIsStartOfSubroutine(): Unit
- val startPC: Int
- def successors: Set[CFGNode]
- Definition Classes
- CFGNode
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toHRR: Option[String]
Returns a human readable representation (HRR) of this node.
Returns a human readable representation (HRR) of this node.
- Definition Classes
- BasicBlock → Node
- def toString(): String
- Definition Classes
- BasicBlock → AnyRef → Any
- def visualProperties: Map[String, String]
- Definition Classes
- BasicBlock → Node
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated