2.4 KiB
§92 — Conforming a DECLARATION: pointer changes are caller-neutral, scalar-WIDTH changes are not (Phase 29 SESSION-21, tools/conform_decls.py)
When a draft reaches match_one MATCH its signature is byte-TRUTH (§58b) and the fleet extern
is a stub-era guess, so conflicting types for func_X is fixed by moving the DECLS. That is right,
and it was the single dominant gate-failure class this session — 7 of 7 plain drafts and most of the
jtbl drafts. tools/conform_decls.py automates it: derive the signature from the draft's
DEFINITION, rewrite EVERY site, and assert completion (R32) because a half-rewritten axis is a
guaranteed break (§85), not a smaller win.
But "decls are free" is only true for some changes, and the difference is byte-measurable:
| change | caller-neutral? | evidence |
|---|---|---|
pointer type (s16*/short* → u16*) |
YES | func_80179B74: 1,600 sites / 523 files / 3 distinct forms conformed, banked, R22 140/140 |
return widen void → s32 |
only if no caller consumes it (§85) | func_8014D2A0, func_8012CC88 — precondition checked, then byte-neutral |
scalar WIDTH (s32 → u16) |
NO | func_80175DA8: decls reverted → gate PLUMBING; conform applied → gate DIFF |
arity ((void) → takes params) |
NO — breaks every 0-arg CALL | func_8015B950 by hand: ov_SC01_077 gated BYTE-IDENTICAL, 138 of 140 binaries broke |
The scalar-width case is the subtle one. Narrowing a parameter changes argument promotion at every call site, so the callers emit different code. The conform did not fix the draft — it changed the callers. A DIFF appearing only AFTER a conform is the signature of this: examine the callers (the §17a-1 pair — keep their decl compatible and cast at the call site), never the body.
The arity case is the expensive one, and the guard now names its price. func_8012AAAC needed
137 call-site casts to absorb it; func_8015B950 looked like it needed ~926 and in fact needed
ONE — its only 0-arg call is in an engine_core.h DEFINE macro body that the preprocessor
expands into all 926 TUs. Count the call SITES, not the expansions.
The law: a declaration edit is a T2 fleet-shared write set, provable only by R22 (§63/§85). The per-binary gate authorises the binary you built; it says nothing about the 139 you did not.