![]() | Fun 0.41.5 The programming language that makes You have fun |
Implements the OP_OR opcode for logical OR in the VM. More...
Go to the source code of this file.
Functions | |
| free_value (a) | |
| free_value (b) | |
| push_value (vm, make_bool(res)) | |
Variables | |
| case | OP_OR |
| Value | a = pop_value(vm) |
| int | res = value_is_truthy(&a) || value_is_truthy(&b) |
| break | |
Implements the OP_OR opcode for logical OR in the VM.
This file handles the OP_OR instruction, which performs a logical OR operation on two boolean values. The values are popped from the stack, and the result is pushed back.
Behavior:
Error Handling:
Example: // Bytecode: OP_OR // Stack before: [1, 0] // Stack after: [1]
Definition in file or.c.
| free_value | ( | a | ) |
| free_value | ( | b | ) |
| int res = value_is_truthy(&a) || value_is_truthy(&b) |