java.lang.Object
com.sun.jdo.api.persistence.enhancer.classfile.Insn
All Implemented Interfaces:
VMConstants
Direct Known Subclasses:
InsnConstOp, InsnIInc, InsnIntOp, InsnLookupSwitch, InsnMultiDimArrayNew, InsnSingle, InsnTableSwitch, InsnTarget, InsnTargetOp

public abstract class Insn extends Object implements VMConstants
Insn is an abstract class which represents a java VM instruction in a sequence of instructions.
  • Field Details

  • Method Details

    • next

      public Insn next()
      Returns the next instruction in the code sequence
    • prev

      public Insn prev()
      Returns the previous instruction in the code sequence
    • remove

      public void remove()
      Removes the current instruction from it's embedding sequence.
    • setNext

      public Insn setNext(Insn i)
      Insert the single instruction in the code sequence after this instruction. Returns the inserted instruction.
    • insert

      public Insn insert(Insn i)
      Insert an instruction sequence in the code sequence after this instruction. Returns the final instruction.
    • append

      public Insn append(Insn i)
      Append an instruction sequence at the end of this instruction sequence. Returns the final instruction.
    • opcode

      public int opcode()
      Return the opcode for this instruction
    • offset

      public int offset()
      Return the offset of this instruction in the containing code sequence
    • nStackArgs

      public abstract int nStackArgs()
      How many words of stack operands does this instruction take?
    • nStackResults

      public abstract int nStackResults()
      How many words of stack results does this instruction deposit?
    • argTypes

      public abstract String argTypes()
      What are the types of the stack operands ?
    • resultTypes

      public abstract String resultTypes()
      What are the types of the stack results?
    • branches

      public abstract boolean branches()
      Does this instruction branch?
    • markTargets

      public void markTargets()
      Mark possible branch targets
    • opName

      public static String opName(int opcode)
      Return the name of the operation for a given opcode
    • create

      public static Insn create(int theOpCode)
      Create an instruction which requires no immediate operands
    • create

      public static Insn create(int theOpCode, ConstBasic constValue)
      Create an instruction which requires a single constant from the constant pool as an immediate operand.
    • create

      public static Insn create(int theOpCode, int intValue)
      Create an instruction which requires a single integral constant as an immediate operand.
    • create

      public static Insn create(int theOpCode, InsnTarget target)
      Create an instruction which requires a single branch offset as an immediate operand.
    • printList

      public void printList(PrintStream out)
      Print the sequence of instructions to the output stream
    • printInsn

      public void printInsn(PrintStream out)
      Print this instruction to the output stream
    • loadStoreDataType

      public static final int loadStoreDataType(int opcode)
      Return the type of value manipulated by the load/store instruction