test: migrate Fam9 match/tagged value tests to @test (#5-C5)
fold-2 chunk C5 (drew's Fam8-13 plan), the highest-risk chunk: 21 match/tagged value-row C drivers re-homed. 20 -> test/lang/*_test.ww @test row-tables + 12 runww //ww:error carriers (both stages reject). The global-tag cluster (globtag*/globstructwiden/taggedderefstore/...), which sits on the #15/#17 global-ptr fix, was empirically probed byte-id CLEAN -- the predicted hotspot surfaced ZERO fresh cs!=ww. Carves: variant_chain_b95 #81 -> _runonly (genuinely diverges at HEAD); callret_bound277 #277 -> slim C pin (cs-runs/ww-rejects), mutation-gated. 929_tagged_memarg kept whole (SSE-ABI asm conformance). 19 drivers deleted, 944_variant_chain slimmed to the #277 pin. The match-on-tagged-struct-field divergence (former #26) probed RESOLVED for all its cited shapes (938 voidstr_field/recursion_torture, tagnorm dedup_match all byte-id cs==ww + value-correct) -- closed no-reproducer-at-HEAD, attribution to #15/#17 INFERRED. Those rows migrate as normal byte-id @test and serve as the REGRESSION SENTINEL for the inferred close (a resurgence trips the gate). LANGBYTEID floor 93->113; test count 374->355 (19 deleted; 929 + 944_variant_chain kept). do-not-auto-batch (926_tagscr/940_global_sret/940_str_forrange) untouched.
This commit is contained in:
14
test/wcc/data/idxtagfield_big_assign/case.ww
Normal file
14
test/wcc/data/idxtagfield_big_assign/case.ww
Normal file
@@ -0,0 +1,14 @@
|
||||
//ww:error "#58: >32B tagged-field indexed store unreachable until #114"
|
||||
// 944_idx_tagged_field big_assign tripwire: a >32B box STORE via xs[i].m
|
||||
// LOUD-STOPS in BOTH stages until #114. A SUCCESS = loud-stop regressed to silent.
|
||||
package main;
|
||||
type big = (void | size | [5]size);
|
||||
type row = struct { id: int, m: big };
|
||||
export fn main() i32 = {
|
||||
let xs: [2]row = [
|
||||
row { id = 1, m = 7: size },
|
||||
row { id = 2, m = 8: size },
|
||||
];
|
||||
xs[0].m = 9: size;
|
||||
return 0;
|
||||
};
|
||||
16
test/wcc/data/idxtagfield_big_read/case.ww
Normal file
16
test/wcc/data/idxtagfield_big_read/case.ww
Normal file
@@ -0,0 +1,16 @@
|
||||
//ww:error "#58: >32B tagged-field indexed read unreachable until #114"
|
||||
// 944_idx_tagged_field big_read tripwire: a >32B box read via the indexed spine
|
||||
// (xs[i].m) LOUD-STOPS in BOTH stages (rule 7) until #114 wires >32B box memcpy.
|
||||
// Reachable via a NARROW init; a SUCCESS here = the loud-stop regressed to silent.
|
||||
package main;
|
||||
type big = (void | size | [5]size);
|
||||
type row = struct { id: int, m: big };
|
||||
export fn main() i32 = {
|
||||
let xs: [2]row = [
|
||||
row { id = 1, m = 7: size },
|
||||
row { id = 2, m = 8: size },
|
||||
];
|
||||
let v: size = xs[0].m as size;
|
||||
if (v != 7) { return 1; };
|
||||
return 0;
|
||||
};
|
||||
14
test/wcc/data/idxtagfield_float_assign/case.ww
Normal file
14
test/wcc/data/idxtagfield_float_assign/case.ww
Normal file
@@ -0,0 +1,14 @@
|
||||
//ww:error "#58: float-payload tagged-field indexed store unreachable until #114"
|
||||
// 944_idx_tagged_field float_assign tripwire: a float-payload box STORE via
|
||||
// xs[i].m LOUD-STOPS in BOTH stages until #114. SUCCESS = loud-stop regressed.
|
||||
package main;
|
||||
type fo = (void | f64);
|
||||
type row = struct { id: int, m: fo };
|
||||
export fn main() i32 = {
|
||||
let xs: [2]row = [
|
||||
row { id = 1, m = 1.0: f64 },
|
||||
row { id = 2, m = 2.0: f64 },
|
||||
];
|
||||
xs[0].m = 3.0: f64;
|
||||
return 0;
|
||||
};
|
||||
14
test/wcc/data/idxtagfield_midword_assign/case.ww
Normal file
14
test/wcc/data/idxtagfield_midword_assign/case.ww
Normal file
@@ -0,0 +1,14 @@
|
||||
//ww:error "#58: multi-word tagged-field indexed store unreachable until #114"
|
||||
// 944_idx_tagged_field midword_assign tripwire: a multi-word (>16B, <=32B box)
|
||||
// STORE via xs[i].m LOUD-STOPS in BOTH stages until #114. SUCCESS = regressed.
|
||||
package main;
|
||||
type mid = (void | size | [3]size);
|
||||
type row = struct { id: int, m: mid };
|
||||
export fn main() i32 = {
|
||||
let xs: [2]row = [
|
||||
row { id = 1, m = 7: size },
|
||||
row { id = 2, m = 8: size },
|
||||
];
|
||||
xs[0].m = 9: size;
|
||||
return 0;
|
||||
};
|
||||
16
test/wcc/data/nestunion_collision/case.ww
Normal file
16
test/wcc/data/nestunion_collision/case.ww
Normal file
@@ -0,0 +1,16 @@
|
||||
//ww:error "structural fallback cannot disambiguate nominally-distinct same-shape variants"
|
||||
// 925_nested_union_widen collision_guard: two distinct names a,b both !(i32|bool)
|
||||
// in one union (a | b) — without nominal layout the widen cannot pick a variant.
|
||||
// BOTH stages must loud-stop (runww ERROR arm runs w6c AND w6c_ww). Migrated from
|
||||
// 989-era 925_nested_union_widen_run.c (#5-C5).
|
||||
package main;
|
||||
type a = !(i32 | bool);
|
||||
type b = !(i32 | bool);
|
||||
export fn main() i32 = {
|
||||
let x: a = (1i32: a);
|
||||
let r: (a | b) = x;
|
||||
match (r) {
|
||||
case let p: a => return 1;
|
||||
case let q: b => return 2;
|
||||
};
|
||||
};
|
||||
15
test/wcc/data/vchain_amb_loud/case.ww
Normal file
15
test/wcc/data/vchain_amb_loud/case.ww
Normal file
@@ -0,0 +1,15 @@
|
||||
//ww:error "source alias chain reaches >=2 variants"
|
||||
// 944_variant_chain_b95 chain_amb_loud: source base reaches both ali and ali2
|
||||
// (chain) — ambiguous without nominal layout (#95). BOTH stages loud-stop.
|
||||
package main;
|
||||
type base = struct { a: int, b: int };
|
||||
type ali = base;
|
||||
type ali2 = ali;
|
||||
export fn main() i32 = {
|
||||
let s: base;
|
||||
s.a = 4; s.b = 9;
|
||||
let v: (ali | ali2) = s;
|
||||
if (v is ali) { return 1; };
|
||||
if (v is ali2) { return 2; };
|
||||
return 3;
|
||||
};
|
||||
11
test/wcc/data/vchain_bare_ambig/case.ww
Normal file
11
test/wcc/data/vchain_bare_ambig/case.ww
Normal file
@@ -0,0 +1,11 @@
|
||||
//ww:error "bare source structurally matches >=2 NAMED variants"
|
||||
// 944_variant_chain_b95 bare_ambig: a bare *i32 source matches both p1 and p2
|
||||
// (#15/#218). BOTH stages loud-stop.
|
||||
package main;
|
||||
type p1 = *i32;
|
||||
type p2 = *i32;
|
||||
export fn main() i32 = {
|
||||
let x: i32 = 7;
|
||||
let v: (p1 | p2) = &x;
|
||||
return 0;
|
||||
};
|
||||
13
test/wcc/data/vchain_bare_ambig2/case.ww
Normal file
13
test/wcc/data/vchain_bare_ambig2/case.ww
Normal file
@@ -0,0 +1,13 @@
|
||||
//ww:error "bare source structurally matches >=2 NAMED variants"
|
||||
// 944_variant_chain_b95 bare_ambig2: bare *i32 reaches q1,q2 via b1/b2 chains
|
||||
// (#15/#218). BOTH stages loud-stop.
|
||||
package main;
|
||||
type b1 = *i32;
|
||||
type b2 = *i32;
|
||||
type q1 = b1;
|
||||
type q2 = b2;
|
||||
export fn main() i32 = {
|
||||
let x: i32 = 7;
|
||||
let v: (q1 | q2) = &x;
|
||||
return 0;
|
||||
};
|
||||
13
test/wcc/data/vchain_isas_amb/case.ww
Normal file
13
test/wcc/data/vchain_isas_amb/case.ww
Normal file
@@ -0,0 +1,13 @@
|
||||
//ww:error "not a variant"
|
||||
// 944_variant_chain_b95 isas_amb_reject_notcrash: `is base` on (ali | ali2)
|
||||
// (both reach base) — must REJECT (not crash) on the ambiguity (#107). BOTH
|
||||
// stages reject with the diagnostic body, not a signal.
|
||||
package main;
|
||||
type base = struct { a: int, b: int };
|
||||
type ali = base;
|
||||
type ali2 = ali;
|
||||
fn f(v: (ali | ali2)) i32 = {
|
||||
if (v is base) { return 1; };
|
||||
return 0;
|
||||
};
|
||||
export fn main() i32 = { return 0; };
|
||||
12
test/wcc/data/vchain_isas_chain/case.ww
Normal file
12
test/wcc/data/vchain_isas_chain/case.ww
Normal file
@@ -0,0 +1,12 @@
|
||||
//ww:error "not a variant"
|
||||
// 944_variant_chain_b95 isas_chain_reject: `is base` on (void | ali) where
|
||||
// ali=base — is/as ACCEPTANCE stays nominal-exact (#107). BOTH stages reject
|
||||
// (cstage "base is not a variant of (...)", wwstage "is/as: not a variant of...").
|
||||
package main;
|
||||
type base = struct { a: int, b: int };
|
||||
type ali = base;
|
||||
fn f(v: (void | ali)) i32 = {
|
||||
if (v is base) { return 1; };
|
||||
return 0;
|
||||
};
|
||||
export fn main() i32 = { return 0; };
|
||||
12
test/wcc/data/vchain_isas_unrel/case.ww
Normal file
12
test/wcc/data/vchain_isas_unrel/case.ww
Normal file
@@ -0,0 +1,12 @@
|
||||
//ww:error "not a variant"
|
||||
// 944_variant_chain_b95 isas_unrel_reject: `is ta` on (void | tb) where ta,tb
|
||||
// are same-shape but distinct names — is/as acceptance is nominal-exact (#107).
|
||||
// BOTH stages reject.
|
||||
package main;
|
||||
type ta = struct { a: int, b: int };
|
||||
type tb = struct { a: int, b: int };
|
||||
fn f(v: (void | tb)) i32 = {
|
||||
if (v is ta) { return 1; };
|
||||
return 0;
|
||||
};
|
||||
export fn main() i32 = { return 0; };
|
||||
12
test/wcc/data/vchain_twin_prim_amb/case.ww
Normal file
12
test/wcc/data/vchain_twin_prim_amb/case.ww
Normal file
@@ -0,0 +1,12 @@
|
||||
//ww:error "source alias chain reaches >=2 variants"
|
||||
// 944_variant_chain_b95 twin_prim_alias_amb: union (int | ai) ai=int, source aj=int
|
||||
// — both the bare int variant and ai share the int bottom, ambiguous (#95
|
||||
// deviation-2). BOTH stages loud-stop.
|
||||
package main;
|
||||
type ai = int;
|
||||
type aj = int;
|
||||
export fn main() i32 = {
|
||||
let s: aj = 7;
|
||||
let v: (int | ai) = s;
|
||||
return 0;
|
||||
};
|
||||
Reference in New Issue
Block a user