diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-06-25 23:25:29 +0300 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-06-25 23:25:29 +0300 |
commit | 01052811be08444458576dda994d15f8823560ea (patch) | |
tree | c52f2d72ef0ef703e755fcf05ee5d3a02f050acc /src/execute.c | |
parent | 449ca1e570aa421992bbe98c6928def1ba8896fd (diff) | |
download | posthaste-01052811be08444458576dda994d15f8823560ea.tar.gz posthaste-01052811be08444458576dda994d15f8823560ea.zip |
initial rewrite to use ejit
+ Doesn't actually link yet due to missing stuff from ejit, will have to
add them (tomorrow?)
Diffstat (limited to 'src/execute.c')
-rw-r--r-- | src/execute.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/execute.c b/src/execute.c index 7da1a1a..cfa64fb 100644 --- a/src/execute.c +++ b/src/execute.c @@ -1,16 +1,10 @@ #include <posthaste/execute.h> #include <posthaste/lower.h> #include <posthaste/vec.h> +#include <ejit/ejit.h> void execute() { struct fn *f = find_fn(0); - void (*p)(int64_t *globals) = f->arena; - - struct vec globals = vec_create(sizeof(int64_t)); - vec_reserve(&globals, num_globals()); - - p(globals.buf); - - vec_destroy(&globals); + ejit_run_func(f->f, 0, NULL); } |