public abstract class Select extends BranchInstruction implements VariableLengthInstruction, StackConsumer, StackProducer
We use our super's target
property as the default target.
LOOKUPSWITCH
,
TABLESWITCH
,
InstructionList
Modifier and Type | Field and Description |
---|---|
protected int |
fixed_length
Deprecated.
(since 6.0) will be made private; do not access directly, use getter/setter
|
protected int[] |
indices
Deprecated.
(since 6.0) will be made private; do not access directly, use getter/setter
|
protected int[] |
match
Deprecated.
(since 6.0) will be made private; do not access directly, use getter/setter
|
protected int |
match_length
Deprecated.
(since 6.0) will be made private; do not access directly, use getter/setter
|
protected int |
padding
Deprecated.
(since 6.0) will be made private; do not access directly, use getter/setter
|
protected InstructionHandle[] |
targets
Deprecated.
(since 6.0) will be made private; do not access directly, use getter/setter
|
index, position, target
length, opcode
Modifier and Type | Method and Description |
---|---|
protected Object |
clone() |
boolean |
containsTarget(InstructionHandle ih)
Checks whether this targeter targets the specified instruction handle.
|
void |
dump(DataOutputStream out)
Dump instruction as byte code to stream out.
|
int[] |
getIndices() |
int[] |
getMatchs() |
InstructionHandle[] |
getTargets() |
protected void |
initFromFile(ByteSequence bytes,
boolean wide)
Read needed data (e.g.
|
void |
setTarget(int i,
InstructionHandle target)
Set branch target for 'i'th case
|
String |
toString(boolean verbose)
Long output format:
<position in byte code> <name of opcode> "["<opcode number>"]" "("<length of instruction>")"
"<"<target instruction>">" "@"<branch target offset>
|
protected int |
updatePosition(int offset,
int maxOffset)
Since this is a variable length instruction, it may shift the following instructions which then need to update their
position.
|
void |
updateTarget(InstructionHandle oldIh,
InstructionHandle newIh)
Replaces the target of this targeter from this old handle to the new handle.
|
getIndex, getPosition, getTarget, getTargetOffset, getTargetOffset, setIndex, setPosition, setTarget
accept, consumeStack, copy, equals, getComparator, getLength, getName, getOpcode, hashCode, isValidByte, isValidShort, produceStack, readInstruction, setComparator, toString, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
consumeStack
produceStack
@Deprecated protected int[] match
@Deprecated protected int[] indices
@Deprecated protected InstructionHandle[] targets
@Deprecated protected int fixed_length
@Deprecated protected int match_length
@Deprecated protected int padding
protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public boolean containsTarget(InstructionHandle ih)
InstructionTargeter
containsTarget
in interface InstructionTargeter
containsTarget
in class BranchInstruction
public void dump(DataOutputStream out) throws IOException
dump
in class BranchInstruction
out
- Output streamIOException
- Thrown when an I/O exception of some sort has occurred.public int[] getIndices()
public int[] getMatchs()
public InstructionHandle[] getTargets()
protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
initFromFile
in class BranchInstruction
bytes
- input streamwide
- wide prefix?IOException
- may be thrown if the implementation needs to read data from the fileInstructionList
public void setTarget(int i, InstructionHandle target)
public String toString(boolean verbose)
BranchInstruction
toString
in class BranchInstruction
verbose
- long/short format switchprotected int updatePosition(int offset, int maxOffset)
updatePosition
in class BranchInstruction
offset
- additional offset caused by preceding (variable length) instructionsmaxOffset
- the maximum offset that may be caused by these instructionspublic void updateTarget(InstructionHandle oldIh, InstructionHandle newIh)
InstructionTargeter
updateTarget
in interface InstructionTargeter
updateTarget
in class BranchInstruction
oldIh
- old targetnewIh
- new targetCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.