Enum Class GeneratorOpDescriptor

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

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

    • RESUME

      public static final GeneratorOpDescriptor RESUME
      Another do nothing code. Performs internal tracing, debugging and optimization checks in CPython
    • YIELD_VALUE

      public static final GeneratorOpDescriptor YIELD_VALUE
      Pops TOS and yields it from a generator.
    • YIELD_FROM

      public static final GeneratorOpDescriptor YIELD_FROM
      Pops TOS and delegates to it as a subiterator from a generator.
    • GET_YIELD_FROM_ITER

      public static final GeneratorOpDescriptor GET_YIELD_FROM_ITER
      If TOS is a generator iterator or coroutine object it is left as is. Otherwise, implements TOS = iter(TOS).
    • GEN_START

      public static final GeneratorOpDescriptor GEN_START
      Pops TOS. The kind operand corresponds to the type of generator or coroutine. The legal kinds are 0 for generator, 1 for coroutine, and 2 for async generator.
    • SEND

      public static final GeneratorOpDescriptor SEND
      TOS1 is a subgenerator, TOS is a value. Calls TOS1.send(TOS) if self.thrownValue is null. Otherwise, set self.thrownValue to null and call TOS1.throwValue(TOS) instead. TOS is replaced by the subgenerator yielded value; TOS1 remains. When the subgenerator is exhausted, jump forward by its argument.
    • END_SEND

      public static final GeneratorOpDescriptor END_SEND
    • RETURN_GENERATOR

      public static final GeneratorOpDescriptor RETURN_GENERATOR
      Create a generator, coroutine, or async generator from the current frame. Clear the current frame and return the newly created generator. A no-op for us, since we detect if the code represent a generator (and if so, generate a wrapper function for it that act like RETURN_GENERATOR) before interpreting it
  • Method Details

    • values

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