Enum Class MetaOpDescriptor

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

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

    • NOP

      public static final MetaOpDescriptor NOP
      Do nothing code. Used as a placeholder by the bytecode optimizer.
    • CACHE

      public static final MetaOpDescriptor CACHE
      A no-op code used by CPython to hold arbitrary data for JIT.
    • PRECALL

      public static final MetaOpDescriptor PRECALL
      Prefixes FunctionOpDescriptor.CALL. Logically this is a no op. It exists to enable effective specialization of calls. argc is the number of arguments as described in CALL.
    • MAKE_CELL

      public static final MetaOpDescriptor MAKE_CELL
    • COPY_FREE_VARS

      public static final MetaOpDescriptor COPY_FREE_VARS
    • CALL_INTRINSIC_1

      public static final MetaOpDescriptor CALL_INTRINSIC_1
    • EXTENDED_ARG

      public static final MetaOpDescriptor EXTENDED_ARG
    • LOAD_BUILD_CLASS

      public static final MetaOpDescriptor LOAD_BUILD_CLASS
      Pushes builtins.__build_class__() onto the stack. It is later called by CALL_FUNCTION to construct a class.
    • SETUP_ANNOTATIONS

      public static final MetaOpDescriptor SETUP_ANNOTATIONS
      Checks whether __annotations__ is defined in locals(), if not it is set up to an empty dict. This opcode is only emitted if a class or module body contains variable annotations statically. TODO: Properly implement this
  • Method Details

    • values

      public static MetaOpDescriptor[] 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 MetaOpDescriptor 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