code wiki / (root) / smoke_nxc_pipeline.nx

smoke_nxc_pipeline.nx

buildroot/runtime/smoke_nxc_pipeline.nx

2696 B73 linesdepth 7pulls 25 transitivereach 0 importersview sourcekind smoketopic smoke
docsdependenciesstructsconstsfunctions

about

Replay nxc.nx's pipeline on the baked-in demo, reporting at each stage so we can see exactly where stage 4 is failing. Returns: 1 = lex_source returned NULL 2 = parse_module returned NULL 3-9 = opt/regalloc/riscv stage threw something we'd need to instrument differently (just runs) 100 = OK, asm_pos was 0 (nothing emitted) 101 = OK, asm_pos > 0, code_len == 0 102 = OK, asm_pos > 0, code_len < 0 -- distinguished below 200 = code_len == -1 (unknown mnemonic) 201 = code_len == -2 (pass 1 fail) 202 = code_len == -3 (pass 2 fail) N = code_len when 0 < N < 100 (success)

dependencies 12 imports · 0 importers

syscalls.nx types.nx lex_kinds.nx outbuf.nx ir.nx lex.nx parse.nx opt.nx regalloc.nx riscv.nx smoke_nxc_pipeline.nx

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

imports: syscalls.nxtypes.nxlex_kinds.nxoutbuf.nxir.nxlex.nxparse.nxopt.nxregalloc.nxriscv.nxcrt0.nxnxasm_v2.nx

imported by: nobody (leaf or entry point)

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

main lex_source skip_ws_comments peek advance peek2 peek ↻ is_alpha lex_ident_or_kw tok_text_ptr peek ↻ is_alnum is_alpha ↻ is_digit advance ↻ keyword_lookup push_tok is_digit ↻ lex_number peek ↻ peek2 ↻ advance ↻ is_hexdigit is_digit ↻ hex_val push_tok ↻ is_digit ↻ lex_string advance ↻ tok_text_ptr ↻ peek ↻ push_tok ↻ peek2 ↻ emit_punct advance ↻ push_tok ↻ advance ↻ push_tok ↻ parse_module prepass_register_structs

structs

none

consts

none

functions

30func main() -> i64 {