From 703e37ac56883f9a54b35960fde438c7cfba4592 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Tue, 4 Jul 2023 22:58:23 +0300 Subject: add automatic buffer allocation --- bcode.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bcode.h') diff --git a/bcode.h b/bcode.h index 6683686..e25d32a 100644 --- a/bcode.h +++ b/bcode.h @@ -20,13 +20,15 @@ struct run_state { struct compile_state { struct run_state s; void* (*labels); + size_t size; size_t pc; }; #include "gen/select.h" -void run(struct compile_state *cs); +gbreg_t run(struct compile_state *cs); void init(struct compile_state *cs); void destroy(struct compile_state *cs); +void patch(struct compile_state *cs, breloc_t reloc, breg_t imm); #endif /* BCGEN_BCODE_H */ -- cgit v1.3