aboutsummaryrefslogtreecommitdiff
path: root/src/execute.c
blob: 5f99dcdfbb3eade185c9d6a0990ae9b8847ddc14 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <posthaste/execute.h>
#include <posthaste/lower.h>
#include <posthaste/vec.h>
#include <ejit/ejit.h>

void execute()
{
	struct fn *f = find_fn(0);
	struct vec globals = vec_create(sizeof(int64_t));
	vec_reserve(&globals, num_globals());
	struct ejit_arg args[1] = {
		EJIT_ARG_POINTER(globals.buf)
	};

	ejit_run_func(f->f, 1, args);
	vec_destroy(&globals);
}