![]() | Fun 0.41.5 The programming language that makes You have fun |
Implements the OP_LOAD_LOCAL opcode for loading local variables in the VM. More...

Go to the source code of this file.
Functions | |
| if (slot< 0||slot >=MAX_FRAME_LOCALS) | |
| push_value (vm, val) | |
Variables | |
| case | OP_LOAD_LOCAL |
| Value | val = copy_value(&f->locals[slot]) |
| break | |
Implements the OP_LOAD_LOCAL opcode for loading local variables in the VM.
This file handles the OP_LOAD_LOCAL instruction, which loads a local variable onto the stack using its index.
Behavior:
Error Handling:
Example: // Bytecode: OP_LOAD_LOCAL 0 // Stack before: [] // Stack after: [local_value]
Definition in file load_local.c.
| if | ( | slot< 0||slot > | = MAX_FRAME_LOCALS | ) |
Definition at line 32 of file load_local.c.
| push_value | ( | vm | , |
| val | ) |
| break |
Definition at line 38 of file load_local.c.
| case OP_LOAD_LOCAL |
Definition at line 30 of file load_local.c.
| Value val = copy_value(&f->locals[slot]) |
Definition at line 36 of file load_local.c.