selfhost/cmd/wcc: drop dead N_ALLOC from post-dispatch list (A.6.2.0c)

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.
This commit is contained in:
2026-05-21 21:05:50 +09:00
parent 1131e7b68d
commit 4e75285a0b
3 changed files with 3 additions and 3 deletions

View File

@@ -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 ||

View File

@@ -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 ||

View File

@@ -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 ||