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