tomoaki
2d9c6ea3c6
feat(joinir): Phase 254-255 - Pattern 6 (ScanWithInit) + exit PHI DCE fix
## Phase 254: Pattern 6 (ScanWithInit) Detection & JoinIR Lowering
Pattern 6 detects index_of/find/contains-style loops:
- Loop condition: i < x.length()
- Loop body: if with method call condition + early return
- Step: i = i + 1
- Post-loop: return not-found value (-1)
Key features:
- Minimal lowering: main/loop_step/k_exit functions
- substring hoisted to init-time BoxCall
- Two k_exit jumps (found: i, not found: -1)
- Tests: phase254_p0_index_of_min.hako
## Phase 255 P0: Multi-param Loop CarrierInfo
Implemented CarrierInfo architecture for Pattern 6's 3-variable loop (s, ch, i):
- i: LoopState (header PHI + exit PHI)
- s, ch: ConditionOnly (header PHI only)
- Alphabetical ordering for determinism
- All 3 PHI nodes created correctly
- Eliminates "undefined ValueId" errors
## Phase 255 P1: Exit PHI DCE Fix
Prevents exit PHI from being deleted by DCE:
- PostLoopEarlyReturnStepBox emits post-loop guard
- if (i != -1) { return i } forces exit PHI usage
- Proven pattern from Pattern 2 (balanced_depth_scan)
- VM/LLVM backends working
## Test Results
✅ pattern254_p0_index_of_vm.sh: PASS (exit code 1)
✅ pattern254_p0_index_of_llvm_exe.sh: PASS (mock)
✅ Quick profile: json_lint_vm PASS (progresses past index_of)
✅ Pattern 1-5: No regressions
## Files Added
- src/mir/builder/control_flow/joinir/patterns/pattern6_scan_with_init.rs
- src/mir/join_ir/lowering/scan_with_init_minimal.rs
- apps/tests/phase254_p0_index_of_min.hako
- docs/development/current/main/phases/phase-254/README.md
- docs/development/current/main/phases/phase-255/README.md
🧠 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-19 23:32:25 +09:00
..
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-12-04 15:00:45 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-12-04 13:32:58 +09:00
2025-12-04 13:32:58 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-12-01 11:10:46 +09:00
2025-11-06 15:41:52 +09:00
2025-11-24 05:23:26 +09:00
2025-11-06 15:41:52 +09:00
2025-11-27 08:18:09 +09:00
2025-11-27 08:18:09 +09:00
2025-11-27 02:58:38 +09:00
2025-11-27 02:58:38 +09:00
2025-11-23 04:10:12 +09:00
2025-11-22 01:21:38 +09:00
2025-12-04 17:47:19 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-12-07 19:00:12 +09:00
2025-12-07 19:00:12 +09:00
2025-12-06 03:30:03 +09:00
2025-12-06 00:10:27 +09:00
2025-12-07 19:00:12 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 06:21:45 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 09:02:02 +09:00
2025-11-21 11:16:38 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-12-02 12:36:28 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-28 17:13:52 +09:00
2025-12-13 22:51:13 +09:00
2025-12-16 21:37:07 +09:00
2025-12-17 01:01:07 +09:00
2025-12-17 04:25:57 +09:00
2025-12-17 04:26:05 +09:00
2025-12-17 06:10:59 +09:00
2025-12-17 05:43:44 +09:00
2025-12-17 16:33:26 +09:00
2025-12-17 16:57:11 +09:00
2025-12-17 18:29:27 +09:00
2025-12-17 18:29:27 +09:00
2025-12-17 21:25:12 +09:00
2025-12-17 18:29:27 +09:00
2025-12-17 22:47:42 +09:00
2025-12-17 23:16:53 +09:00
2025-12-18 01:58:38 +09:00
2025-12-18 02:18:57 +09:00
2025-12-18 02:32:08 +09:00
2025-12-18 02:39:33 +09:00
2025-12-18 02:55:02 +09:00
2025-12-18 03:43:10 +09:00
2025-12-18 03:43:10 +09:00
2025-12-18 04:53:04 +09:00
2025-12-18 05:50:16 +09:00
2025-12-18 06:09:36 +09:00
2025-12-18 06:45:56 +09:00
2025-12-18 07:07:04 +09:00
2025-12-18 07:53:27 +09:00
2025-12-18 07:18:00 +09:00
2025-12-18 09:13:13 +09:00
2025-12-18 09:36:25 +09:00
2025-12-18 21:51:33 +09:00
2025-12-15 12:12:54 +09:00
2025-12-15 06:24:18 +09:00
2025-12-15 13:02:26 +09:00
2025-12-18 22:11:08 +09:00
2025-12-18 22:46:32 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 05:28:49 +09:00
2025-12-19 05:28:49 +09:00
2025-12-19 04:41:01 +09:00
2025-12-19 08:36:45 +09:00
2025-12-19 16:19:49 +09:00
2025-12-19 16:19:49 +09:00
2025-12-19 16:19:49 +09:00
2025-12-19 16:19:49 +09:00
2025-12-19 16:19:49 +09:00
2025-12-19 16:19:49 +09:00
2025-12-19 17:03:56 +09:00
2025-12-19 17:03:56 +09:00
2025-12-08 21:39:49 +09:00
2025-12-08 21:39:49 +09:00
2025-12-08 23:14:10 +09:00
2025-12-08 23:14:10 +09:00
2025-12-08 23:14:10 +09:00
2025-12-08 23:14:10 +09:00
2025-12-08 23:59:19 +09:00
2025-12-08 23:59:19 +09:00
2025-12-09 00:59:38 +09:00
2025-12-09 00:59:38 +09:00
2025-12-09 00:59:38 +09:00
2025-12-09 01:09:54 +09:00
2025-12-09 01:09:54 +09:00
2025-12-09 01:47:07 +09:00
2025-12-09 01:47:07 +09:00
2025-12-09 01:47:07 +09:00
2025-12-09 03:07:15 +09:00
2025-12-09 03:07:15 +09:00
2025-12-09 03:40:25 +09:00
2025-12-09 04:20:28 +09:00
2025-12-09 04:20:28 +09:00
2025-12-09 14:45:04 +09:00
2025-12-09 14:45:04 +09:00
2025-12-09 18:32:03 +09:00
2025-12-09 18:32:03 +09:00
2025-12-09 18:32:03 +09:00
2025-12-09 18:32:03 +09:00
2025-12-09 18:32:03 +09:00
2025-12-09 18:32:03 +09:00
2025-12-10 00:01:53 +09:00
2025-12-10 04:10:45 +09:00
2025-12-10 01:53:06 +09:00
2025-11-22 00:00:51 +09:00
2025-12-10 02:07:28 +09:00
2025-12-10 09:28:08 +09:00
2025-12-10 15:00:20 +09:00
2025-12-10 17:59:24 +09:00
2025-12-10 17:59:24 +09:00
2025-12-11 17:24:32 +09:00
2025-12-19 20:30:58 +09:00
2025-12-19 23:32:25 +09:00
2025-12-10 16:20:44 +09:00
2025-11-06 15:41:52 +09:00
2025-09-01 23:44:34 +09:00
2025-12-04 13:32:58 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-12-02 14:07:19 +09:00
2025-12-02 12:36:28 +09:00
2025-12-02 14:07:19 +09:00
2025-11-21 11:16:38 +09:00
2025-11-21 11:16:38 +09:00
2025-12-04 13:54:45 +09:00
2025-11-21 13:19:18 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 06:21:45 +09:00
2025-11-24 04:13:41 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-24 14:17:02 +09:00
2025-11-24 14:17:02 +09:00
2025-11-21 11:16:38 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 06:21:45 +09:00
2025-12-16 15:53:40 +09:00
2025-12-16 17:08:15 +09:00
2025-12-16 17:08:15 +09:00
2025-12-16 17:08:15 +09:00
2025-11-21 06:21:45 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00