diff options
| -rw-r--r-- | TODO.md | 3 | ||||
| -rw-r--r-- | src/compiler/expr.zc | 8 |
2 files changed, 7 insertions, 4 deletions
@@ -150,6 +150,9 @@ and pushed there. ### overnight 2026-10-15 (local only, nothing pushed) - post-destructor-merge triage: of the seven failures none came from destructors. zc0typed.zc used `.u` on a typed parameter (test fixed); self-hosted run-only images had stopped bounds-checking after a `//:lines` marker since 342538f (fixed: a marker ends `unbounded;`/`unchecked;`). `zcc static` and four lsp javascript-host tests failed only because `file` and `tsc` were missing on the box; both are installed now (apt, npm) and pass. with `tsc` present the lsp section takes about 26 minutes. - the genome outgrew its 0x68000-word reservation (426181 words): `genmap` now reserves 0x70000 and the rt.zc map block is regenerated. the heap shrank by 32k words, so tests/programs/gc.zc reclaims 937 (threshold now 900). +- x86-64 direct o3-to-o3 calls merged (`rcall_x64` / `rfinish_x64`, e765c3d). `make check` 214/0; icon regression 14/0; jit_x64 vs interp on o3* 17/17; o3_caller_replace and o3direct ok. post-rcall fib on x86-64 jit (ms/iter min): plain 0.54, o3 0.35 (o3 was 0.92 before direct calls). +- trees/sieve baseline on x86-64 jit after rcall, before allocator change (ms/iter min): trees plain new/free 2.88, o3 new/free 4.13, o3 arena 0.09; sieve plain 6.96, o3 checked 0.64, o3 raw 0.61. (older llvm note was plain 9.2 / o3 12.0.) +- allocator: o3 now uses `new_k` (size-class free lists) like plain code; `new_k`/`recycle_leaf` skip the o3 arg-fatten path. after: trees plain 2.78, o3 new/free 2.71, o3 arena 0.15. still open: emit the freelist pop/push as native code inside a compiled region (today every `new_k` still leaves via a normal call). ### how the work is organized - start with `ONBOARD.md` (reading order and exact commands), then diff --git a/src/compiler/expr.zc b/src/compiler/expr.zc index 1cd765b..9d7cc2b 100644 --- a/src/compiler/expr.zc +++ b/src/compiler/expr.zc @@ -144,7 +144,7 @@ int stamp_site() { // new(T) and new(T, count): a typed object, its type stamped into the header // new(T), new(T, n), new(T[?]), new(fixed T[?], n). a growable array goes to // dnew. otherwise the call is new_t(size, type), unless the size is known at -// compile time and we are not in o3 or a dry run: then the size class is +// compile time and we are not in a dry run: then the size class is // computed here and the call is new_k(size, type, class), which pops a block // straight off the class list. newsz and newleaf record what was allocated so // the variable it lands in can later be freed with the matching fast path. @@ -176,7 +176,7 @@ int newtyped() { lit(tsz(t)); lit(t); newsz = tsz(t); newleaf = 0; if (isleaf(t)) newleaf = t; - if (newsz <= 0x7FFFFFFF - rt.HDR && !o3on && !dry && lookup(s_new_k) >= 0) { lit(szclass(newsz)); fast = 1; } + if (newsz <= 0x7FFFFFFF - rt.HDR && !dry && lookup(s_new_k) >= 0) { lit(szclass(newsz)); fast = 1; } } expect(s_rp); stamp_site(); @@ -439,7 +439,7 @@ int call(int s) { rt.fill_w(bs, 0, 8); if (ngbind) { rt.copy_w(bs, gbind, ngbind); ngbind = 0; } np = 0; - if (o3on && !(sflag[s] & F_O3) && sname[s] != s_free && sname[s] != s_recycle) np = 1; // o3 calling normal code: fatten the arguments + if (o3on && !(sflag[s] & F_O3) && sname[s] != s_free && sname[s] != s_recycle && sname[s] != s_new_k && sname[s] != s_recycle_leaf) np = 1; // o3 calling normal code: fatten the arguments ifcall = s; effect_argument_base = 0; np = args(tags, ft, bs, np); storage = argfact; origin = argorigin; origins = argorigin_mask; temporary = argtemporary; owner = argowner; owner_fact = argowner_fact; @@ -456,7 +456,7 @@ int call(int s) { xaf = af_new(newsz, 2, cp); if (lsp > 0) newloop(cp); // a constant size: the class is known now, so use the allocator's direct path - if (newsz >= 0 && newsz <= 0x7FFFFFFF - rt.HDR && !o3on && !dry && lookup(s_new_k) >= 0) { // (a bigger size has no class: new_t stops it) + if (newsz >= 0 && newsz <= 0x7FFFFFFF - rt.HDR && !dry && lookup(s_new_k) >= 0) { // (a bigger size has no class: new_t stops it) lit(0); lit(szclass(newsz)); s = lookup(s_new_k); |
