![]() | Fun 0.41.5 The programming language that makes You have fun |
Implements the OP_RETURN opcode for returning from a function in the VM. More...

Go to the source code of this file.
Functions | |
| if (vm->sp >=0) retv | |
| vm_pop_frame (vm) | |
| push_value (vm, retv) | |
Variables | |
| case | OP_RETURN |
| else | retv = make_nil() |
| break | |
Implements the OP_RETURN opcode for returning from a function in the VM.
This file handles the OP_RETURN instruction, which returns from the current function and optionally pushes a return value onto the stack.
Behavior:
Error Handling:
Example: // Bytecode: OP_RETURN // Stack before: [42] // Stack after: [42]
Definition in file return.c.
| push_value | ( | vm | , |
| retv | ) |
| vm_pop_frame | ( | vm | ) |