KOS_OP_JUMP_FALSE

  • Style: LABEL. Arg = target pc (post-compile).

  • Stack: Pops one value; if false, jump to arg; else advance PC.

  • Invariants: Jump locality for target.

  • Compiler form: Pre-compile arg = string label; post-compile arg = pc.

Example: Jump if TOS is false (e.g. “else” branch). Pool: 0 = False, 1 = 42, 2 = 0.

index

opcode

arg

arg view

comment

0

CONST

0

0 (False)

stack: […, False]

1

JUMP_FALSE

4

4 (-> 4)

pop TOS; if false → pc=4

2

CONST

1

1 (42)

stack: […, 42]

3

JUMP

5

5 (-> 5)

4

LABEL

–

–

else

5

CONST

2

2 (0)

stack: […, 0]

6

RETURN

1

1