BasicBlock instances.
| Modifier and Type | Class and Description |
|---|---|
| private static class | BasicBlockList.
Instruction visitor class for counting registers used. |
| Modifier and Type | Field and Description |
|---|---|
| private int | regCount
|
| Access | Constructor and Description |
|---|---|
| public | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the two blocks' non-primary successors
are identicalnon-null; one block to comparenon-null; the other block to compareCompares the catches of two blocks for equality. |
| public void | forEachInsn(Insn.
non-null; visitor to useVisits each instruction of each block in the list, in order. |
| public BasicBlock | Returns: non-null; element at that index>= 0, < size(); which indexGets the element at the given index. |
| public int | Returns: >= 0; the total instruction countGets the total instruction count for this instance, ignoring mark-local instructions which are not actually emitted. |
| public int | Returns: >= 0; the total instruction countGets the total instruction count for this instance. |
| public BasicBlockList | Returns: non-null; an appropriately-constructed instanceReturns a mutable copy of this list. |
| public int | |
| public BasicBlock | Returns: non-null; the so-labelled block>= 0; the label to look forGets the first block in the list with the given label, if any. |
| public BasicBlock | Returns: null-ok; the preferred successor, if anynon-null; the block in questionGets the preferred successor for the given block. |
| public void | set(int
>= 0, < size(); which indexnull-ok; the element to set at nSets the basic block at the given index. |
| public BasicBlockList | Returns: non-null; an appropriately-constructed instancethe amount to offset register numbers by delta)Returns an instance that is identical to this one, except that the registers in each instruction are offset by the given amount. |
| regCount | back to summary |
|---|---|
| private int regCount
| |
| BasicBlockList | back to summary |
|---|---|
| public BasicBlockList(int size) Constructs an instance. All indices initially contain
| |
| BasicBlockList | back to summary |
|---|---|
| private BasicBlockList(BasicBlockList old) Constructs a mutable copy for
| |
| catchesEqual | back to summary |
|---|---|
| public boolean catchesEqual(BasicBlock block1, BasicBlock block2) Compares the catches of two blocks for equality. This includes both the catch types and target labels.
| |
| forEachInsn | back to summary |
|---|---|
| public void forEachInsn(Insn. Visits each instruction of each block in the list, in order. | |
| get | back to summary |
|---|---|
| public BasicBlock get(int n) Gets the element at the given index. It is an error to call
this with the index for an element which was never set; if you
do that, this will throw
| |
| getEffectiveInstructionCount | back to summary |
|---|---|
| public int getEffectiveInstructionCount() Gets the total instruction count for this instance, ignoring mark-local instructions which are not actually emitted.
| |
| getInstructionCount | back to summary |
|---|---|
| public int getInstructionCount() Gets the total instruction count for this instance. This is the sum of the instruction counts of each block.
| |
| getMutableCopy | back to summary |
|---|---|
| public BasicBlockList getMutableCopy() Returns a mutable copy of this list.
| |
| getRegCount | back to summary |
|---|---|
| public int getRegCount() Returns how many registers this method requires. This is simply
the maximum of register-number-plus-category referred to by this
instance's instructions (indirectly through
| |
| labelToBlock | back to summary |
|---|---|
| public BasicBlock labelToBlock(int label) Gets the first block in the list with the given label, if any.
| |
| preferredSuccessorOf | back to summary |
|---|---|
| public BasicBlock preferredSuccessorOf(BasicBlock block) Gets the preferred successor for the given block. If the block
only has one successor, then that is the preferred successor.
Otherwise, if the block has a primay successor, then that is
the preferred successor. If the block has no successors, then
this returns
| |
| set | back to summary |
|---|---|
| public void set(int n, BasicBlock bb) Sets the basic block at the given index.
| |
| withRegisterOffset | back to summary |
|---|---|
| public 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. Mutability of the result is inherited from the original.
| |
| Modifier and Type | Field and Description |
|---|---|
| private int | regCount
|
| Access | Constructor and Description |
|---|---|
| public |
| regCount | back to summary |
|---|---|
| private int regCount
| |
| RegCountVisitor | back to summary |
|---|---|
| public RegCountVisitor() Constructs an instance. | |
| getRegCount | back to summary |
|---|---|
| public int getRegCount() Gets the register count.
| |
| processReg | back to summary |
|---|---|
| private void processReg(RegisterSpec spec) Processes the given register spec.
| |
| visit | back to summary |
|---|---|
| private void visit(Insn insn) Helper for all the
| |
| visitFillArrayDataInsn | back to summary |
|---|---|
| public void visitFillArrayDataInsn(FillArrayDataInsn insn) Implements org. Doc from org. Visits a
| |
| visitPlainCstInsn | back to summary |
|---|---|
| public void visitPlainCstInsn(PlainCstInsn insn) Implements org. Doc from org. Visits a
| |
| visitPlainInsn | back to summary |
|---|---|
| public void visitPlainInsn(PlainInsn insn) Implements org. Doc from org. Visits a
| |
| visitSwitchInsn | back to summary |
|---|---|
| public void visitSwitchInsn(SwitchInsn insn) Implements org. Doc from org. Visits a
| |
| visitThrowingCstInsn | back to summary |
|---|---|
| public void visitThrowingCstInsn(ThrowingCstInsn insn) Implements org. Doc from org. Visits a
| |
| visitThrowingInsn | back to summary |
|---|---|
| public void visitThrowingInsn(ThrowingInsn insn) Implements org. Doc from org. Visits a
| |