aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compile/compile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compile/compile.c b/src/compile/compile.c
index 5aab67e..2c72b91 100644
--- a/src/compile/compile.c
+++ b/src/compile/compile.c
@@ -1974,6 +1974,10 @@ static void resolve_top_reloc(jit_state_t *j, struct relocs *relocs, struct addr
assert(a);
jit_patch_there(j, r, a);
relocs_pop(relocs);
+
+ /* hope this turns into a tailcall */
+ if (relocs_len(relocs))
+ resolve_top_reloc(j, relocs, addrs, ii);
}
static void resolve_relocs(jit_state_t *j, struct relocs *relocs, struct addrs *addrs, size_t ii)