wcc+w6c+w6c_ww: tuple slot layout SSoT — checker size = cgen slot stride (C-t0)

The checker computed TY_TUPLE size as the packed element-size sum
((u32,u32) = 8B) while every cgen cursor-transport site strode 8B
slots (16B). 16B tuples were blind to the split (slot == packed);
packed tuples hit it everywhere: cstage let-receive keyed on sz 16/32
missed sz 8 and dropped word 1, the cgfn param receive spilled
8B/element into a packed-sized local (saved-BP clobber, SIGSEGV), and
mixed (u32,f64)/(u32,str) shapes missed the receive arms entirely.

Slot layout is now the SSoT (user-ratified): the flip lives in the two
checkers' N_TTUPLE size computation only (check.c, check.ww
tupleelemslot + stamp); cgen's packed-keyed walks (t.N read, #235 len
arm, over-cap sret send/receive pair) align onto the slot stride, and
the wwstage t.N read gains the natural-width load (tnodeloadop) to
byte-id with cstage's fldloadop. ttupleelem.offset re-stamped
slot-cumulative (no consumers yet). The #242/#243 eightbyte-share
loud-stop dissolves by construction (no two narrows ever share an
eightbyte) — 940's eightbyte_share row graduates to a runtime
round-trip. Hare-layout divergence documented at both checker sites;
re-alignment is task #60. #32 send skew and #33 wwstage literal-let
receive are separate commits on this base.

941_tuple_slot_layout_run pins the matrix: 4 packed rows fail at the
parent (8/21 checks), 3 neutral anchors prove 16B/32B emission
untouched.
This commit is contained in:
2026-06-04 18:20:07 +09:00
parent 0139652180
commit fdfc2ce318
9 changed files with 500 additions and 106 deletions

View File

@@ -2658,8 +2658,15 @@ fn cgdot(c: *cgen, n: *node) void = {
emitline("(BP), X0\n");
return;
};
let sz: i32 = slotsize(c, tpt);
let op: str = tnodeloadop(c, tpt, sz);
// C-t0: load at the element's NATURAL
// width (narrow MOVL/MOVSXD/... at the
// slot base), not the 8B slot width —
// byte-id twin of cstage's fldloadop
// in the N_DOT TY_TUPLE arm.
let nsz: i32 = 8;
let tpti: *tinfo = tpt.type_: *tinfo;
if (tpti != nil) { nsz = tpti.size: i32; };
let op: str = tnodeloadop(c, tpt, nsz);
emitline("\t");
emitline(op);
emitline("\t");