From 4e75285a0baf44f8784a3b6740561c004205c5e0 Mon Sep 17 00:00:00 2001 From: Hojun-Cho Date: Thu, 21 May 2026 21:05:50 +0900 Subject: [PATCH] selfhost/cmd/wcc: drop dead N_ALLOC from post-dispatch list (A.6.2.0c) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit N_ALLOC is a vestigial nkind enum entry. Defined in cstage cmd/wcc/ww.h:243 (comment: "lhs=expr, rhs=size-or-null") and mirrored in lib/ww/ast.ww:47, but no parser produces it — the alloc-call syntax routes via N_CALL with callee=alloc (check.ww :1479). Cstage cexpr has no case N_ALLOC; wwstage's listing it in the post-dispatch kind set at check.ww:482 was speculative. Remove the disjunct. Enum entry stays — sync with ww.h is the gate, not stamp-coverage. Broader dead-kind audit tracked as task #18. A.6.2 step 3 of 8 (γ order). `make test-unit` green; full `make test` batched per option B. --- selfhost/cmd/w6c/main.combined.ww | 2 +- selfhost/cmd/wcc/check.ww | 2 +- selfhost/cmd/wwdump/main.combined.ww | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/selfhost/cmd/w6c/main.combined.ww b/selfhost/cmd/w6c/main.combined.ww index 68d45b27..23656c27 100644 --- a/selfhost/cmd/w6c/main.combined.ww +++ b/selfhost/cmd/w6c/main.combined.ww @@ -7443,7 +7443,7 @@ fn resolvewalk(c: *checker, n: *node) void = { k == nkind.N_UN || k == nkind.N_CALL || k == nkind.N_INDEX || k == nkind.N_CAST || k == nkind.N_STRUCTLIT || k == nkind.N_ARRLIT || - k == nkind.N_ALLOC || k == nkind.N_RECV || + k == nkind.N_RECV || k == nkind.N_SLICE || k == nkind.N_SPREAD || k == nkind.N_TUPLE || k == nkind.N_TRYPROP || k == nkind.N_TRYUNW || k == nkind.N_TYPETEST || diff --git a/selfhost/cmd/wcc/check.ww b/selfhost/cmd/wcc/check.ww index 81a305b0..73069c15 100644 --- a/selfhost/cmd/wcc/check.ww +++ b/selfhost/cmd/wcc/check.ww @@ -479,7 +479,7 @@ fn resolvewalk(c: *checker, n: *node) void = { k == nkind.N_UN || k == nkind.N_CALL || k == nkind.N_INDEX || k == nkind.N_CAST || k == nkind.N_STRUCTLIT || k == nkind.N_ARRLIT || - k == nkind.N_ALLOC || k == nkind.N_RECV || + k == nkind.N_RECV || k == nkind.N_SLICE || k == nkind.N_SPREAD || k == nkind.N_TUPLE || k == nkind.N_TRYPROP || k == nkind.N_TRYUNW || k == nkind.N_TYPETEST || diff --git a/selfhost/cmd/wwdump/main.combined.ww b/selfhost/cmd/wwdump/main.combined.ww index 1871f1ab..b2adafb4 100644 --- a/selfhost/cmd/wwdump/main.combined.ww +++ b/selfhost/cmd/wwdump/main.combined.ww @@ -7443,7 +7443,7 @@ fn resolvewalk(c: *checker, n: *node) void = { k == nkind.N_UN || k == nkind.N_CALL || k == nkind.N_INDEX || k == nkind.N_CAST || k == nkind.N_STRUCTLIT || k == nkind.N_ARRLIT || - k == nkind.N_ALLOC || k == nkind.N_RECV || + k == nkind.N_RECV || k == nkind.N_SLICE || k == nkind.N_SPREAD || k == nkind.N_TUPLE || k == nkind.N_TRYPROP || k == nkind.N_TRYUNW || k == nkind.N_TYPETEST ||