mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-28 14:59:48 -04:00
8c36ede849
THE DRAFT was failing in a CHAIN, one "next conflict" per gate cycle. Applied §95's own diagnostic law instead — splice once, dump EVERY cc1 error — and the whole set named the cause immediately: three errors on TWO axes (one data decl, two callee decls), not three problems. THE DATA ERROR WAS reconcile_tu AGAIN, ONE SHAPE DOWN (§96). split_statements returns comment- STRIPPED text WITH SPANS; the rewrite re-found each planned statement by comparing that text to a raw LINE, so `extern u8 D_80078E78; /* cur base ($s5) */` never matched. The decl was left unconformed WHILE THE USE-CAST PASS STILL FIRED -> a draft whose uses are cast for the TU's storage against the draft's own declaration -> cc1 reports `conflicting types` AT THE VERY DECL THE TOOL JUST CLAIMED TO FIX, exit 0, "reconciled: 3 symbols". FIX: rewrite by SPAN (the primitive existed — its docstring says spans are preserved *because drafts get rewritten*). Plus the R32 assertion the old code was missing: it had a dropped_check counter incremented in two places and NEVER COMPARED — "a loud failure nobody counts is exactly as invisible as a silent one" in miniature. Now declarators-in vs -out AND a per-symbol check that each planned tu.declaration() actually landed, both as `!!` notes so --strict exits non-zero. MEASURED: 3 -> 4 data symbols reconciled on the same draft; trailing comments preserved (H5). THE TWO CALLEE CONFLICTS were the other axis (reconcile_tu skips kind=='func' by construction): cast_call_sites (§20) conformed func_80177AD4 (TU `void (int, unsigned int)`) and func_80178298 (TU `(u32*, u8*, short, short)`) and cast each call site to the draft's intended widths. GATE: verified 1 / failed 0, d19c9580 BYTE-IDENTICAL. Write set is one overlay-local TU = T1 per the §63/§85 blast-radius taxonomy, so the per-binary gate is sufficient; the ×137 sweep is the T2 case and takes a full R22.