feat(joinir): Task 200-2 - JoinInlineBoundaryBuilder implementation for Pattern2
Builder pattern for JoinInlineBoundary construction, reduces field manipulation scattering. # Changes - NEW: src/mir/join_ir/lowering/inline_boundary_builder.rs (165 lines) - JoinInlineBoundaryBuilder with 7 fluent methods - Complete unit test coverage (4 tests) - MODIFIED: src/mir/join_ir/lowering/mod.rs (+2 lines) - Export inline_boundary_builder module - Public re-export of JoinInlineBoundaryBuilder - MODIFIED: src/mir/builder/control_flow/joinir/patterns/pattern2_with_break.rs - Replace direct boundary field manipulation with builder pattern - 9 lines of field assignments → fluent builder chain # Benefits - **Centralized**: All boundary construction logic in builder - **Readable**: Fluent API shows construction intent clearly - **Maintainable**: Changes to boundary structure isolated to builder - **Type Safe**: Builder validates field consistency # Tests ✅ All builder unit tests pass (4/4) ✅ All pattern module tests pass (30+) ✅ Library build succeeds with no errors 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@ -42,6 +42,7 @@ pub mod if_phi_context; // Phase 61-1
|
||||
pub mod if_phi_spec; // Phase 61-2
|
||||
pub mod if_select; // Phase 33
|
||||
pub mod inline_boundary; // Phase 188-Impl-3: JoinIR→Host boundary
|
||||
pub mod inline_boundary_builder; // Phase 200-2: Builder pattern for JoinInlineBoundary
|
||||
pub mod loop_form_intake;
|
||||
pub mod loop_pattern_router; // Phase 33-12: Loop pattern routing
|
||||
pub mod loop_pattern_validator; // Phase 33-23: Loop structure validation
|
||||
@ -65,6 +66,8 @@ pub mod value_id_ranges;
|
||||
// Re-export public lowering functions
|
||||
pub use funcscanner_append_defs::lower_funcscanner_append_defs_to_joinir;
|
||||
pub use funcscanner_trim::lower_funcscanner_trim_to_joinir;
|
||||
// Phase 200-2: Builder pattern
|
||||
pub use inline_boundary_builder::JoinInlineBoundaryBuilder;
|
||||
// Phase 31: LoopToJoinLowerer 統一箱
|
||||
pub use loop_to_join::LoopToJoinLowerer;
|
||||
// Phase 188: Pattern-based loop lowering
|
||||
|
||||
Reference in New Issue
Block a user