diff options
Diffstat (limited to 'pit/src/runtime.c')
| -rw-r--r-- | pit/src/runtime.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pit/src/runtime.c b/pit/src/runtime.c index d4a0a62..ab65d71 100644 --- a/pit/src/runtime.c +++ b/pit/src/runtime.c @@ -45,6 +45,7 @@ pit_runtime *pit_runtime_new(u8 *buf, i64 len) { ret->traversal = pit_vec_new(pit_traversal_entry)(pit_arena_alloc_back(a, stack_size), stack_size); ret->callstack = pit_vec_new(pit_callstack_entry)(pit_arena_alloc_back(a, stack_size), stack_size); ret->saved_bindings = pit_vec_new(pit_value)(pit_arena_alloc_back(a, stack_size), stack_size); + ret->fuel = -1; ret->frozen_values = 0; ret->frozen_symtab = 0; ret->error = PIT_NIL; @@ -60,6 +61,10 @@ pit_runtime *pit_runtime_new(u8 *buf, i64 len) { return ret; } +void pit_runtime_set_fuel(pit_runtime *rt, i64 fuel) { + rt->fuel = fuel; +} + void pit_runtime_freeze(pit_runtime *rt) { rt->frozen_values = rt->heap->next; rt->frozen_symtab = rt->symtab->next; |
