code wiki / _hdl_build / _debolt_gate.nx

_debolt_gate.nx

buildroot/runtime/_hdl_build/_debolt_gate.nx

3833 B63 linesdepth 3pulls 3 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 2 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx _debolt_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.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 nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_write ↻ gv_ctr sys_mmap ↻ gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n gv_at ↻ gv_puts sys_write ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_puts ↻ gv_num ↻

structs

none

consts

none

functions

14func 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
15func 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
17func db_h(x: i64) -> i64 { return x + 1 }
called by 2: db_big40db_big50
20func db_big40() -> i64
called by 1: main calls 1: db_h
30func db_big50() -> i64
called by 1: main calls 1: db_h
40func main() -> i64