code wiki / _hdl_build / nx_js_shape_gate.nx
nx_js_shape_gate.nx
buildroot/runtime/_hdl_build/nx_js_shape_gate.nx
about
nx_js_shape_gate.nx -- P3 SHAPES / hidden classes: prove (A) shape-keyed ICs give IDENTICAL results
to the legacy per-object ICs and the tree-walker, and (B) they MEASURABLY win where per-object ICs
fail -- a loop over MANY distinct objects of the SAME shape. Per-object ICs miss on every object
(different pointers) and fall back to the linear obj_find scan; shape ICs hit across all of them.
The signature: reading a LATE property (index ~9) across many objects costs ~the same as reading an
EARLY property under shapes (O(1)), but scales with scan depth under per-object ICs. expect_exit: 0
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_js_vm.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 10 | func sg_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 11 | func sg_n(v: i64) -> i64 |
| 26 | func schk(src: *u8, label: *u8, pp: *i64, tp: *i64) -> i64 |
| 69 | func stime(src: *u8, mode: i64, expp: i64, okbox: *i64) -> i64 |
| 90 | func main(argc: i64, argv: *i64) -> i64 |