code wiki / _hdl_build / nx_entity_store_gate.nx
nx_entity_store_gate.nx
buildroot/runtime/_hdl_build/nx_entity_store_gate.nx
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
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
structs
| none |
consts
| none |
functions
| 18 | func ew(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 19 | func ep(v: i64) -> i64 |
| 29 | func replay(a: *i64, hs: *i64, cap: i64, ncomp: i64) -> i64 |
| 42 | func main() -> i64 |