nx_fieldtypeprobe.nx
buildroot/runtime/nx_fieldtypeprobe.nx
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
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
structs
| 11 | struct FtOther { pad: i64 } |
| 13 | struct FtProbe |
consts
| none |
functions
| 23 | func ft_take_int(x: i64, y: i64) -> i64 { return x + y } called by 1: main |
| 25 | func 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 |
| 26 | func ft_puts(s: *u8) -> i64 { sys_write(1, s, ft_len(s)); return 0 } |
| 28 | func main() -> i64 |