wcc/cgen: #117 pin scalar-tuple-slice row (broad-arm in-suite net)
rob A-corrected: the broad TY_TUPLE arm stays; pin an accepted non-(str,*fn)
scalar-tuple slice in-suite. const [](i64,str) with TYPED 1i64 (untyped int
is ww-checker-rejected, #120); scalar-first so the i64 reads back via the
word0-correct whole-element cursor (#121: .1/word3 truncated). Distinct
values + len(t) + cs==ww byte-id lock the scalar-in-slice-backing path.
Base f8be2ae has no TY_TUPLE arm -> louds. Test-only; 17/17 ok.
This commit is contained in:
@@ -129,6 +129,27 @@ static const struct row rows[] = {
|
||||
" if (len(tbl) != 3) { return 1; };\n"
|
||||
" return 0;\n"
|
||||
"};\n", 0, K_RUN, NULL },
|
||||
/* #117 broad-arm pin (rob): the TY_TUPLE arm also backs an ACCEPTED
|
||||
* non-(str,*fn) scalar-tuple slice — (i64,str) with a TYPED i64 (a bare
|
||||
* untyped int is ww-checker-rejected, #120). Scalar FIRST so the i64
|
||||
* reads back via the word0-correct whole-element cursor (#121 read-path:
|
||||
* .1/word3 is truncated, same constraint as the fn-first row). DISTINCT
|
||||
* values catch a wrong per-row stride/offset; len(t) pins the header; the
|
||||
* str element rides the 32B backing (its DATAR + len pinned by cs==ww
|
||||
* byte-id). Base f8be2ae has no TY_TUPLE arm → louds (broad arm is new). */
|
||||
{ "scalar_tuple_slice",
|
||||
"package main;\n"
|
||||
"const t: [](i64, str) = [(10i64, \"a\"), (20i64, \"bb\")];\n"
|
||||
"export fn main() i32 = {\n"
|
||||
" let e0 = t[0];\n"
|
||||
" let e1 = t[1];\n"
|
||||
" let v0 = e0.0;\n"
|
||||
" let v1 = e1.0;\n"
|
||||
" if (v0 != 10) { return 1; };\n"
|
||||
" if (v1 != 20) { return 2; };\n"
|
||||
" if (len(t) != 2) { return 3; };\n"
|
||||
" return 0;\n"
|
||||
"};\n", 0, K_RUN, NULL },
|
||||
/* #119: scalar &fn module-globals — DISTINCT fns, each called back
|
||||
* through the reloc (pre-#119: no DATA → undefined ref / garbage). */
|
||||
{ "scalar_fnptr",
|
||||
|
||||
Reference in New Issue
Block a user