![]() | Fun 0.41.5 The programming language that makes You have fun |
Implements the OP_LTE opcode for less-than-or-equal comparison in the VM. More...
Go to the source code of this file.
Functions | |
| if (a.type !=VAL_INT||b.type !=VAL_INT) | |
| free_value (a) | |
| free_value (b) | |
| push_value (vm, res) | |
Variables | |
| case | OP_LTE |
| Value | a = pop_value(vm) |
| Value | res = make_int(a.i <= b.i ? 1 : 0) |
| break | |
Implements the OP_LTE opcode for less-than-or-equal comparison in the VM.
This file handles the OP_LTE instruction, which checks if the first value is less than or equal to the second. The values are popped from the stack, and the result (1 or 0) is pushed back.
Behavior:
Error Handling:
Example: // Bytecode: OP_LTE // Stack before: [42, 42] // Stack after: [1]
Definition in file lte.c.
| free_value | ( | a | ) |
| free_value | ( | b | ) |
| push_value | ( | vm | , |
| res | ) |