code wiki / _hdl_build / nx_js_realbench.nx

nx_js_realbench.nx

buildroot/runtime/_hdl_build/nx_js_realbench.nx

5971 B102 linesdepth 8pulls 24 transitivereach 0 importersview sourcekind benchtopic js
docsdependenciesstructsconstsfunctions

about

nx_js_realbench.nx -- CAPSTONE of the JIT arc: realistic BUNDLE-SHAPED programs (the composition of features real page/app code uses -- constructors+new, methods+this, arrays of objects, higher-order functions taking closures, string building, modulo/ternary, nested loops, recursion) run through the TREE-WALKER (js_run_source) vs the VM/JIT (compile_run). Proves (A) identical results on multi-feature programs -- a broader integration test than the micro-kernels, catching feature-interaction bugs -- and (B) the end-to-end speedup that BREAKS the ~1000x-too-slow tree-walker wall which stalled real bundles. This is the honest "the sovereign engine can now run real code fast" measurement. expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_js_vm.nx nx_itoa_lib.nx nx_js_realbench.nx

imports: nx_js_vm.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

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

main rb_w rb_case rb_time sys_now_us sys_mmap sys_clock_gettime_mono compile_run cr_core jp_parse_source js_lex jp_parse_program jp_pst ev_set c_scope_push c_program c_predecl jp_nb jp_child_at jp_nkind jp_na c_function c_emit c_newslot ev_tok_start ev_tok_len c_expr c_stmt env_new vmx_alloc js_vm_bind jit_compile jit_intloop_eligible jit_intloop_compile jit_templatable gc_is_enabled xe_mmap_rwx xe_push xe_mov_rr xe_store

structs

none

consts

none

functions

12func rb_w(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 2: rb_casemain
17func rb_n(v: i64) -> i64 { nxi_out(v); return 0 }
called by 2: rb_casemain calls 1: nxi_out
19func rb_time(src: *u8, engine: i64, out: *i64) -> i64
called by 1: rb_case calls 3: sys_now_uscompile_runbsl
35func rb_case(src: *u8, label: *u8, pp: *i64, tp: *i64) -> i64
70func main(argc: i64, argv: *i64) -> i64
calls 3: rb_wrb_caserb_n