Class WideForm


  • public class WideForm
    extends VariableInstructionForm
    This class implements the byte code form for the wide instruction. Unlike other instructions, it can take multiple forms, depending on what is being widened.
    • Constructor Detail

      • WideForm

        public WideForm​(int opcode,
                        java.lang.String name)
    • Method Detail

      • setByteCodeOperands

        public void setByteCodeOperands​(ByteCode byteCode,
                                        OperandManager operandManager,
                                        int codeLength)
        Description copied from class: ByteCodeForm
        When passed a byteCode, an OperandTable and a SegmentConstantPool, this method will set the rewrite of the byteCode appropriately.
        Specified by:
        setByteCodeOperands in class ByteCodeForm
        Parameters:
        byteCode - ByteCode to be updated (!)
        operandManager - OperandTable from which to draw info
        codeLength - Length of bytes (excluding this bytecode) from the beginning of the method. Used in calculating padding for some variable-length bytecodes (such as lookupswitch, tableswitch).
      • setByteCodeOperandsFormat1

        protected void setByteCodeOperandsFormat1​(int instruction,
                                                  ByteCode byteCode,
                                                  OperandManager operandManager,
                                                  int codeLength)
        This method sets the rewrite array for the bytecode using Format 1 of the JVM spec: an opcode and two index bytes. This is used for ?load/?store/ret
        Parameters:
        instruction - should be 132
        byteCode - the byte code whose rewrite array should be updated
        operandManager - the source of the operands
        codeLength - ignored
      • setByteCodeOperandsFormat2

        protected void setByteCodeOperandsFormat2​(int instruction,
                                                  ByteCode byteCode,
                                                  OperandManager operandManager,
                                                  int codeLength)
        This method sets the rewrite array for the bytecode using Format 2 of the JVM spec: an opcode, two index bytes, and two constant bytes. This is used for iinc.
        Parameters:
        instruction - int should be 132
        byteCode - ByteCode whose rewrite array should be updated
        operandManager - OperandManager source of the operands
        codeLength - ignored