haku2: add stats + fix crash w uninit vm
This commit is contained in:
parent
e667c6336a
commit
00a48527ca
12 changed files with 88 additions and 71 deletions
|
@ -12,11 +12,11 @@ const Value = value.Value;
|
|||
|
||||
const Vm = @This();
|
||||
|
||||
stack: []Value,
|
||||
stack: []Value = &.{},
|
||||
stack_top: u32 = 0,
|
||||
call_stack: []CallFrame,
|
||||
call_stack: []CallFrame = &.{},
|
||||
call_stack_top: u32 = 0,
|
||||
defs: []Value,
|
||||
defs: []Value = &.{},
|
||||
fuel: u32 = 0, // NOTE: VM must be refueled via reset() before running code
|
||||
exception: ?Exception = null,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue