KOS_OP_RETURN_CONST
Style: CONST. Arg = pool index of the constant to return.
Stack:
[...] → [...](no stack effect). Returns the constant exactly asKOS_OP_RETURN1 returns a popped value: the same plain, region and resume deliveries, else the RETURN signal to the trampoline.Compiler form: Produced by
ByteCodeProcessor.fuse_feederswhenKOS_OP_RETURN1 is fed by a bareKOS_OP_CONST. ANoneconstant takesKOS_OP_RETURN0 in the earlier squish pass instead.See also: KOS_OP_RETURN; compile/return;
koskari/lib/opcode/RETURN_CONST.c.Covered by:
tests/lib/opcode/test_control_operand.py,tests/compile/test_fuse_feeders.py
Example: (return 42) after compress. Pool: 0 = 42.
index |
opcode |
arg |
arg view |
comment |
|---|---|---|---|---|
0 |
RETURN_CONST |
0 |
0 (42) |
return 42; nothing pushed first |