nx_dwline_corpus_gate.nx
buildroot/runtime/nx_dwline_corpus_gate.nx
about
nx_dwline_corpus_gate.nx -- DOES STATEMENT LINE INFO HOLD ACROSS THE REAL CORPUS, OR ONLY ON A TOY?
WHY THIS EXISTS. nx_dwline_stmt_gate proved statement granularity on runtime/nx_probe_dbgtiny.nx:
ELEVEN LINES, TWO FUNCTIONS, four .loc rows. That is a sample size of ONE, and a feature that works
on one hand-written probe is not a feature that works. The estate compiles thousands of real files
with deep nesting, matches, loops, multi-line expressions and 20-argument calls -- none of which the
probe contains. ★ A PROOF ON A FIXTURE YOU WROTE TO BE EASY IS A PROOF ABOUT YOUR FIXTURE.
WHAT THIS MEASURES, over every .nx in runtime/ up to a DECLARED cap:
- how many files the compiler can build at all with -g (the honest denominator)
- how many emit ANY .loc, and how many .loc rows in total
- the same numbers from the OLD blessed function-granularity compiler, as the control
- the RATIO of statement rows to function rows -- which is the actual claim under test
- files where the new compiler emits FEWER rows than the old one (a regression, individually named)
NO SILENT CAPS: the file count scanned, the cap, and any skipped/failed files are all REPORTED.
A gate that quietly samples 20 files and prints a percentage is the thing this gate exists to
replace.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: syscalls.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 24 | const CG_CAP: i64 = 4194304 |
| 29 | const CG_MAXFILES: i64 = 12000 |
| 30 | const CG_NAMEBUF: i64 = 1048576 |
| 31 | const CG_OLD: *u8 = "_offc/nx_cc_sovereign.elf" as *u8 |
| 32 | const CG_NEW: *u8 = "../nx_compile_x86.elf" as *u8 |
functions
| 34 | func cg_run_out(elf: *u8, args: *i64, nargs: i64, outfile: *u8) -> i64 called by 1: main |
| 57 | func cg_read(path: *u8, buf: *u8, cap: i64) -> i64 called by 1: main |
| 71 | func cg_count_loc(buf: *u8, n: i64) -> i64 called by 1: main |
| 88 | func cg_count_funcs(buf: *u8, n: i64) -> i64 called by 1: main |
| 104 | func cg_ends_nx(nm: *u8, nl: i64) -> i64 called by 1: main |
| 115 | func cg_atoi(s: *u8) -> i64 called by 1: main |
| 128 | func main(argc: i64, argv: *i64) -> i64 |