Fun 0.41.5
The programming language that makes You have fun
Loading...
Searching...
No Matches
jump_if_false.c File Reference

Implements the OP_JUMP_IF_FALSE opcode for conditional jumps in the VM. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 free_value (cond)
 if (!truthy)

Variables

case OP_JUMP_IF_FALSE
int truthy = value_is_truthy(&cond)
 break

Detailed Description

Implements the OP_JUMP_IF_FALSE opcode for conditional jumps in the VM.

This file handles the OP_JUMP_IF_FALSE instruction, which jumps if the top stack value is falsey (0, false, nil, etc).

Behavior:

  • Pops condition value from stack
  • Jumps to operand IP if falsey
  • Continues normally if truthy

Used for:

  • If statements
  • While loops
  • Logical expressions

Definition in file jump_if_false.c.

Function Documentation

◆ free_value()

free_value(cond)

◆ if()

if(!truthy)

Definition at line 32 of file jump_if_false.c.

Variable Documentation

◆ break

break

Definition at line 35 of file jump_if_false.c.

◆ OP_JUMP_IF_FALSE

case OP_JUMP_IF_FALSE

Definition at line 28 of file jump_if_false.c.

◆ truthy

int truthy = value_is_truthy(&cond)

Definition at line 30 of file jump_if_false.c.