code wiki / _hdl_build / _debolt_gate.nx

_debolt_gate.nx

buildroot/runtime/_hdl_build/_debolt_gate.nx

3374 B56 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

_debolt_gate.nx -- standing DE-BOLT LICENSE for X-CLEAN-002 (retire function-splitting). The "split functions to stay under 21 same-fn calls / dodge nxasm rc=6" workaround guards a cause that is NON-REPRODUCIBLE on the current self-hosted toolchain (R1-T1-004 swept 21..120 all rc=0; _bs_poison env/scratch poison 12 configs non-repro; _rc6_gate GREEN). This gate makes the retirement SAFE + REGRESSION-LOCKED by PROVING the unsplit shape: two single functions with 40 and 50 calls to one helper -- counts well past the old 21 threshold -- both BUILD (this file must compile through nx_cc->nxasm to run at all) and compute the EXACT result. If a future toolchain change ever reintroduced a same-fn-call ceiling, this gate goes RED (build-fail or wrong sum) and the de-bolt is halted. NO nxasm edits -- this licenses consolidation, it does not touch the assembler. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx _debolt_gate.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main db_big40 db_h db_big50 db_h ↻ db_puts sys_write db_putn sys_mmap sys_write ↻

structs

none

consts

none

functions

13func db_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
14func db_putn(v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=(48+(m%10)) as u8; m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(1, bb, k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
16func db_h(x: i64) -> i64 { return x + 1 }
called by 2: db_big40db_big50
19func db_big40() -> i64
called by 1: main calls 1: db_h
29func db_big50() -> i64
called by 1: main calls 1: db_h
39func main() -> i64