nx_itoa_lib_gate.nx
buildroot/runtime/nx_itoa_lib_gate.nx
about
nx_itoa_lib_gate.nx -- gate for the shared integer->decimal emitter (nx_itoa_lib).
Authored ON nx_gate_verdict per the D001 migrate-on-touch law: a new gate imports THE lib.
WHAT IT PROVES: ccz_cat_num is byte-identical across every boundary the ~87 hand-rolled clones it
replaces got right only by accident -- zero, single digit, the 9-to-10 and 99-to-100 carries,
interior zeros (100, 1024, which a sloppy reverse drops), negatives, and the full 19-digit range.
If this is not byte-identical the migration silently corrupts every number the ecosystem prints,
so the teeth are on OUTPUT BYTES, never on "it returned".
T13 is the one the clones could not do at all: appending at a NON-ZERO offset without disturbing
what is already in the buffer. That property is what makes the zero-allocation form possible, and
it is why the fd shim (nxi_fd) needed to exist separately instead of being baked into the emitter.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.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
structs
| none |
consts
| 19 | const IG_BUF: i64 = 64 |
| 20 | const IG_X: i64 = 120 |
| 21 | const IG_FOUR: i64 = 52 |
| 22 | const IG_TWO: i64 = 50 |
| 23 | const IG_ZERO: i64 = 48 |
| 24 | const IG_SEVEN: i64 = 55 |
| 25 | const IG_SENT: i64 = 88 |
functions
| 28 | func ig_eq(buf: *u8, n: i64, expect: *u8) -> i64 called by 1: ig_case |
| 39 | func ig_case(name: *u8, v: i64, expect: *u8, ctr: *i64) -> i64 |
| 48 | func main(argc: i64, argv: *i64) -> i64 |