test/928: pin chained-dot index base (o.in_.xs[i]) depth-independence (#48 review)

This commit is contained in:
2026-06-04 05:28:45 +09:00
parent d099c29b86
commit 288b21b1e9

View File

@@ -19,7 +19,8 @@
* Rows pin: the discovering repro shape (field-base slice index, all
* three variants matched both ways), the regex shape (56B-slot
* inst-like union over r.insts[i]; payload reads stay within the 32B
* cursor — words past R8 are #43's deferred residual), and the ident
* cursor — words past R8 are #43's deferred residual), a chained-dot
* base (o.in_.xs[i] — depth independence), and the ident
* scrutinee / ident-base array + slice index controls (byte-id at
* master per the #48 scoping probes; cs is untouched by the fix, so
* the per-row cs==ww cmp pins them unchanged). A call-BASE index
@@ -123,6 +124,32 @@ static const struct row rows[] = {
" return 0;\n"
"};\n",
0 },
/* Dot-DEPTH: the index base is a CHAINED dot (o.in_.xs[i] =
* N_INDEX over N_DOT over N_DOT) — pins that the stamped-carrier
* resolve is depth-independent (any non-ident base shape, not
* just one dot level). */
{ "dot_depth_idx",
TU_TYPES
"type inner = struct { xs: []tu, k: size };\n"
"type outer = struct { in_: inner, n: size };\n"
"export fn main() i32 = {\n"
" let sl: []tu = [(true: vb), ((9: size): vc)];\n"
" let o: outer;\n"
" o.in_.xs = sl;\n"
" o.in_.k = 1;\n"
" o.n = 2;\n"
" match (o.in_.xs[0]) {\n"
" case let b: vb => { if (!(b: bool)) { return 2; }; };\n"
" case => return 1;\n"
" };\n"
" match (o.in_.xs[1]) {\n"
" case va => return 3;\n"
" case let s: vc => { if ((s: size) != 9) { return 4; }; };\n"
" case vb => return 5;\n"
" };\n"
" return 0;\n"
"};\n",
0 },
/* Controls: ident scrutinee + ident-base array and slice index
* — the pre-existing matchscrutt/cgmatch paths the fix must not
* disturb (asm byte-id at master per the scoping probes). */