public final class BasicBlockList extends LabeledList
BasicBlock instances.| Constructor and Description |
|---|
BasicBlockList(int size)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
catchesEqual(BasicBlock block1,
BasicBlock block2)
Compares the catches of two blocks for equality.
|
void |
forEachInsn(Insn.Visitor visitor)
Visits each instruction of each block in the list, in order.
|
BasicBlock |
get(int n)
Gets the element at the given index.
|
int |
getEffectiveInstructionCount()
Gets the total instruction count for this instance, ignoring
mark-local instructions which are not actually emitted.
|
int |
getInstructionCount()
Gets the total instruction count for this instance.
|
BasicBlockList |
getMutableCopy()
Returns a mutable copy of this list.
|
int |
getRegCount()
Returns how many registers this method requires.
|
BasicBlock |
labelToBlock(int label)
Gets the first block in the list with the given label, if any.
|
BasicBlock |
preferredSuccessorOf(BasicBlock block)
Gets the preferred successor for the given block.
|
void |
set(int n,
BasicBlock bb)
Sets the basic block at the given index.
|
BasicBlockList |
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.
|
getLabelsInOrder, getMaxLabel, indexOfLabel, set, shrinkToFitequals, get0, getOrNull0, hashCode, set0, size, toHuman, toHuman, toString, toStringisImmutable, isMutable, setImmutable, throwIfImmutable, throwIfMutablepublic BasicBlockList(int size)
null,
and the first-block label is initially -1.size - the size of the listpublic BasicBlock get(int n)
NullPointerException.n - >= 0, < size(); which indexnon-null; element at that indexpublic void set(int n,
BasicBlock bb)
n - >= 0, < size(); which indexbb - null-ok; the element to set at npublic int getRegCount()
BasicBlock
instances).>= 0; the register countpublic int getInstructionCount()
>= 0; the total instruction countpublic int getEffectiveInstructionCount()
>= 0; the total instruction countpublic BasicBlock labelToBlock(int label)
label - label >= 0; the label to look fornon-null; the so-labelled blockjava.lang.IllegalArgumentException - thrown if the label isn't foundpublic void forEachInsn(Insn.Visitor visitor)
visitor - non-null; visitor to usepublic BasicBlockList withRegisterOffset(int delta)
delta - the amount to offset register numbers bynon-null; an appropriately-constructed instancepublic BasicBlockList getMutableCopy()
non-null; an appropriately-constructed instancepublic BasicBlock preferredSuccessorOf(BasicBlock block)
null.block - non-null; the block in questionnull-ok; the preferred successor, if anypublic boolean catchesEqual(BasicBlock block1, BasicBlock block2)
block1 - non-null; one block to compareblock2 - non-null; the other block to comparetrue if the two blocks' non-primary successors
are identicalCopyright © 2020. All Rights Reserved.