![]() | Fun 0.41.5 The programming language that makes You have fun |
Implements the OP_VALUES opcode for retrieving map values in the VM. More...
Go to the source code of this file.
Functions | |
| if (m.type !=VAL_MAP) | |
| free_value (m) | |
| push_value (vm, arr) | |
Variables | |
| case | OP_VALUES |
| Value | arr = map_values_array(&m) |
| break | |
Implements the OP_VALUES opcode for retrieving map values in the VM.
This file handles the OP_VALUES instruction, which retrieves the values of a map and pushes them as an array onto the stack.
Behavior:
Error Handling:
Example: // Bytecode: OP_VALUES // Stack before: [{"a": 1, "b": 2}] // Stack after: [[1, 2]]
Definition in file values.c.
| free_value | ( | m | ) |
| push_value | ( | vm | , |
| arr | ) |
| Value arr = map_values_array(&m) |