wcc_ww/cgen: W1 #100 struct-lit fill gate keys off the chased stamped tinfo

The ww twin of B5-c1's :3195 cg_structlit_fill chase — closes the
R4-blessed one-train acceptance divergence (cs-loud / ww-SILENT-WRONG
on alias-element array fills, ken FLAG-3 / kb5_fill2). The #249 fill
arm's loud-gate element classification was alias-blind on two of four
keys: a raw N_TSLICE kind test and a structlookup leaf-name probe —
`type el = el0;` matched neither, bypassed the gate, and fell to the
scalar tail (one word per element, silent exit 1, gate-blind #263
class). Now: issliceel via isslicetype (stamped tinfo, the str/tagged
keys' existing route) and isstructel via tichase + TY_STRUCT kind —
the tnodeisagg discipline the neighboring #49 arm already uses, twin
of cstage type_chase_named at cgen.c:3179. NO new helper.

Loudness-alignment only, zero acceptance movement elsewhere: probe
matrix holds direct str/slice/struct/tagged elem LOUD (twin texts),
int/alias-int/f64 elem fills build + run 0/0 byte-id, 1- and 2-level
alias struct/slice/tagged elems now LOUD both stages.

ww-only: cs side untouched (zero C bytes; w6c up-to-date across the
edit). B5 detector rows hold post-B5 expected state (targ/tmem/wpush/
null/succ/f32p/def93 all 0/0 byte-id). 989 ratchet ZERO flips
(31 ID / 9 pinned-divergent / 3 pinned-wwreject). combined.ww regen'd
for both embedded targets (w6c_ww, wwdump).

944_alias_cgen_b5_run: fill2 graduates the dual-cell K_CSERR_WWRUN
pin to the K_BUILDERR LOUD-HOLD pair (fill0-class, shared experr
tail); fill0 control holds. Check count holds at 84/84 — the kind
flip is cell-count-neutral (2 driver cells either side, no byte-id
cell). All 944-family suites green; sizelint 0; test-unit all 291
passed. Closes #100; the R4 divergence window closes with it.
This commit is contained in:
2026-06-06 03:09:54 +09:00
parent 837fdb4753
commit 4cac1cbb89
4 changed files with 55 additions and 43 deletions

View File

@@ -20771,17 +20771,21 @@ fn cgstructlitfill(c: *cgen, si: *structinfo, lit: *node,
let elemn: *node = fi.tnode.lhs;
let isstrel: bool = isstrtype(c, elemn);
let istagel: bool = istaggedtype(c, elemn);
let issliceel: bool = false;
let issliceel: bool = isslicetype(c, elemn);
// #100: key the loud gate off the CHASED stamped
// tinfo (tichase, the tnodeisagg discipline), not
// the raw tnode — a bare N_TSLICE kind test /
// structlookup leaf-name probe is alias-blind, so
// `type el = el0;` bypassed the gate and fell to
// the scalar tail (silent wrong, ken kb5_fill2).
// Twin of cstage cg_structlit_fill's
// type_chase_named key (cgen.c:3179, B5-c1).
let isstructel: bool = false;
if (elemn != nil) {
if (elemn.kind == nkind.N_TSLICE) {
issliceel = true;
};
if (elemn.kind == nkind.N_TNAME) {
if (primsize(elemn.str) == 0) {
if (structlookup(c, elemn.str) != nil) {
isstructel = true;
};
let eu: *tinfo = tichase(elemn.type_: *tinfo);
if (eu != nil) {
if (eu.kind == tykind.TY_STRUCT) {
isstructel = true;
};
};
};

View File

@@ -4682,17 +4682,21 @@ fn cgstructlitfill(c: *cgen, si: *structinfo, lit: *node,
let elemn: *node = fi.tnode.lhs;
let isstrel: bool = isstrtype(c, elemn);
let istagel: bool = istaggedtype(c, elemn);
let issliceel: bool = false;
let issliceel: bool = isslicetype(c, elemn);
// #100: key the loud gate off the CHASED stamped
// tinfo (tichase, the tnodeisagg discipline), not
// the raw tnode — a bare N_TSLICE kind test /
// structlookup leaf-name probe is alias-blind, so
// `type el = el0;` bypassed the gate and fell to
// the scalar tail (silent wrong, ken kb5_fill2).
// Twin of cstage cg_structlit_fill's
// type_chase_named key (cgen.c:3179, B5-c1).
let isstructel: bool = false;
if (elemn != nil) {
if (elemn.kind == nkind.N_TSLICE) {
issliceel = true;
};
if (elemn.kind == nkind.N_TNAME) {
if (primsize(elemn.str) == 0) {
if (structlookup(c, elemn.str) != nil) {
isstructel = true;
};
let eu: *tinfo = tichase(elemn.type_: *tinfo);
if (eu != nil) {
if (eu.kind == tykind.TY_STRUCT) {
isstructel = true;
};
};
};

View File

@@ -20771,17 +20771,21 @@ fn cgstructlitfill(c: *cgen, si: *structinfo, lit: *node,
let elemn: *node = fi.tnode.lhs;
let isstrel: bool = isstrtype(c, elemn);
let istagel: bool = istaggedtype(c, elemn);
let issliceel: bool = false;
let issliceel: bool = isslicetype(c, elemn);
// #100: key the loud gate off the CHASED stamped
// tinfo (tichase, the tnodeisagg discipline), not
// the raw tnode — a bare N_TSLICE kind test /
// structlookup leaf-name probe is alias-blind, so
// `type el = el0;` bypassed the gate and fell to
// the scalar tail (silent wrong, ken kb5_fill2).
// Twin of cstage cg_structlit_fill's
// type_chase_named key (cgen.c:3179, B5-c1).
let isstructel: bool = false;
if (elemn != nil) {
if (elemn.kind == nkind.N_TSLICE) {
issliceel = true;
};
if (elemn.kind == nkind.N_TNAME) {
if (primsize(elemn.str) == 0) {
if (structlookup(c, elemn.str) != nil) {
isstructel = true;
};
let eu: *tinfo = tichase(elemn.type_: *tinfo);
if (eu != nil) {
if (eu.kind == tykind.TY_STRUCT) {
isstructel = true;
};
};
};