Class LStoreInstruction

    • Constructor Detail

      • LStoreInstruction

        public LStoreInstruction​(int opcode,
                                 int offset,
                                 int varIndex)
        Constructs an LStoreInstruction.
        Parameters:
        opcode - The opcode of the instruction.
        offset - The bytecode offset of the instruction.
        varIndex - The index of the local variable to store.
    • Method Detail

      • write

        public void write​(DataOutputStream dos)
                   throws IOException
        Writes the LSTORE opcode and its operand (if any) to the DataOutputStream.
        Specified by:
        write in class Instruction
        Parameters:
        dos - The DataOutputStream to write to.
        Throws:
        IOException - If an I/O error occurs.
      • getStackChange

        public int getStackChange()
        Returns the change in stack size caused by this instruction.
        Specified by:
        getStackChange in class Instruction
        Returns:
        The stack size change (pops a long).
      • getLocalChange

        public int getLocalChange()
        Returns the change in local variables caused by this instruction.
        Specified by:
        getLocalChange in class Instruction
        Returns:
        The local variables size change (none).
      • toString

        public String toString()
        Returns a string representation of the instruction.
        Overrides:
        toString in class Instruction
        Returns:
        The mnemonic and variable index of the instruction.