1
0
Fork 0
forked from fun/fun
fun/src/vm/core/jump_if_false.c

9 lines
188 B
C
Raw Normal View History

case OP_JUMP_IF_FALSE: {
Value cond = pop_value(vm);
int truthy = value_is_truthy(&cond);
free_value(cond);
if (!truthy) {
f->ip = inst.operand;
}
break;
}