From 8848ad8a546627e1e935c46950c7a9df759b320e Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 13 Mar 2025 19:38:52 +0200 Subject: increase priority for loops --- src/lower.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/lower.c b/src/lower.c index 7f74a50..f08d5a0 100644 --- a/src/lower.c +++ b/src/lower.c @@ -907,12 +907,15 @@ static struct ejit_reloc branch_if(struct fn *f, struct ast *cond, bool branch) static void lower_until(struct fn *f, struct ast *n) { struct ejit_label l = ejit_label(f->f); + ejit_inc_prio(f->f, 100); /* completely arbitrary */ lower_list(f, until_body(n)); struct ast *cond = until_cond(n); struct ejit_reloc branch = branch_if(f, cond, false); ejit_patch(f->f, branch, l); + ejit_dec_prio(f->f, 100); + n->l = null_loc(); } -- cgit v1.2.3