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
try_pop.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
10
/**
11
* @file try_pop.c
12
* @brief Implements the OP_TRY_POP opcode to end a try/catch region.
13
*
14
* This file handles the OP_TRY_POP instruction, which marks the end of the
15
* most recently started try/catch region in the current frame by popping its
16
* entry from the per-frame TRY stack.
17
*
18
* Behavior:
19
* - If f->try_sp >= 0, decrements f->try_sp (pops one TRY region).
20
* - Does not modify the value stack.
21
*
22
* Errors:
23
* - None; popping when no TRY is active is a no-op.
24
*/
25
26
case
OP_TRY_POP
: {
27
if
(
f
->try_sp >= 0)
f
->try_sp--;
28
break
;
29
}
OP_TRY_POP
@ OP_TRY_POP
Definition
bytecode.h:249
f
FILE * f
Definition
read_file.c:38
Generated on
for Fun by
1.16.1