refactor(joinir): Move Trim logic from Pattern2 to TrimLoopLowerer
Phase 180-3: Extract Pattern2 Trim/P5 logic to dedicated module Changes: - Pattern2: Delegated Trim processing to TrimLoopLowerer (~160 lines removed) - Pattern2: Simplified to ~25 lines of delegation code - TrimLoopLowerer: Implemented full logic from Pattern2 (lines 180-340) - Net reduction: -135 lines in Pattern2 (371 lines total) Implementation: - LoopConditionScopeBox + LoopBodyCarrierPromoter integration - Carrier initialization code generation (substring + whitespace check) - Trim break condition replacement (!is_carrier) - ConditionEnv bindings setup (carrier + original variable) Testing: - cargo build --release: SUCCESS (0 errors, warnings only) - All existing Pattern2 tests: PASS - No behavior changes, refactoring only
This commit is contained in:
@ -51,6 +51,7 @@ pub(in crate::mir::builder) mod pattern3_with_if_phi;
|
||||
pub(in crate::mir::builder) mod pattern4_carrier_analyzer;
|
||||
pub(in crate::mir::builder) mod pattern4_with_continue;
|
||||
pub(in crate::mir::builder) mod router;
|
||||
pub(in crate::mir::builder) mod trim_loop_lowering; // Phase 180: Dedicated Trim/P5 lowering module
|
||||
pub(in crate::mir::builder) mod trim_pattern_validator;
|
||||
pub(in crate::mir::builder) mod trim_pattern_lowerer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user