From 17bdd42a0e6633747b163984c4e68313f5356f66 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Tue, 6 Oct 2026 03:57:14 +0100 Subject: JIT: books written back only for lists their nest keeps books of: a nest with no room left for a list's headroom kept its live count anyway (in x30, the 13th register) and wrote that stale count over the list's own after its appends went the unbooked way (a loop of appends after a doubly nested loop reading t.has, PURE_JIT=all: e.count 1 for 36) --- core/module-jit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/module-jit.c b/core/module-jit.c index 765d3cd..80a242e 100644 --- a/core/module-jit.c +++ b/core/module-jit.c @@ -558,6 +558,7 @@ static void books_back(Block *k, uint64_t mask) { continue; } if (!(mask >> c & 1) || (v->kind != C_LIVE && v->kind != C_PENDING)) continue; + if (!(k->loops[v->loop].books >> (v->list & 31) & 1)) continue; /* kept, but its books not (no room for all): the list's own */ int none = new_label(e); size_t bytes = row_bytes(k->m, v->list); load64(e, X16, X24, (size_t)v->list * sizeof(PureList *)); -- cgit v1.2.3