aboutsummaryrefslogtreecommitdiff
path: root/src/lower.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-03-13 19:38:52 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2025-03-13 19:38:52 +0200
commit8848ad8a546627e1e935c46950c7a9df759b320e (patch)
tree37edc965e348f2fd5433533ad963f7bd41be8a05 /src/lower.c
parent1283d90da7c16bf0e44118e0e9130f2274e2a0f8 (diff)
downloadposthaste-8848ad8a546627e1e935c46950c7a9df759b320e.tar.gz
posthaste-8848ad8a546627e1e935c46950c7a9df759b320e.zip
increase priority for loops
Diffstat (limited to 'src/lower.c')
-rw-r--r--src/lower.c3
1 files changed, 3 insertions, 0 deletions
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();
}