aboutsummaryrefslogtreecommitdiff
path: root/bcode.h
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-07-04 22:58:23 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-07-04 22:58:23 +0300
commit703e37ac56883f9a54b35960fde438c7cfba4592 (patch)
treea9cdf76bd3f3b0e91c320b56d4f2003e85e2636c /bcode.h
parent55df6ea5d5754cd0501d7df5e206f1e35d580f59 (diff)
downloadbcgen-703e37ac56883f9a54b35960fde438c7cfba4592.tar.gz
bcgen-703e37ac56883f9a54b35960fde438c7cfba4592.zip
add automatic buffer allocation
Diffstat (limited to 'bcode.h')
-rw-r--r--bcode.h4
1 files changed, 3 insertions, 1 deletions
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 */