Commit 3404a81
committed
W25 §5.1 dual-include compile check
Per W25 spec §5.1 falsification: verify the dual-typedef collision is
fully resolved post-Step-A by including BOTH hir_c_api.h AND
hir_basic_block_c.h in a single TU. If this file fails to compile,
the canonicalization is incomplete.
Python/jit/hir/w25_dual_include_check.c:
Includes both canonical headers + uses both API call (hir_block_id)
AND direct struct-field access (bb->id) to exercise the full
dual-include surface. The function never executes at runtime —
its existence + successful compilation is the test.
NAMING NOTE: file is named w25_dual_include_check.c (not test_*) to
avoid the JIT_SOURCES test_* exclude regex at jit_build/CMakeLists.txt
:131. This way the dual-include check runs at every build, not as a
separate gated test artifact. Per spec §5.1 'Add to the build as a
test-only TU' — file-naming approach achieves the same goal without
requiring a CMakeLists.txt amendment.
Empirical pre-test:
Pre-W25 (hir_c_api.h void* typedefs): would fail with
'redefinition of typedef HirBasicBlock with different type'
Post-W25 Step A (forward struct decls): compiles cleanly because
forward decl + full def coexist; no typedef collision.
Spec §5.2 (lint gate active) deferred to Step C.
Spec §5.3 (signature-drift mutation reproducer) deferred to pre-Step-B
falsification baseline (per generalist commitment chat L2065).
Authorization chain:
- W25 spec §5.1: theologian L2017
- Supervisor sequencing (5.1 next after Step A): chat L2099
- Push 65 W25 Step A landed: e6a8a2d chat L21021 parent 40dd82e commit 3404a81
1 file changed
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
0 commit comments