nx_cc_splice_bisect.nx
buildroot/runtime/nx_cc_splice_bisect.nx
about
nx_cc_splice_bisect.nx -- PER-FUNCTION COMPILER-CODEGEN BISECTOR.
Team organ (Doctor's localizer, sibling of nx_cc_equiv_gate): when
a challenger compiler's output misbehaves, this finds WHICH
function's codegen carries the defect -- no awk, no shell loops,
pure NishiLang file IO + fork/execve/wait4 (sovereign judging law).
Method (asm splice): for every function whose body DIFFERS between
the two asm files, build a FRANKEN image = base.s with only that
one function's body replaced by the donor's, assemble+link it, and
run the franken compiler on a probe source. A function is a
BREAKER iff its splice alone flips the probe verdict. Functions
are self-contained ABI units, so single-function splices are valid
experiment isolation.
Born 2026-06-10 bisecting the awakened-LICM self-host breakage
(ledger T#opt-dom-licm-dormant-paths): corpus rows all GREEN,
self-host RED -- the defect lives in specific big-function hoists,
and this organ names them.
Usage: nx_cc_splice_bisect <base.s> <donor.s> [probe.nx]
base.s asm of the BLESSED compiler compiling some source
donor.s asm of the CHALLENGER compiling the SAME source
probe.nx source the franken compiler must still compile
(default runtime/_derefcast_minrepro.nx; compile rc 0
+ non-empty asm = behaves)
Exit 0 iff NO breaker found (prints/logs the per-function table
to knowledge/status/cc_splice_bisect.log either way).
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
| none |
consts
| 34 | const SB_MAX_FNS: i64 = 4096 |
functions
| 36 | func sb_puts2(logfd: i64, s: *u8) -> i64 |
| 44 | func sb_putn2(logfd: i64, v: i64) -> i64 |
| 62 | func sb_putsn2(logfd: i64, s: *u8, n: i64) -> i64 |
| 72 | func sb_label_len(buf: *u8, off: i64, end: i64) -> i64 called by 1: sb_scan |
| 105 | func sb_scan(buf: *u8, n: i64, tab: *i64) -> i64 |
| 132 | func sb_names_eq(a: *u8, ao: i64, al: i64, b: *u8, bo: i64, bl: i64) -> i64 called by 1: main |
| 142 | func sb_bodies_eq(a: *u8, as_: i64, ae: i64, b: *u8, bs: i64, be: i64) -> i64 called by 1: main |
| 154 | func sb_run(path: *u8, argv: *i64, envp: *i64, redir_out: i64, redir_err: i64) -> i64 |
| 168 | func sb_write_franken(base: *u8, base_n: i64, bs: i64, be: i64, |
| 182 | func sb_try_franken(probe: *u8, envp: *i64, devnull: i64) -> i64 |
| 219 | func main(argc: i64, argv: *i64) -> i64 |