![]() | Fun 0.41.5 The programming language that makes You have fun |
Implements the OP_AND opcode for logical AND 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_AND |
| Value | a = pop_value(vm) |
| int | res = value_is_truthy(&a) && value_is_truthy(&b) |
| break | |
Implements the OP_AND opcode for logical AND in the VM.
This file handles the OP_AND instruction, which performs a logical AND operation on two boolean values. The values are popped from the stack, and the result is pushed back.
Behavior:
Error Handling:
Example: // Bytecode: OP_AND // Stack before: [1, 0] // Stack after: [0]
Definition in file and.c.
| free_value | ( | a | ) |
| free_value | ( | b | ) |
| int res = value_is_truthy(&a) && value_is_truthy(&b) |