KOS_OP_RETURN_VAR
Style: VAR. Arg = pool index of the name.
Stack:
[...] → [...](no stack effect). Resolves the name in the current frame’s namespace, raisingNameErrorwhen it is unbound asKOS_OP_VARwould, and returns the value exactly asKOS_OP_RETURN1 returns a popped one.Compiler form: Produced by
ByteCodeProcessor.fuse_feederswhenKOS_OP_RETURN1 is fed by a bareKOS_OP_VAR. Lowers toKOS_OP_RETURN_FASTthrough the generic schema-drivenconvert_fastpath when the name has a fast slot.See also: KOS_OP_RETURN; KOS_OP_RETURN_FAST;
koskari/lib/opcode/RETURN_VAR.c.Covered by:
tests/lib/opcode/test_control_operand.py,tests/compile/test_fuse_feeders.py
Example: (return n) at module level, where n has no fast slot. Pool: 0 = n.
index |
opcode |
arg |
arg view |
comment |
|---|---|---|---|---|
0 |
RETURN_VAR |
0 |
0 (n) |
return the value of |