From 5c11915931ad43617ba6f62189bb11630b9624d4 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 1 May 2025 13:51:36 +0300 Subject: use conts/vec instead of vendored version --- src/ejit.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/ejit.c') diff --git a/src/ejit.c b/src/ejit.c index 6a0ffb0..2341890 100644 --- a/src/ejit.c +++ b/src/ejit.c @@ -338,11 +338,11 @@ struct ejit_func *ejit_create_func(enum ejit_type rtype, size_t argc, f->rtype = rtype; - f->sign = types_create(); - f->insns = insns_create(); - f->labels = labels_create(); - f->gpr = gpr_stats_create(); - f->fpr = fpr_stats_create(); + f->sign = types_create(0); + f->insns = insns_create(0); + f->labels = labels_create(0); + f->gpr = gpr_stats_create(0); + f->fpr = fpr_stats_create(0); f->arena = NULL; f->direct_call = NULL; f->extern_call = NULL; @@ -416,12 +416,10 @@ void ejit_select_compile_func(struct ejit_func *f, size_t gpr, size_t fpr, /* just get labels, don't actually run anything yet */ ejit_run(f, 0, NULL, &labels); - foreach_vec(ii, f->insns) { - struct ejit_insn i = *insns_at(&f->insns, ii); - void *addr = labels[i.op]; + foreach(insns, i, &f->insns) { + void *addr = labels[i->op]; assert(addr); - i.addr = addr; - *insns_at(&f->insns, ii) = i; + i->addr = addr; } /* doesn't really matter what we put here as long as it isn't 0 */ -- cgit v1.2.3