code wiki / _hdl_build / nx_self_host_candidate_verify.nx
nx_self_host_candidate_verify.nx
buildroot/runtime/_hdl_build/nx_self_host_candidate_verify.nx
about
nx_self_host_candidate_verify.nx -- the TEAM's capability to drive codegen
integration itself: BUILD a candidate compiler from source, then VERIFY it.
This is the machine the team turns to change codegen (e.g. widen nx_x86_regalloc)
safely, with no human at a shell:
1. SELF-HOST: the pinned known-good compiler compiles the compiler's OWN source
(runtime/nx_compile_x86.nx + imports) -> a CANDIDATE compiler ELF. This is
the bootstrap step; if a codegen-source change is bad, it shows up here.
2. DIFFERENTIAL VERIFY: run a corpus of self-verifying programs through the
known-good AND the freshly-built candidate, and assert IDENTICAL behaviour.
A miscompiling candidate DIVERGES and is caught -- the known-good stays
pinned (Warden); only an all-green candidate is eligible for promotion.
Built non-destructively: the candidate lands in /tmp; nothing protected is
touched. With the source UNCHANGED, the candidate must behave identically to
known-good -- proving the build+verify pipeline end to end so the team can then
plug a real regalloc change into the SAME machine. Known answer: exit 0.
dependencies 1 imports · 0 importers
imports: nx_codegen_exec.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 21 | func main() -> i64 |