runtime.nx
buildroot/runtime/runtime.nx
about
runtime.nx -- core NishiLang runtime.
Intended to be used via copy-paste or future module-import. All
routines here call only __syscall for their primitives; no libc.
Contents:
* Arena allocator (bump pointer, never frees)
* strlen / strcmp / strneq / memcpy / memset
* itoa / atoi (base 10 and hex)
* print / println helpers using syscall write to stdout
* die() -- print message + exit(1)
dependencies 1 imports · 21 importers
diagram shows first 10 each side; +0 more imports, +11 more importers in the complete lists below.
imports: syscalls.nx
imported by: nx_ac_monitor_census.nxnx_argv.nxnx_corpus_drive.nxnx_dedup_audit.nxnx_env.nxnx_func_compare.nxnx_func_extract.nxnx_gate_baseline_harness.nxnx_gate_baseline_sweep.nxnx_gate_mutation_probe.nxnx_gate_mutation_sweep.nxnx_handoff_gate.nxnx_handoff_gate_proof.nxnx_input.nxnx_path.nxnx_sensor_gap_census.nxnx_substrate_evolve.nxnx_termios.nxnx_tty.nxnx_tty_test.nxruntime_test.nx
structs
| 24 | struct Arena { |
consts
| none |
functions
| 30 | func arena_new(size: i64) -> *Arena {
called by 1: main |
| 41 | func arena_alloc(a: *Arena, n: i64) -> *u8 {
called by 1: main |
| 55 | func strlen(s: *u8) -> i64 { |
| 62 | func strneq(a: *u8, b: *u8, n: i64) -> i64 { |
| 72 | func streq(a: *u8, b: *u8) -> i64 { |
| 79 | func memcpy(dst: *u8, src: *u8, n: i64) -> i64 { |
| 88 | func memset(dst: *u8, v: i64, n: i64) -> i64 { |
| 101 | func atoi(s: *u8) -> i64 {
called by 1: main |
| 119 | func itoa(n: i64, buf: *u8) -> i64 { |
| 156 | func print(s: *u8) -> i64 { |
| 160 | func println(s: *u8) -> i64 { |
| 167 | func print_i64(n: i64) -> i64 { |
| 174 | func die(msg: *u8) -> i64 {
calls 1: strlen |