From 28396f012b64cb724949e191be98efbee18bf0c9 Mon Sep 17 00:00:00 2001 From: Hojun-Cho Date: Sat, 6 Jun 2026 20:54:39 +0900 Subject: [PATCH] =?UTF-8?q?wcc/cgen:=20#117=20review=20=E2=80=94=20cite=20?= =?UTF-8?q?#120=20at=20cstage=20tuple=20arm=20(cs-accept/ww-reject=20diver?= =?UTF-8?q?gence)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The #117 emit_slice_data TY_TUPLE arm fires for any foldable tuple row, but wwstage's checker admits only the (str,*fn) shape and loud-rejects the rest before cgen. Document the retained acceptance divergence at the site (rule 7/8) with the #120 pointer. Comment-only, asm-neutral. --- cmd/w6c/cgen.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cmd/w6c/cgen.c b/cmd/w6c/cgen.c index 65950829..f4e78088 100644 --- a/cmd/w6c/cgen.c +++ b/cmd/w6c/cgen.c @@ -15234,7 +15234,18 @@ emit_slice_data(FILE *out, Cg *c, const char *directive, const char *name, /* #117 aggregate-element arm: k tuple rows. Validate every row * first (two-pass, partial-row safe). The backing is ONE DATAW * (w6a ignores +off on DATAW), then per-row relocs at the - * row's backing-relative offset. */ + * row's backing-relative offset. + * + * #120 (retained divergence): this cgen arm fires for ANY + * foldable TY_TUPLE row, but wwstage's checker today admits + * only the (str,*fn) const-slice shape (fold-6's need) and + * loud-rejects the rest ("let: not assignable") before cgen. + * So non-(str,*fn) foldable tuple const-slices (e.g. + * `[](i64,i64)`, `[](str,i64)`) are cs-accept / ww-checker- + * reject — an acceptance divergence (ww LOUD, never silent), + * pre-train symmetric-loud, now backstopped only by ww's + * checker. Tracked by #120 (#29-kin); align is a checker-layer + * concern, out of this cgen fold's scope (rob NARROW). */ int stride = etype ? (int)etype->size : 0; for (Node *e = rhs->list; e; e = e->next) { Node *row = e;