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:
@@ -1,4 +1,4 @@
|
||||
// alias_cgen_b5_test — #5 alias arc F2b (B5 train): the cstage cgen helper +
|
||||
// #5 alias arc F2b (B5 train): the cstage cgen helper +
|
||||
// funnel internalization through type_chase_named (c1), the #73 tripwire
|
||||
// graduation (c2), the #89 cgreturn return-position widen (c3) and the #93
|
||||
// deref-index pointee chase (c4). Each was a 2-level (alias-over-alias) or
|
||||
@@ -16,12 +16,10 @@
|
||||
|
||||
package alias_cgen_b5_test;
|
||||
|
||||
// --- c1: signed_ctl
|
||||
type signed_s0 = i8;
|
||||
type signed_s1 = signed_s0;
|
||||
type signed_st = struct { f: signed_s1, g: signed_s1 };
|
||||
|
||||
// --- c1: targ_2lvl / wpush_2lvl share the (void|i64) 2-lvl alias + matcher.
|
||||
type targ_u0 = (void | i64);
|
||||
type targ_u = targ_u0;
|
||||
fn targ_h(v: targ_u) i32 = {
|
||||
@@ -31,7 +29,7 @@ fn targ_h(v: targ_u) i32 = {
|
||||
};
|
||||
};
|
||||
|
||||
// --- c1: tmem_2lvl (>48B MEMORY-class twin)
|
||||
// >48B MEMORY-class twin of targ_2lvl.
|
||||
type tmem_big = struct { a: i64, b: i64, c: i64, d: i64, e: i64, f: i64, g: i64 };
|
||||
type tmem_m0 = (void | tmem_big);
|
||||
type tmem_m = tmem_m0;
|
||||
@@ -42,18 +40,15 @@ fn tmem_h(v: tmem_m) i32 = {
|
||||
};
|
||||
};
|
||||
|
||||
// --- c1: wstore_2lvl
|
||||
type wstore_u0 = (void | i64);
|
||||
type wstore_u = wstore_u0;
|
||||
|
||||
// --- c1: wstore_1lvl
|
||||
type wstore1_u = (void | i64);
|
||||
|
||||
// --- c1: wstore_a_2lvl
|
||||
type wstorea_u0 = (void | i64);
|
||||
type wstorea_u = wstorea_u0;
|
||||
|
||||
// --- c1: succ_2lvl (`?`-success remap over 2-lvl alias result)
|
||||
// `?`-success remap over a 2-lvl alias result.
|
||||
type succ_e0 = !i64;
|
||||
type succ_r0 = (i64 | succ_e0);
|
||||
type succ_r = succ_r0;
|
||||
@@ -66,70 +61,58 @@ fn succ_outer() succ_r = {
|
||||
return v + 1;
|
||||
};
|
||||
|
||||
// --- c1: null_2lvl
|
||||
type null_np0 = (*i64 | void);
|
||||
type null_np = null_np0;
|
||||
|
||||
// --- c1: f32p_2lvl
|
||||
type f32p_in0 = struct { a: f64 };
|
||||
type f32p_in1 = f32p_in0;
|
||||
type f32p_pt = struct { x: f32p_in1, y: f64 };
|
||||
fn f32p_g(p: f32p_pt) f64 = { return p.x.a + p.y; };
|
||||
|
||||
// --- c1: tuparg_bound99 / tuparg_cast_bound99 (2-lvl alias tuple param)
|
||||
type tparg_tp0 = (i64, i64);
|
||||
type tparg_tp = tparg_tp0;
|
||||
fn tparg_f(t: tparg_tp) i64 = { return t.0 + t.1; };
|
||||
|
||||
// --- c1: tuparg1_bound99 (1-level identical, not alias-depth)
|
||||
// 1-level control (not alias-depth).
|
||||
type tparg1_tp = (i64, i64);
|
||||
fn tparg1_f(t: tparg1_tp) i64 = { return t.0 + t.1; };
|
||||
|
||||
// --- c1: tupglobal_bound99 (alias-tuple module-global)
|
||||
type tpglob_tp0 = (i64, i64);
|
||||
type tpglob_tp = tpglob_tp0;
|
||||
let tpglob_G: tpglob_tp = (4, 9);
|
||||
|
||||
// --- c2: g73_idxstore
|
||||
type g73is_sl = []int;
|
||||
type g73is_sl2 = g73is_sl;
|
||||
type g73is_box = struct { s: g73is_sl2, n: int };
|
||||
|
||||
// --- c2: g73_strfield
|
||||
type g73sf_s1t = str;
|
||||
type g73sf_s2t = g73sf_s1t;
|
||||
type g73sf_box = struct { s: g73sf_s2t, n: int };
|
||||
fn g73sf_noise(x: int) int = { return x * 7 + 3; };
|
||||
|
||||
// --- c2: g73_tagfield
|
||||
type g73tf_tu0 = (void | i64);
|
||||
type g73tf_tu = g73tf_tu0;
|
||||
type g73tf_box = struct { u: g73tf_tu, n: int };
|
||||
|
||||
// --- c2: g73_idxread
|
||||
type g73ir_sl = []int;
|
||||
type g73ir_sl2 = g73ir_sl;
|
||||
type g73ir_box = struct { s: g73ir_sl2, n: int };
|
||||
fn g73ir_noise(x: int) int = { return x * 7 + 3; };
|
||||
|
||||
// --- c2: g73_ptrread
|
||||
type g73pr_sl = []int;
|
||||
type g73pr_sl2 = g73pr_sl;
|
||||
type g73pr_inner = struct { s: g73pr_sl2, n: int };
|
||||
type g73pr_outer = struct { pi: *g73pr_inner };
|
||||
fn g73pr_noise(x: int) int = { return x * 7 + 3; };
|
||||
|
||||
// --- c2: g73_tupread
|
||||
type g73tr_sl = []int;
|
||||
type g73tr_sl2 = g73tr_sl;
|
||||
|
||||
// --- c2: g73_static_struct (alias-tuple/struct module-global)
|
||||
type g73ss_in0 = struct { a: i64, b: i64 };
|
||||
type g73ss_in1 = g73ss_in0;
|
||||
type g73ss_box = struct { i: g73ss_in1, n: i64 };
|
||||
let g73ss_g: g73ss_box = g73ss_box { i = g73ss_in0 { a = 4, b = 9 }, n = 5 };
|
||||
|
||||
// --- c3: g89_ret_widen
|
||||
type g89w_base = struct { a: size, b: size };
|
||||
type g89w_ali = g89w_base;
|
||||
fn g89w_mk() (void | g89w_ali) = {
|
||||
@@ -138,7 +121,6 @@ fn g89w_mk() (void | g89w_ali) = {
|
||||
return x;
|
||||
};
|
||||
|
||||
// --- c3: g89_ret_errunion
|
||||
type g89e_failure = struct { code: i32, aux: size };
|
||||
type g89e_myerr = g89e_failure;
|
||||
fn g89e_work(bad: bool) (i32 | g89e_myerr) = {
|
||||
@@ -150,7 +132,6 @@ fn g89e_work(bad: bool) (i32 | g89e_myerr) = {
|
||||
return 42;
|
||||
};
|
||||
|
||||
// --- c3: g89_ret_named_ctl (bare NAMED struct return control)
|
||||
type g89c_base = struct { a: size, b: size };
|
||||
fn g89c_make() (void | g89c_base) = {
|
||||
let x: g89c_base;
|
||||
@@ -158,20 +139,15 @@ fn g89c_make() (void | g89c_base) = {
|
||||
return x;
|
||||
};
|
||||
|
||||
// --- c4: g93_l2_local
|
||||
type g93l_arr = [3]int;
|
||||
type g93l_arr2 = g93l_arr;
|
||||
|
||||
// --- c4: g93_def (def twin over a 2-lvl alias def array)
|
||||
type g93d_arr0 = [3]i64;
|
||||
type g93d_arr = g93d_arr0;
|
||||
def g93d_D: g93d_arr = [18i64, 29i64, 40i64];
|
||||
|
||||
// --- c4: g93_1lvl_ctl (1-level pointee control)
|
||||
type g93c_arr = [3]int;
|
||||
|
||||
// ===== c1: helper + funnel internalization =====
|
||||
|
||||
@test fn signed_ctl() void = {
|
||||
let x: signed_st;
|
||||
x.f = -5;
|
||||
@@ -264,8 +240,6 @@ type g93c_arr = [3]int;
|
||||
assert(tpglob_G.0 + tpglob_G.1 == 13);
|
||||
};
|
||||
|
||||
// ===== c2: #73 graduation =====
|
||||
|
||||
@test fn g73_idxstore() void = {
|
||||
let a: [3]int = [700: int, 800: int, 900: int];
|
||||
let xs: [2]g73is_box;
|
||||
@@ -334,8 +308,6 @@ type g93c_arr = [3]int;
|
||||
assert(g73ss_g.i.b == 9);
|
||||
};
|
||||
|
||||
// ===== c3: #89 cgreturn return-position widen =====
|
||||
|
||||
@test fn g89_ret_widen() void = {
|
||||
match (g89w_mk()) {
|
||||
case let s: g89w_ali => { assert(s.b == 9); };
|
||||
@@ -358,8 +330,6 @@ type g93c_arr = [3]int;
|
||||
};
|
||||
};
|
||||
|
||||
// ===== c4: #93 deref-index pointee chase =====
|
||||
|
||||
@test fn g93_l2_local() void = {
|
||||
let a: g93l_arr2 = [1000: int, 2000: int, 3000: int];
|
||||
let p: *g93l_arr2 = &a;
|
||||
|
||||
Reference in New Issue
Block a user