toolchain: banner purge + WHY-only comment sweep (rule 8)

selfhost/, cmd/, internal/ join the tree-wide sweep: every section
banner dies (91 selfhost + the cmd C-style dividers -> 0); narration
and stale contracts deleted (pre-#22 bundler notes, retired
single-PT_LOAD and no-archive claims, superseded ABI tables); every
ref/harec/qbe cite, task cite, encoding/ELF contract, and rule-10
twin pointer kept; lost lifetime/rationale lines restored where the
sweep over-cut (elf_globals ownership, kwtab linear-scan). Comment-
only proven: all five wwstage tool binaries byte-identical across
the sweep; test-commit, test-byteid (161+1399, 0 pinned-divergent),
and test-bootstrap (fixed point + 991-995 byte-id) all exit 0.
The read-through banked 66 latent-bug leads (checkpoint).
This commit is contained in:
2026-08-08 23:14:03 +09:00
parent 83f5956df2
commit 62b9d20383
60 changed files with 232 additions and 1045 deletions

View File

@@ -1,11 +1,8 @@
/*
* mem.c — arena allocator. No free per allocation; freearena releases
* the whole chain. Aligned to 16 so structs with 8-byte fields and
* doubles are happy.
*
* Hot allocations in the compiler land in arenas: tokens, AST nodes,
* symbols, types. The chunk size doubles up to a cap so we don't
* fragment on huge inputs.
* No free per allocation; freearena releases the whole chain.
* Aligned to 16 so structs with 8-byte fields and doubles are happy.
* The chunk size doubles up to a cap so we don't fragment on huge
* inputs.
*/
#include "ww.h"
#include <stdlib.h>
@@ -43,7 +40,6 @@ grow(Arena *a, u64 need)
if (ncap < need)
ncap = roundup(need, ALIGN);
/* push current chunk onto chain, allocate fresh head */
Arena *old = malloc(sizeof *old);
if (old == NULL)
fatal("arena: oom");