Enum Class StackOpDescriptor

java.lang.Object
java.lang.Enum<StackOpDescriptor>
ai.timefold.jpyinterpreter.opcodes.descriptor.StackOpDescriptor
All Implemented Interfaces:
OpcodeDescriptor, Serializable, Comparable<StackOpDescriptor>, Constable

public enum StackOpDescriptor extends Enum<StackOpDescriptor> implements OpcodeDescriptor
  • Enum Constant Details

    • POP_TOP

      public static final StackOpDescriptor POP_TOP
      Removes the top-of-stack (TOS) item.
    • ROT_TWO

      public static final StackOpDescriptor ROT_TWO
      Swaps the two top-most stack items.
    • ROT_THREE

      public static final StackOpDescriptor ROT_THREE
      Lifts second and third stack item one position up, moves top down to position three.
    • ROT_FOUR

      public static final StackOpDescriptor ROT_FOUR
      Lifts second, third and fourth stack items one position up, moves top down to position four.
    • COPY

      public static final StackOpDescriptor COPY
      Push the i-th item to the top of the stack. The item is not removed from its original location. Uses 1-based indexing (TOS is 1, TOS1 is 2, ...) instead of 0-based indexing.
    • SWAP

      public static final StackOpDescriptor SWAP
      Swap TOS with the item at position i. Uses 1-based indexing (TOS is 1, TOS1 is 2, ...) instead of 0-based indexing.
    • DUP_TOP

      public static final StackOpDescriptor DUP_TOP
      Duplicates the reference on top of the stack.
    • DUP_TOP_TWO

      public static final StackOpDescriptor DUP_TOP_TWO
      Duplicates the two references on top of the stack, leaving them in the same order.
  • Method Details

    • values

      public static StackOpDescriptor[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static StackOpDescriptor valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getVersionMapping

      public VersionMapping getVersionMapping()
      Specified by:
      getVersionMapping in interface OpcodeDescriptor