code wiki / _hdl_build / _constarg_probe.nx

_constarg_probe.nx

buildroot/runtime/_hdl_build/_constarg_probe.nx

2710 B55 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind probe
docsdependenciesstructsconstsfunctions

about

_constarg_probe.nx -- minimal repro lattice for debt 1785866425: a const IDENTIFIER passed as a function-call ARGUMENT arrived as 0 in nx_being_showcase (tm_vcol(i, BS_SKIN) painted black), while the same value built in let-locals passed fine. This probe enumerates the suspect axes -- const initializer shape (literal vs expression), value size, and use position (arg1/arg2/store/compare) -- so the compiler fix targets the REAL failing surface, not a guess. expect_exit: 0 when the bug is fixed.

dependencies 1 imports · 0 importers

nx_syscalls.nx _constarg_probe.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main cw sys_write sys_mmap tooth cw ↻ cn sys_mmap ↻ sys_write ↻ echo1 echo2 sys_exit cn ↻

structs

none

consts

8const CA_SMALL: i64 = 2600
9const CA_BIG_LIT: i64 = 11190506
10const CA_BIG_EXPR: i64 = 234 + 192*256 + 170*65536
11const CA_NEG_EXPR: i64 = 0-150

functions

13func cw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: toothmain calls 1: sys_write
14func cn(v: i64) -> i64
called by 2: toothmain calls 2: sys_mmapsys_write
25func echo1(v: i64) -> i64 { return v }
called by 1: main
26func echo2(a: i64, v: i64) -> i64 { return v }
called by 1: main
27func tooth(name: *u8, got: i64, want: i64, fails: *i64) -> i64
called by 1: main calls 2: cwcn
34func main() -> i64