nyash-codex
fc5706e3f2
feat(phase22.1): JsonFrag.last_index_of_from() unified search refactor
- Add: JsonFragBox.last_index_of_from(hay, needle, pos) method
- VM fallback: simple reverse search using substring + lastIndexOf
- Replaces hand-written lastIndexOf calls in MIR builder
- Refactor: lower_loop_sum_bc_box.hako uses unified method
- Line 75: Break sentinel backward search
- Line 113: Continue sentinel backward search
- Eliminates 2 hand-written lastIndexOf calls
- Test: json_frag_last_index_of_from_canary_vm.sh
- Loop with break(i==3) and continue(i==2)
- Expect: 0+1+4 = 5 (skip 2, break at 3)
- Status: PASS ✅
Phase 22.1 ultrathink cleanup: code consolidation complete