Fun 0.41.5
The programming language that makes You have fun
Loading...
Searching...
No Matches
VM Struct Reference

The Fun virtual machine state. More...

#include <vm.h>

Collaboration diagram for VM:

Data Fields

Value stack [STACK_SIZE]
int sp
Frame frames [MAX_FRAMES]
int fp
Value globals [MAX_GLOBALS]
Value output [OUTPUT_SIZE]
int output_count
int output_is_partial [OUTPUT_SIZE]
long long instr_count
int current_line
int exit_code
int trace_enabled
int repl_on_error
int(* on_error_repl )(struct VM *vm)
int debug_step_mode
int debug_step_target_fp
long long debug_step_start_ic
int debug_stop_requested
struct { 
   char *   file 
   int   line 
   int   active 
breakpoints [64]
int break_count

Detailed Description

The Fun virtual machine state.

Holds the operand stack, call frames, globals, standard output capture, runtime counters, and debugger state. Functions in this header operate on this structure; callers must ensure proper initialization with vm_init() before use and call vm_free()/vm_reset() as appropriate.

Definition at line 110 of file vm.h.

Field Documentation

◆ active

int active

Definition at line 142 of file vm.h.

◆ break_count

int break_count

Definition at line 144 of file vm.h.

◆ [struct]

struct { ... } breakpoints[64]

◆ current_line

int current_line

Definition at line 125 of file vm.h.

◆ debug_step_mode

int debug_step_mode

Definition at line 134 of file vm.h.

◆ debug_step_start_ic

long long debug_step_start_ic

Definition at line 136 of file vm.h.

◆ debug_step_target_fp

int debug_step_target_fp

Definition at line 135 of file vm.h.

◆ debug_stop_requested

int debug_stop_requested

Definition at line 137 of file vm.h.

◆ exit_code

int exit_code

Definition at line 127 of file vm.h.

◆ file

char* file

Definition at line 140 of file vm.h.

◆ fp

int fp

Definition at line 115 of file vm.h.

◆ frames

Definition at line 114 of file vm.h.

◆ globals

Definition at line 117 of file vm.h.

◆ instr_count

long long instr_count

Definition at line 123 of file vm.h.

◆ line

int line

Definition at line 141 of file vm.h.

◆ on_error_repl

int(* on_error_repl) (struct VM *vm)

Definition at line 131 of file vm.h.

◆ output

Definition at line 119 of file vm.h.

◆ output_count

int output_count

Definition at line 120 of file vm.h.

◆ output_is_partial

int output_is_partial[OUTPUT_SIZE]

Definition at line 121 of file vm.h.

◆ repl_on_error

int repl_on_error

Definition at line 130 of file vm.h.

◆ sp

int sp

Definition at line 112 of file vm.h.

◆ stack

Definition at line 111 of file vm.h.

◆ trace_enabled

int trace_enabled

Definition at line 129 of file vm.h.


The documentation for this struct was generated from the following file: