Fun
0.41.5
The programming language that makes You have fun
Main Page
Data Structures
Files
File List
Globals
Loading...
Searching...
No Matches
src
vm
core
jump_if_false.c
Go to the documentation of this file.
1
/*
2
* This file is part of the Fun programming language.
3
* https://fun-lang.xyz/
4
*
5
* Copyright 2025 Johannes Findeisen <you@hanez.org>
6
* Licensed under the terms of the Apache-2.0 license.
7
* https://opensource.org/license/apache-2-0
8
*/
9
27
28
case
OP_JUMP_IF_FALSE
: {
29
Value
cond = pop_value(vm);
30
int
truthy
=
value_is_truthy
(&cond);
31
free_value
(cond);
32
if
(!
truthy
) {
33
f
->ip = inst.operand;
34
}
35
break
;
36
}
OP_JUMP_IF_FALSE
@ OP_JUMP_IF_FALSE
Definition
bytecode.h:58
truthy
int truthy
Definition
jump_if_false.c:30
free_value
free_value(cond)
f
FILE * f
Definition
read_file.c:38
Value
Tagged union representing a Fun value.
Definition
value.h:68
value_is_truthy
int value_is_truthy(const Value *v)
Evaluate a Value's truthiness according to Fun language rules.
Definition
value.c:610
Generated on
for Fun by
1.16.1