KOS_OP_YIELD_FAST
Style: FASTVAR. Arg = fast slot index.
Stack:
[...] → [...](no stack effect). AsKOS_OP_YIELD_VAR, with the value read from the fast slot; an empty slot raisesNameErrorasKOS_OP_FASTwould. Marks the code as a generator.Compiler form: Post-compile only: the
convert_fastlowering ofKOS_OP_YIELD_VARwhen the name has a fast slot.See also: KOS_OP_YIELD_VAR;
koskari/lib/opcode/YIELD_FAST.c.Covered by:
tests/lib/opcode/test_control_operand.py,tests/compile/test_fuse_feeders.py
Example: (def g [a] (yield a)): the body yields its parameter.
index |
opcode |
arg |
arg view |
comment |
|---|---|---|---|---|
0 |
YIELD_FAST |
0 |
0 |
yield slot 0 ( |
1 |
RETURN |
0 |
0 |