Enum Class GeneratorOpDescriptor
java.lang.Object
java.lang.Enum<GeneratorOpDescriptor>
ai.timefold.jpyinterpreter.opcodes.descriptor.GeneratorOpDescriptor
- All Implemented Interfaces:
OpcodeDescriptor,Serializable,Comparable<GeneratorOpDescriptor>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPops TOS.If TOS is a generator iterator or coroutine object it is left as is.Another do nothing code.Create a generator, coroutine, or async generator from the current frame.TOS1 is a subgenerator, TOS is a value.Pops TOS and delegates to it as a subiterator from a generator.Pops TOS and yields it from a generator. -
Method Summary
Modifier and TypeMethodDescriptionstatic GeneratorOpDescriptorReturns the enum constant of this class with the specified name.static GeneratorOpDescriptor[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface ai.timefold.jpyinterpreter.opcodes.descriptor.OpcodeDescriptor
name
-
Enum Constant Details
-
RESUME
Another do nothing code. Performs internal tracing, debugging and optimization checks in CPython -
YIELD_VALUE
Pops TOS and yields it from a generator. -
YIELD_FROM
Pops TOS and delegates to it as a subiterator from a generator. -
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
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
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
-
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
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
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 nameNullPointerException- if the argument is null
-
getVersionMapping
- Specified by:
getVersionMappingin interfaceOpcodeDescriptor
-