nx_macro_nest_gate.nx
buildroot/runtime/nx_macro_nest_gate.nx
about
nx_macro_nest_gate.nx -- NESTED conditional chains and @elif arm selection.
WHY SEPARATE FROM nx_macro_v6_test. v6 exercises the EXPRESSION side of @if (comparison, arithmetic,
&&, ||). It never nests a chain inside another chain, and never has two true @elif arms. Those are
exactly the cases a single shared already-taken flag gets WRONG -- and it errs toward compiling EXTRA
arms, which link and run. An implementation with no branch STACK passes all of v6 and still
miscompiles every nested conditional in the corpus.
Every block that must be dropped carries a poison identifier that exists nowhere in the corpus, AND
redefines the same function name -- so a wrong arm selection fails TWICE over: undefined identifier
AND duplicate symbol.
expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_kernel_v2.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
| none |
functions
| 20 | func nest_pick() -> nx_int { return BROKEN_INNER_TRUE_ARM_TAKEN } called by 1: main |
| 22 | func nest_pick() -> nx_int { return 1 } |
| 25 | func nest_pick() -> nx_int { return BROKEN_OUTER_ELSE_TAKEN } |
| 30 | func arm_pick() -> nx_int { return BROKEN_FALSE_IF_ARM_TAKEN } called by 1: main |
| 32 | func arm_pick() -> nx_int { return 2 } |
| 34 | func arm_pick() -> nx_int { return BROKEN_SECOND_TRUE_ELIF_ALSO_TAKEN } |
| 36 | func arm_pick() -> nx_int { return BROKEN_ELSE_AFTER_A_TAKEN_ARM } |
| 42 | func mixed_pick() -> nx_int { return 3 } called by 1: main |
| 45 | func mixed_pick() -> nx_int { return BROKEN_MIXED_DEPTH_MISCOUNT } |
| 51 | func swallow_pick() -> nx_int { return BROKEN_DEAD_NESTED_TRUE_ARM_EMITTED } called by 1: main |
| 53 | func swallow_pick() -> nx_int { return BROKEN_DEAD_NESTED_ELSE_EMITTED } |
| 56 | func swallow_pick() -> nx_int { return 4 } |
| 59 | func main() -> nx_exit |