code wiki / _hdl_build / nx_unwired.nx

nx_unwired.nx

buildroot/runtime/_hdl_build/nx_unwired.nx

28000 B540 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_unwired.nx -- FIND EVERY FUNCTION THAT IS DEFINED AND NEVER CALLED, ACROSS THE WHOLE TREE. WHY THIS IS AN ORGAN AND NOT A NOTE ----------------------------------- On 2026-08-07 I fixed a measurement leak in nx_memroot, wrote the fix, built it, deployed it, measured the "result", and recorded it in memory. `mr_body` was DEFINED AND NEVER CALLED. Two string-replacements had matched nothing and reported success. The gate was green because the gate had gone green before the tooth existed. ★★★★★★ A FUNCTION DEFINED AND NEVER CALLED IS A COMMENT. ★★★★★ A STRING REPLACE THAT MATCHES NOTHING IS A NO-OP THAT REPORTS SUCCESS -- VERIFY THE CALL SITE, NOT THE DEFINITION. The estate already had vocabulary for this failure -- BUILT+UNWIRED, "comments not code", the adoption gap -- written down in several memory files. It was written down and it still happened, three times in one session, because a law in a file is consulted at the rate advice is consulted. ★★★★★★ A LAW THAT IS ONLY WRITTEN DOWN IS ENFORCED AT THE RATE PEOPLE REMEMBER TO READ IT; THE SAME LAW COMPILED INTO A GATE IS ENFORCED EVERY TIME. FULL ECOSYSTEM SCOPE, NOT A SAMPLE: every `.nx` in the tree is both a definition source and a call source, so a helper used only by a sibling organ is correctly seen as WIRED. Reporting on one file would manufacture false positives for every library function. ★★★★★ A REACHABILITY QUESTION ASKED OF ONE FILE IS ANSWERED WRONG BY CONSTRUCTION. usage: nx_unwired [--dir D] [--quiet] exit: 0 = nothing unwired; 1 = unwired definitions exist license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_memplane_lib.nx nx_gatekit_lib.nx nx_headmark_lib.nx nx_unwired.nx

imports: nx_memplane_lib.nxnx_gatekit_lib.nxnx_headmark_lib.nx

imported by: nobody (leaf or entry point)

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

main mp_streq gk_corpus_scan 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 ↻ gk_corpus_root sys_mmap ↻ gk_cat gk_exists sys_openat_rd sys_close gk_corpus_hdl gk_corpus_root ↻ gk_len gk_cat ↻ gk_dirscan gk_dirscan_ext sys_openat_rd ↻ sys_mmap ↻ gk_ext_is gk_len ↻ gk_cat ↻ gk_exists ↻ gk_len ↻ sys_close ↻ gk_dirscan ↻ mp_cat

structs

none

consts

30const UW_MAGIC_2166136261: i64 = 2166136261
31const UW_MAGIC_16777619: i64 = 16777619
32const UW_MAGIC_1073741823: i64 = 1073741823
33const UW_MAGIC_8192: i64 = 8192
34const UW_MAGIC_4096: i64 = 4096
35const UW_MAGIC_262144: i64 = 262144
36const UW_MAGIC_262000: i64 = 262000
45const UW_DIR: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/_hdl_build/"
46const UW_MAXF: i64 = 32768 // corpus is 18,560 today; 16,384 would REFUSE, which is why it rose
47const UW_HASH: i64 = 262144 // identifier -> slot (power of two)
48const UW_FBUF: i64 = 4194304
49const UW_NAMEB: i64 = 1048576 // packed definition names

functions

52func uw_h(s: *u8, n: i64) -> i64
called by 1: main
64func uw_slot(keys: *i64, h: i64) -> i64
called by 1: main
105func uw_defcomplete(buf: *u8, n: i64) -> i64
called by 1: main calls 1: uw_headmark
118func uw_exported(buf: *u8, n: i64) -> i64
called by 1: main calls 1: uw_headmark
122func uw_isid(c: i64) -> i64
called by 1: main
131func uw_isnx(name: *u8) -> i64
called by 1: main calls 1: mp_len
144func main(argc: i64, argv: *i64) -> i64