test: banner purge + WHY-only comment sweep (rule 8)

Every section banner dies (103 -> 0) across test/lang, the observer
suites, the C carriers, and the five comment-heavy corpus fixtures;
banner provenance (#N cites, carrier numbers, repair-cluster labels)
folded into headers or adjacent WHY comments. Narration deleted; row
provenance, ref cites, divergence pins, and layout contracts kept
(fwd-ref decl-order guards and bootstrap-gate corpus rationale
restored where the sweep over-cut). Comment-only proven: all 3742
wwbuild workdir .s byte-identical before/after; test-commit and
test-byteid (161 lang + 1399 data, 0 pinned-divergent) green.
This commit is contained in:
2026-08-08 21:40:23 +09:00
parent aadc6618f0
commit 83f5956df2
120 changed files with 184 additions and 530 deletions

View File

@@ -2,10 +2,11 @@
// slice of a struct's `[N]T` FIELD (#252), the CHAINED-base close-out (#253),
// the signed-narrow N_DOT-base index load (#255), the call-arg consumption
// axis (#257), the tagged-element store/read/return cluster (#259/#261/#263),
// the aggregate addressable-rhs let-init / arg / return copy axes
// (#265/#268/#271), the array return-by-value ABI (#267), nested-array stride
// + array-of-struct element store + array-literal element store (#270), and
// the aggregate def-global copy (#268). Migrated from
// the aggregate deref-rhs let-init (#265), addressable-rhs let-init and
// def-global copy (#268), and aggregate-arg-from-any-source (#271) axes, the
// array return-by-value ABI (#267), nested-array outer stride (#270-2),
// element store (#270-1) + array-literal element store (#270-1c), and the
// aggregate index-base copy (#270-3a). Migrated from
// test/wcc/949_dotbase_addr_slice_run.c.
//
// The shared root: taking `&x.o[i]` / slicing `x.o[lo:hi]` / indexing a
@@ -28,19 +29,16 @@
package dotbase_addr_slice_test;
// ---- shared element-array struct shapes (field `o`) --------------------
type eu8 = struct { o: [4]u8 };
type ei32 = struct { o: [4]i32 };
type ei16 = struct { o: [4]i16 };
type ei8 = struct { o: [4]i8 };
// ---- chained-base shapes (#253): inner field `m`, pointer-outer ----------
type cinner = struct { m: [4]u8 }; // also the ctrl `e` shape
type couter = struct { p: *cinner };
type cinneri = struct { m: [4]i32 };
type couteri = struct { p: *cinneri };
// ============================ #252 bare-ident ============================
@test fn addr_local_u8() void = {
let x: eu8;
x.o[1] = 66u8;
@@ -112,7 +110,6 @@ fn sl_slice_ptr_u8(x: *eu8) u8 = { let s: []u8 = x.o[1:4]; return s[0]; };
assert(s[1]: i32 == 44i32);
};
// ============================ #253 chained-base ==========================
@test fn chain_ptr_rd() void = {
let a: cinner; a.m[1] = 66u8;
let o: couter; o.p = &a;
@@ -207,7 +204,6 @@ fn rd_ctrl_ptr_rd(p: *cinner) u8 = { return p.m[1]; };
assert(x.m[1]: i32 == 66i32);
};
// ============================ #255 signed-narrow =========================
@test fn nload_i32() void = {
let x: ei32;
x.o[2] = -5;
@@ -229,7 +225,6 @@ fn rd_ctrl_ptr_rd(p: *cinner) u8 = { return p.m[1]; };
assert(v: i32 == -5i32);
};
// ============================ #257 call-arg ==============================
fn rd_callarg_u8(b: []u8) i32 = { return b[0]: i32; };
@test fn callarg_u8() void = {
let x: eu8;
@@ -292,7 +287,6 @@ fn rd_callarg_strfield(s: str) i32 = { return len(s): i32; };
assert(rd_callarg_strfield(q.v[1:4]) == 3i32);
};
// ===================== #259/#261/#263 tagged cluster =====================
type etag = struct { o: [4](i32 | void) };
type etagnull = struct { o: [4](*i32 | void) };
type mtag2d = struct { g: [2][2](i32 | void) };
@@ -498,7 +492,6 @@ fn dot_tagged_dot_ret_ctrl(x: *wtagfield) (i32 | void) = { return x.f; };
assert(r == 63i32);
};
// ===================== #265 aggregate deref-rhs let-init =================
type t16 = struct { h: [4]u32 };
type t32 = struct { h: [8]u32 };
@@ -552,7 +545,6 @@ type t32 = struct { h: [8]u32 };
+c[6]+c[7]+c[8]+c[9]+c[10]): i32 == 66i32);
};
// ===================== #268 addressable-rhs let-init copy ================
@test fn ai_array16() void = {
let s: [4]u32;
s[0]=11u32; s[1]=22u32; s[2]=33u32; s[3]=44u32;
@@ -647,7 +639,6 @@ def Gsd: gT = gT { a = 10u32, b = 20u32, c = 30u32, d = 40u32 };
assert((c.a+c.b+c.c+c.d): i32 == 100i32);
};
// ===================== #267 array return-by-value ABI ====================
fn mk_ret_arr_u32_8() [2]u32 = { let a: [2]u32; a[0]=3u32; a[1]=4u32; return a; };
@test fn ret_arr_u32_8() void = {
let c = mk_ret_arr_u32_8();
@@ -717,7 +708,6 @@ fn mk_ctrl_struct_ret() sret3 = { let s: sret3; s.a=1u32;s.b=2u32;s.c=3u32; retu
assert((v.a+v.b+v.c): i32 == 6i32);
};
// ===================== #270-2 nested-array outer stride ==================
@test fn nest2d_u32() void = {
let a: [2][3]u32;
a[0][1] = 11u32;
@@ -741,7 +731,6 @@ fn mk_ctrl_struct_ret() sret3 = { let s: sret3; s.a=1u32;s.b=2u32;s.c=3u32; retu
assert((a[1][1] - a[0][1]): i32 == 48i32);
};
// ===================== #270-1 element store axes =========================
type efinner = struct { m: [4]u32 };
@test fn elemfield_store() void = {
let a: [3]efinner;
@@ -765,7 +754,6 @@ type efinner = struct { m: [4]u32 };
assert((arr[1][0]+arr[1][1]+arr[1][2]+arr[1][3]): i32 == 10i32);
};
// ===================== #270-3a aggregate index-base copy =================
type boxprim = struct { arr: [2][4]u32 };
@test fn letcopy_dot_prim() void = {
let s: [4]u32; s[0]=1u32; s[1]=2u32; s[2]=3u32; s[3]=4u32;
@@ -790,7 +778,6 @@ type boxprim = struct { arr: [2][4]u32 };
assert((c[0] + c[1] + c[2]): i32 == 18i32);
};
// ===================== #270-1c array-literal element store ===============
type inner2 = struct { a: u32, b: u32 };
@test fn arrlit_structlit() void = {
let x: [2]inner2 = [inner2{a=1u32,b=2u32}, inner2{a=3u32,b=4u32}];
@@ -804,7 +791,6 @@ type inner2 = struct { a: u32, b: u32 };
assert((x[0].a + x[0].b + x[1].a + x[1].b): i32 == 18i32);
};
// ===================== #271 aggregate ARG from any source ================
type argt16 = struct { x: i64, y: i64 };
type argo16 = struct { f: argt16 };