public abstract class Select extends BranchInstruction implements VariableLengthInstruction, StackProducer
LOOKUPSWITCH,
TABLESWITCH,
InstructionList,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected int |
fixed_length |
protected int[] |
indices |
protected int[] |
match |
protected int |
match_length |
protected int |
padding |
protected InstructionHandle[] |
targets |
index, position, targetlength, opcode| Modifier and Type | Method and Description |
|---|---|
boolean |
containsTarget(InstructionHandle ih) |
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. index) from file.
|
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 max_offset)
Since this is a variable length instruction, it may shift the following
instructions which then need to update their position.
|
void |
updateTarget(InstructionHandle old_ih,
InstructionHandle new_ih) |
getIndex, getTarget, getTargetOffset, getTargetOffset, setTargetaccept, consumeStack, copy, equals, getComparator, getLength, getName, getOpcode, produceStack, readInstruction, setComparator, toString, toStringclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitproduceStackprotected int[] match
protected int[] indices
protected InstructionHandle[] targets
protected int fixed_length
protected int match_length
protected int padding
protected int updatePosition(int offset,
int max_offset)
updatePosition in class BranchInstructionoffset - additional offset caused by preceding (variable length) instructionsmax_offset - the maximum offset that may be caused by these instructionspublic void dump(DataOutputStream out) throws IOException
dump in class BranchInstructionout - Output streamIOExceptionprotected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
initFromFile in class BranchInstructionbytes - input streamwide - wide prefix?IOExceptionInstructionListpublic String toString(boolean verbose)
BranchInstructiontoString in class BranchInstructionverbose - long/short format switchpublic final void setTarget(int i,
InstructionHandle target)
public void updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)
updateTarget in interface InstructionTargeterupdateTarget in class BranchInstructionold_ih - old targetnew_ih - new targetpublic boolean containsTarget(InstructionHandle ih)
containsTarget in interface InstructionTargetercontainsTarget in class BranchInstructionpublic int[] getMatchs()
public int[] getIndices()
public InstructionHandle[] getTargets()
Copyright © 2018–2021 mhoffrogge. All rights reserved.