| java.lang.Object proguard.classfile.instruction.Instruction
All known Subclasses: proguard.classfile.instruction.BranchInstruction, proguard.classfile.instruction.SwitchInstruction, proguard.classfile.instruction.ConstantInstruction, proguard.classfile.instruction.VariableInstruction, proguard.classfile.instruction.SimpleInstruction,
Instruction | abstract public class Instruction (Code) | | Base class for representing instructions.
author: Eric Lafortune |
Field Summary | |
public byte | opcode |
Method Summary | |
abstract public void | accept(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, InstructionVisitor instructionVisitor) Accepts the given visitor. | public byte | canonicalOpcode() Returns the canonical opcode of this instruction, i.e. | public String | getName() Returns the name of the instruction. | public boolean | isCategory2() Returns whether the instruction is a Category 2 instruction. | protected boolean | isWide() Returns whether the instruction is wide, index.e. | abstract public int | length(int offset) Returns the length in bytes of the instruction. | protected static int | readByte(byte[] code, int offset) | abstract protected void | readInfo(byte[] code, int offset) Reads the data following the instruction opcode. | protected static int | readInt(byte[] code, int offset) | protected static int | readShort(byte[] code, int offset) | protected static int | readSignedByte(byte[] code, int offset) | protected static int | readSignedShort(byte[] code, int offset) | protected static int | readSignedValue(byte[] code, int offset, int valueSize) | protected static int | readValue(byte[] code, int offset, int valueSize) | abstract public Instruction | shrink() Shrinks this instruction to its shortest possible form. | public int | stackPopCount(Clazz clazz) Returns the number of entries popped from the stack during the execution
of the instruction. | public int | stackPushCount(Clazz clazz) Returns the number of entries pushed onto the stack during the execution
of the instruction. | public String | toString(int offset) Returns a description of the instruction, at the given offset. | final public void | write(CodeAttribute codeAttribute, int offset) Writes the Instruction at the given offset in the given code attribute. | final public void | write(byte[] code, int offset) Writes the Instruction at the given offset in the given code array. | protected static void | writeByte(byte[] code, int offset, int value) | abstract protected void | writeInfo(byte[] code, int offset) Writes data following the instruction opcode. | protected static void | writeInt(byte[] code, int offset, int value) | protected static void | writeShort(byte[] code, int offset, int value) | protected static void | writeSignedByte(byte[] code, int offset, int value) | protected static void | writeSignedShort(byte[] code, int offset, int value) | protected static void | writeSignedValue(byte[] code, int offset, int value, int valueSize) | protected static void | writeValue(byte[] code, int offset, int value, int valueSize) |
opcode | public byte opcode(Code) | | |
canonicalOpcode | public byte canonicalOpcode()(Code) | | Returns the canonical opcode of this instruction, i.e. typically the
opcode whose extension has been removed.
|
getName | public String getName()(Code) | | Returns the name of the instruction.
|
isCategory2 | public boolean isCategory2()(Code) | | Returns whether the instruction is a Category 2 instruction. This means
that it operates on long or double arguments.
|
isWide | protected boolean isWide()(Code) | | Returns whether the instruction is wide, index.e. preceded by a wide opcode.
With the current specifications, only variable instructions can be wide.
|
length | abstract public int length(int offset)(Code) | | Returns the length in bytes of the instruction.
|
readByte | protected static int readByte(byte[] code, int offset)(Code) | | |
readInfo | abstract protected void readInfo(byte[] code, int offset)(Code) | | Reads the data following the instruction opcode.
|
readInt | protected static int readInt(byte[] code, int offset)(Code) | | |
readShort | protected static int readShort(byte[] code, int offset)(Code) | | |
readSignedByte | protected static int readSignedByte(byte[] code, int offset)(Code) | | |
readSignedShort | protected static int readSignedShort(byte[] code, int offset)(Code) | | |
readSignedValue | protected static int readSignedValue(byte[] code, int offset, int valueSize)(Code) | | |
readValue | protected static int readValue(byte[] code, int offset, int valueSize)(Code) | | |
shrink | abstract public Instruction shrink()(Code) | | Shrinks this instruction to its shortest possible form.
this instruction. |
stackPopCount | public int stackPopCount(Clazz clazz)(Code) | | Returns the number of entries popped from the stack during the execution
of the instruction.
|
stackPushCount | public int stackPushCount(Clazz clazz)(Code) | | Returns the number of entries pushed onto the stack during the execution
of the instruction.
|
toString | public String toString(int offset)(Code) | | Returns a description of the instruction, at the given offset.
|
write | final public void write(CodeAttribute codeAttribute, int offset)(Code) | | Writes the Instruction at the given offset in the given code attribute.
|
write | final public void write(byte[] code, int offset)(Code) | | Writes the Instruction at the given offset in the given code array.
|
writeByte | protected static void writeByte(byte[] code, int offset, int value)(Code) | | |
writeInfo | abstract protected void writeInfo(byte[] code, int offset)(Code) | | Writes data following the instruction opcode.
|
writeInt | protected static void writeInt(byte[] code, int offset, int value)(Code) | | |
writeShort | protected static void writeShort(byte[] code, int offset, int value)(Code) | | |
writeSignedByte | protected static void writeSignedByte(byte[] code, int offset, int value)(Code) | | |
writeSignedShort | protected static void writeSignedShort(byte[] code, int offset, int value)(Code) | | |
writeSignedValue | protected static void writeSignedValue(byte[] code, int offset, int value, int valueSize)(Code) | | |
writeValue | protected static void writeValue(byte[] code, int offset, int value, int valueSize)(Code) | | |
|
|