code wiki / (root) / nx_outbuf.nx

nx_outbuf.nx

buildroot/runtime/nx_outbuf.nx

2569 B99 linesdepth 2pulls 2 transitivereach 66 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

outbuf.nx -- growable output buffer shared by code-gen backends. Extracted from riscv.nx so wasm.nx (and any future backend) can reuse the same bump-pointer string buffer without dragging in the full RV64 emitter. Writes are bounded by a fixed cap picked at out_new; overruns are silently clamped for now.

dependencies 1 imports · 36 importers

nx_syscalls.nx nx_outbuf.nx crt0.nx nx_aarch64.nx nx_compile_wat.nx nx_compile_x86.nx nx_dom_oracle_gate.nx nx_nxc.nx nx_riscv.nx nx_smoke_nxc_pipeline.nx nx_smoke_nxc_pipeline10.nx nx_smoke_nxc_pipeline11.nx

diagram shows first 10 each side; +0 more imports, +26 more importers in the complete lists below.

imports: nx_syscalls.nx

imported by: crt0.nxnx_aarch64.nxnx_compile_wat.nxnx_compile_x86.nxnx_dom_oracle_gate.nxnx_nxc.nxnx_riscv.nxnx_smoke_nxc_pipeline.nxnx_smoke_nxc_pipeline10.nxnx_smoke_nxc_pipeline11.nxnx_smoke_nxc_pipeline12.nxnx_smoke_nxc_pipeline13.nxnx_smoke_nxc_pipeline14.nxnx_smoke_nxc_pipeline15.nxnx_smoke_nxc_pipeline2.nxnx_smoke_nxc_pipeline3.nxnx_smoke_nxc_pipeline4.nxnx_smoke_nxc_pipeline5.nxnx_smoke_nxc_pipeline7.nxnx_smoke_nxc_pipeline8.nxnx_smoke_nxc_pipeline9.nxnx_smoke_nxc_tilde.nxnx_tensor_lower.nxnx_vcc_color_wat.nxnx_vcc_probe_wat.nxnx_wasm.nxnx_x86_64.nxnx_x86_64_arith_test.nxnx_x86_64_branch_test.nxnx_x86_64_call_test.nxnx_x86_64_ctx.nxnx_x86_64_ctx_test.nxnx_x86_64_loadstore_test.nxnx_x86_64_module_test.nxnx_x86_64_test.nxoutbuf.nx

structs

16struct OutBuf

consts

none

functions

22func out_new(cap: i64) -> *OutBuf
called by 38: mainnxc_compilemainmainmainmain+32 calls 1: sys_mmap
31func out_char(o: *OutBuf, c: i64) -> i64
39func out_str(o: *OutBuf, s: *u8) -> i64
49func out_i64(o: *OutBuf, n: i64) -> i64
92func out_indent(o: *OutBuf, n: i64) -> i64