code wiki / _hdl_build / nx_entity_store_gate.nx

nx_entity_store_gate.nx

buildroot/runtime/_hdl_build/nx_entity_store_gate.nx

8946 B211 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic entity
docsdependenciesstructsconstsfunctions

about

nx_entity_store_gate.nx -- CERTIFICATION of nx_entity_store (gamebench gap-queue rank 1, blocks 7 titles). NOTE: distinct from the pre-existing nx_entity_gate.nx, which is a voxel-world RENDER demo (5 creatures wandering per frame). This gate certifies the handle/generation ENTITY STORE. Nothing shared, no clobber. T1 spawn/destroy/count basics T2 ★STALE HANDLE REJECTED -- destroy an entity, respawn into the SAME slot, old handle must be invalid T2b SLOT REUSE CONFIRMED -- proves T2 hit the real hazard rather than a fresh slot (which passes for free) T4 dense iteration visits exactly the alive set: no holes, no duplicates, no dead entities T5 REPLAY-DETERMINISM -- same op sequence twice -> identical handles and identical iteration order T6 capacity bounded -- spawning past cap returns null and leaves the arena intact T7 components per-entity; a recycled slot leaks nothing from its previous occupant T8 ★ANTI-VACUITY -- valid handles must be ACCEPTED (an always-false en_valid would ace T2) T9 composes with nx_gamesave: entity component data round-trips through save/load license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_entity_store.nx nx_gamesave.nx nx_entity_store_gate.nx

imports: nx_syscalls.nxnx_entity_store.nxnx_gamesave.nx

imported by: nobody (leaf or entry point)

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

main ew sys_write sys_mmap en_bytes en_words en_init en_o_gen en_o_alive en_cap en_o_dense en_cap ↻ en_o_pos en_cap ↻ en_o_free en_cap ↻ en_spawn en_freelen en_o_free ↻ en_o_free ↻ en_cap ↻ en_o_alive ↻ en_ncomp en_o_comp en_cap ↻ en_o_dense ↻ en_o_pos ↻ en_make_handle en_o_gen ↻ en_count en_destroy en_valid en_handle_idx en_cap ↻ en_o_alive ↻ en_o_gen ↻ en_handle_gen en_handle_idx ↻ en_o_alive ↻ en_o_gen ↻

structs

none

consts

none

functions

18func ew(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
19func ep(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
29func replay(a: *i64, hs: *i64, cap: i64, ncomp: i64) -> i64
42func main() -> i64