private static interface SwitchStrategy.SwitchClosure
Modifier and Type | Method and Description |
---|---|
void |
bind(Label label)
Binds a label returned by
conditionalJump(int, Condition) . |
Label |
conditionalJump(int index,
Condition condition)
Create a new label and generate a conditional jump to it.
|
void |
conditionalJump(int index,
Condition condition,
boolean defaultTarget)
Generates a conditional or unconditional jump.
|
void |
conditionalJumpOrDefault(int index,
Condition condition,
boolean canFallThrough)
Generates a conditional jump to the target with the specified index.
|
boolean |
isSameTarget(int index1,
int index2)
Return true iff the target of both indexes is the same.
|
void conditionalJump(int index, Condition condition, boolean defaultTarget)
index
- Index of the value and the jump target (only used if defaultTarget == false)condition
- The condition on which to jump (can be null)defaultTarget
- true if the jump should go to the default target, false if index
should be used.void conditionalJumpOrDefault(int index, Condition condition, boolean canFallThrough)
index
- Index of the value and the jump targetcondition
- The condition on which to jumpcanFallThrough
- true if this is the last instruction in the switch statement, to
allow for fall-through optimizations.Label conditionalJump(int index, Condition condition)
index
- Index of the value and the jump targetcondition
- The condition on which to jumpvoid bind(Label label)
conditionalJump(int, Condition)
.boolean isSameTarget(int index1, int index2)