Plan item #25. The compiler's open-reference label model relies on a single global "open reference" slot, which forces two sites to emit an OP_NOOP purely to flush a pending label (with comments reading "I have no idea why"). The real issue is that getOrOpen() can reuse a label that a different construct opened.
Fix: make labels explicitly named and scoped per construct ($loop3_cond, $if7_else) instead of the global slot. This removes the padding instructions and the whole class of adjacent-construct bugs — the original "Branch target not found: $0" bug (issue #4) was this class.
Also unblocks the OP_NOOP-elimination optimiser pass (plan #24).
Plan item #25. The compiler's open-reference label model relies on a single global "open reference" slot, which forces two sites to emit an
OP_NOOPpurely to flush a pending label (with comments reading "I have no idea why"). The real issue is thatgetOrOpen()can reuse a label that a different construct opened.Fix: make labels explicitly named and scoped per construct (
$loop3_cond,$if7_else) instead of the global slot. This removes the padding instructions and the whole class of adjacent-construct bugs — the original "Branch target not found: $0" bug (issue #4) was this class.Also unblocks the
OP_NOOP-elimination optimiser pass (plan #24).