feat(pattern6): support reverse scan for last_index_of
Extend Pattern6 (ScanWithInit) to handle both forward and reverse scans: - Forward: i=0, loop(i < len), i=i+1 (existing) - Reverse: i=len-1, loop(i >= 0), i=i-1 (NEW) Implementation: - Added ScanDirection enum (Forward/Reverse) - Updated extract_scan_with_init_parts() to detect both patterns - Created lower_scan_with_init_reverse() lowerer - Pattern6 now selects appropriate lowerer based on scan direction Files modified: - src/mir/builder/control_flow/joinir/patterns/pattern6_scan_with_init.rs - src/mir/join_ir/lowering/scan_with_init_reverse.rs (new) - src/mir/join_ir/lowering/mod.rs Known issue (pre-existing): - PHI predecessor mismatch bug exists in Pattern6 (both forward and reverse) - This bug existed BEFORE Phase 257 P0 implementation - Out of scope for Phase 257 P0 - will be addressed separately Phase 257 P0
This commit is contained in:
@ -62,7 +62,8 @@
|
||||
- P1.5-DBG: boundary entry params の契約チェックを追加(VM実行前 fail-fast)。
|
||||
- P1.6: 契約チェックの薄い集約 `run_all_pipeline_checks()` を導入(pipeline の責務を縮退)。
|
||||
- P1.13: Pattern2 boundary entry params を `join_module.entry.params` SSOT へ寄せた(ValueId 推測生成の撤去)。
|
||||
- P1.13.5: Boundary SSOT 統一(Pattern4/6/7 横展開 + 共通ヘルパ `get_entry_function()` 抽出)。
|
||||
- P1.13.5(= Phase 256.8.5): Boundary SSOT 統一(Pattern4/6/7 横展開 + hardcoded ValueId/PARAM_MIN 撤去)。
|
||||
- Known issue(非ブロッカー): Pattern7 integration smoke の `phi predecessor mismatch` は残存(今回の修正とは独立)。
|
||||
|
||||
## 2025-12-20:Phase 257(last_index_of early return loop)🔜
|
||||
|
||||
|
||||
Reference in New Issue
Block a user