public final class BasicBlock extends java.lang.Object implements LabeledItem
| Modifier and Type | Class and Description |
|---|---|
static interface |
BasicBlock.Visitor
BasicBlock visitor interface
|
| Constructor and Description |
|---|
BasicBlock(int label,
InsnList insns,
IntList successors,
int primarySuccessor)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canThrow()
Returns whether this block might throw an exception.
|
boolean |
equals(java.lang.Object other)
Instances of this class compare by identity.
|
TypeList |
getExceptionHandlerTypes()
Returns the exception handler types associated with this block,
if any.
|
Insn |
getFirstInsn()
Gets the first instruction of this block.
|
InsnList |
getInsns()
Gets the list of instructions inside this block.
|
int |
getLabel()
Gets the target label of this block.
|
Insn |
getLastInsn()
Gets the last instruction of this block.
|
int |
getPrimarySuccessor()
Gets the primary successor of this block.
|
int |
getSecondarySuccessor()
Gets the secondary successor of this block.
|
IntList |
getSuccessors()
Gets the list of successors that this block may branch to.
|
boolean |
hasExceptionHandlers()
Returns whether this block has any associated exception handlers.
|
int |
hashCode()
Return the identity hashcode of this instance.
|
java.lang.String |
toString() |
BasicBlock |
withRegisterOffset(int delta)
Returns an instance that is identical to this one, except that
the registers in each instruction are offset by the given
amount.
|
public BasicBlock(int label,
InsnList insns,
IntList successors,
int primarySuccessor)
null.label - >= 0; target label for this blockinsns - non-null; list of instructions in this blocksuccessors - non-null; full list of successors that this
block may branch toprimarySuccessor - >= -1; the primary / standard-flow /
"default" successor, or -1 if this block has no
successors (that is, it exits the function/method or is an
unconditional throw)public boolean equals(java.lang.Object other)
x.equals(y) is only true if x == y.equals in class java.lang.Objectpublic int hashCode()
equals(java.lang.Object)).hashCode in class java.lang.Objectpublic int getLabel()
getLabel in interface LabeledItem>= 0; the labelpublic InsnList getInsns()
non-null; the instruction listpublic IntList getSuccessors()
non-null; the successors listpublic int getPrimarySuccessor()
>= -1; the primary successor, or -1 if this
block has no successors at allpublic int getSecondarySuccessor()
>= 0; the secondary successorpublic Insn getFirstInsn()
getInsns().get(0).non-null; the first instructionpublic Insn getLastInsn()
getInsns().getLast().non-null; the last instructionpublic boolean canThrow()
getLastInsn().canThrow().true iff this block might throw an
exceptionpublic boolean hasExceptionHandlers()
true iff this block has any associated
exception handlerspublic TypeList getExceptionHandlerTypes()
null).non-null; the exception handler types associated with
this blockpublic BasicBlock withRegisterOffset(int delta)
delta - the amount to offset register numbers bynon-null; an appropriately-constructed instancepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2020. All Rights Reserved.