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.
- Alphabetic
- By Inheritance
- BasicBlock
- CFGNode
- Node
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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: TraversableOnce[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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- 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
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
foreach[U](f: (Int) ⇒ U)(implicit code: Code): Unit
Calls the function
ffor all instructions - identified by their respective pcs - of a basic block.Calls the function
ffor 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 thisBasicBlockimplicitly belongs.
-
final
def
foreachSuccessor(f: (Node) ⇒ Unit): Unit
- Definition Classes
- CFGNode → Node
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
hasSuccessors: Boolean
- Definition Classes
- CFGNode → Node
-
def
hashCode(): Int
- 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.
pchas 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
trueif the last instruction of this basic block throws/may throw an exception; whether the exception is handled or not is not relevant!Returns
trueif 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
- Definition Classes
- BasicBlock → Node
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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]
- Definition Classes
- BasicBlock → Node
-
def
toString(): String
- Definition Classes
- BasicBlock → AnyRef → Any
-
def
visualProperties: Map[String, String]
- Definition Classes
- BasicBlock → Node
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )