refactor: Extract pattern lowerers from control_flow.rs (Phase 2)

- Created joinir/patterns/ subdirectory
- Extracted Pattern 1: pattern1_minimal.rs (Simple While)
- Extracted Pattern 2: pattern2_with_break.rs (Loop with Break)
- Extracted Pattern 3: pattern3_with_if_phi.rs (Loop with If-Else PHI)
- Created patterns/mod.rs dispatcher
- Removed ~410 lines from main control_flow.rs
- Zero breaking changes, all tests pass
This commit is contained in:
nyash-codex
2025-12-05 20:45:23 +09:00
parent 41de2d20e9
commit 282d2ef450
6 changed files with 455 additions and 413 deletions

View File

@ -0,0 +1,7 @@
//! JoinIR integration for control flow
//!
//! This module contains JoinIR-related control flow logic:
//! - Pattern lowerers (patterns/)
//! - Routing logic (future Phase 3)
pub(in crate::mir::builder) mod patterns;