mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-26 21:36:06 -04:00
3bbfe21596
- dedup_extend banked 157 / 478 planned across 135 binaries: func_80165CA0 (99 ins) ×135 (~+0.10pp) + 22 other functions ×1 picked up in the 3 overlays the first sweep excluded. - FLEET: instr-weighted 80.1% -> 80.2% (10,525,534 -> 10,539,723, +14,189 ins); fn-count 89.09% -> 89.14%; distinct-code 67.7% (unchanged — propagation moves coverage, not distinct-RE). dedup 1886 validated / 0 failed, C1 coverage 239,472/239,472. 0 NON_MATCHING (G4). - R22 clean-fleet: make clean && extract-all && check-all -> 140 passed, 0 failed of 140. - §75b — extraction lifts `extern`s but NOT file-scope `#define`s, so a body matched with a macro in its preamble compiles only where that overlay's define is in scope ABOVE the splice point. Signature is a LINK error (`undefined reference`), never `conflicting types`: an unexpanded SHB(x) parses as a call to an undeclared function. The diagnosis PREDICTED the membership — the 3 stuck members are exactly the 3 files carrying the __volatile__ spelling of SHB, i.e. the function's own preamble still sitting above its own instantiation. - R14/R35 IN ACTION: the full-sweep census REVERSED the ranking I had just committed. I put the class-A normalization first at "~+0.13pp if it reaches ×138"; measured across all 134 it is worth 3 overlays (func_80012ABC 3, func_8012F14C 131). The cheap win was the one I ranked third. §75a's "collect across the whole sweep before scoping" earned itself immediately. - NEXT (specified, not guessed): func_80174CB0 is class B on func_8012F14C (1944 `(s32)` vs 968 `(s32,s32,s32)`). The macro carries the 3-param prototype; the failing TU declares the 1-param one FIRST (ov_SC01_001: TU@328 vs instantiation@2616) -> two prototypes, different arity -> reject. Per cdecl.compatible's MEASURED rule a K&R `extern void func_8012F14C();` is accepted BOTH ways round here (prototype-first + `()`-second always; `()`-first + prototype-second when no param default-promotes, and s32 does not) -> it should satisfy both populations in either order. One-line probe on the carried decl, byte-gate the 3 members, then extend.