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

Minimal executable exercising a subset of Fun VM opcodes. More...

#include "bytecode.h"
#include "value.h"
#include "vm.h"
#include <stdio.h>
Include dependency graph for test_opcodes.c:

Go to the source code of this file.

Functions

int main ()
 Minimal executable to exercise a subset of VM opcodes.

Detailed Description

Minimal executable exercising a subset of Fun VM opcodes.

Builds a tiny bytecode program that loads constants, performs arithmetic, prints results, and demonstrates optional Rust FFI calls. Used for quick manual verification of the VM dispatch and I/O helpers.

Definition in file test_opcodes.c.

Function Documentation

◆ main()

int main(void)

Minimal executable to exercise a subset of VM opcodes.

Builds a tiny bytecode chunk that loads two constants, adds them, and prints the result. Also demonstrates dumping bytecode and, optionally, calling Rust FFI examples when FUN_WITH_RUST is enabled.

Returns
Zero on success; non-zero on fatal VM or allocation errors.

Definition at line 33 of file test_opcodes.c.

Here is the call graph for this function: