code wiki / (root) / nx_fieldtypeprobe.nx

nx_fieldtypeprobe.nx

buildroot/runtime/nx_fieldtypeprobe.nx

1562 B40 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_fieldtypeprobe.nx -- MINIMAL REPRO for the type-check failure blocking the compiler build. HYPOTHESIS: struct field TYPE lookup is misaligned, so an i64 field declared AFTER a pointer field resolves to the POINTER's type. That would explain nx_compile_x86 failing with "x86ctx_emit_condjump: arg 2 is a POINTER but the parameter is an INTEGER" when every caller and every field involved is provably i64. Shape mirrors struct Instr: a *Type early, i64s after. If this file FAILS to compile with a POINTER/INTEGER mismatch, the defect is field resolution. If it COMPILES, the defect is elsewhere and Instr's width/other fields matter. expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_fieldtypeprobe.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 sys_mmap ft_take_int ft_puts sys_write ft_len

structs

11struct FtOther { pad: i64 }
13struct FtProbe

consts

none

functions

23func ft_take_int(x: i64, y: i64) -> i64 { return x + y }
called by 1: main
25func ft_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: ft_puts
26func ft_puts(s: *u8) -> i64 { sys_write(1, s, ft_len(s)); return 0 }
called by 1: main calls 2: sys_writeft_len
28func main() -> i64