code wiki / _hdl_build / nx_eoe.nx

nx_eoe.nx

buildroot/runtime/_hdl_build/nx_eoe.nx

4868 B77 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic eoe
docsdependenciesstructsconstsfunctions

about

nx_eoe.nx -- EMITTER-OF-EMITTERS (X-AUT-006c/006e): the keystone for autonomous capability creation. The verbatim/constant transducers (X-AUT-006/006b) CANNOT synthesize new control flow. THE HOW (X-AUT-006e): the team ALREADY owns a control-flow synthesizer -- the COMPILER. So the emitter-of-emitters is the parser's DUAL: a STRUCTURAL SPEC (control-flow skeleton as DATA) -> PRETTY-PRINT NishiLang SOURCE -> the existing nx_cc compiles it (control-flow -> machine code DELEGATED to the compiler the team owns). This organ generates a module with `depth` NESTED loops (count driven by DATA, not a fixed template) summing the product of the loop indices -- so the CONTROL-FLOW STRUCTURE is synthesized from the spec, which constant-lifting provably cannot do (it cannot add/remove loops). nx_cc then turns that source into native code. nx_eoe <basename> <depth> <bound> -> writes runtime/_hdl_build/<basename>.nx Validated (no-false-green, X-AUT-006d): depth=1 and depth=2 produce DIFFERENT control flow, both compile + compute the correct (different) result. Sovereign, no gcc/.sh. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_eoe.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 eo_p sys_write eo_atoi sys_mmap eo_cat eo_catn sys_mmap ↻ sys_openat_wr sys_write ↻ sys_close

structs

none

consts

14const K_MAGIC_65536: i64 = 65536

functions

16func eo_atoi(s: *u8) -> i64 { var n: i64 = 0; var i: i64 = 0; while s[i] != (0 as u8) { if s[i] >= (48 as u8) { if s[i] <= (57 as u8) { n = n * 10 + ((s[i] as i64) - 48) } } i = i + 1 } return n }
called by 1: main
17func eo_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i }
called by 1: main
18func eo_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: main calls 1: sys_mmap
29func eo_p(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
31func main(argc: i64, argv: *i64) -> i64