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
rust
get_sp.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 2026 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
18
31
case
OP_RUST_GET_SP
: {
32
#ifdef FUN_WITH_RUST
33
extern
int
fun_op_rget_sp
(
VM
* vm);
34
int
rc
=
fun_op_rget_sp
(vm);
35
(void)
rc
;
/* rc currently unused; 0 means OK */
36
#else
37
vm_raise_error
(vm,
"RUST_GET_SP requires FUN_WITH_RUST=ON at build time"
);
38
push_value(vm,
make_int
(-1));
39
#endif
40
break
;
41
}
OP_RUST_GET_SP
@ OP_RUST_GET_SP
Definition
bytecode.h:281
rc
int rc
Definition
fd_poll_read.c:26
VM
The Fun virtual machine state.
Definition
vm.h:110
make_int
Value make_int(int64_t v)
Construct a Value representing a 64-bit integer.
Definition
value.c:51
vm_raise_error
void vm_raise_error(VM *vm, const char *msg)
Raise a runtime error inside the VM, honoring try/catch/finally.
Definition
vm.c:248
fun_op_rget_sp
int fun_op_rget_sp(VM *vm)
Generated on
for Fun by
1.16.1