![]() |
Fun 0.41.5
The programming language that makes you have fun!
|
Implements the OP_LOAD_GLOBAL opcode for loading global variables in the VM. More...
Go to the source code of this file.
Functions | |
| if (idx< 0||idx >=MAX_GLOBALS) | |
| fprintf (stderr, "DEBUG LOAD_GLOBAL[%d]: type=%d\n", idx, vm->globals[idx].type) | |
| push_value (vm, copy_value(&vm->globals[idx])) | |
Variables | |
| case | OP_LOAD_GLOBAL |
| break | |
Implements the OP_LOAD_GLOBAL opcode for loading global variables in the VM.
This file handles the OP_LOAD_GLOBAL instruction, which loads a global variable onto the stack using its index.
Behavior:
Error Handling:
Example:
Definition in file load_global.c.
| fprintf | ( | stderr | ) |
| if | ( | idx< 0||idx > | = MAX_GLOBALS | ) |
Definition at line 32 of file load_global.c.
| push_value | ( | vm | , |
| copy_value &->[] | idx ) |
| break |
Definition at line 40 of file load_global.c.
| case OP_LOAD_GLOBAL |
Definition at line 30 of file load_global.c.