Stage-B minimal JoinIR lowering統一化:
1. Add Case-A helpers to loop_to_join.rs:
- lower_case_a_for_stageb_body (StageBBodyExtractorBox.build_body_src/2)
- lower_case_a_for_stageb_funcscanner (StageBFuncScannerBox.scan_all_boxes/1)
2. Update stageb_body.rs and stageb_funcscanner.rs:
- Replace manual LoopForm construction with construct_simple_while_loopform
- Route through LoopToJoinLowerer like other Case-A functions
- Remove unused imports (LoopForm, MirQuery)
Now all 6 JoinIR lowering modules use the same unified pattern:
- skip_ws, trim, append_defs, stage1_resolver, stageb_body, stageb_funcscanner
All route through LoopToJoinLowerer for consistency.
Test results: JSON snapshot 6/6 PASS
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Phase 32 cleanup:
1. Delete legacy is_supported_case_a_loop function from loop_to_join.rs
- Replaced by is_supported_case_a_loop_view() in Phase 32 Step 3
2. Extract construct_simple_while_loopform helper to common.rs
- Unified LoopForm construction for simple while loops
- Parameters: entry_is_preheader (trim=true, stage1=false)
has_break (trim=true, stage1=false)
- Sets latch=body to satisfy is_simple_case_a_loop check
3. Update lowering modules to use the common helper:
- funcscanner_trim.rs: entry_is_preheader=true, has_break=true
- stage1_using_resolver.rs: entry_is_preheader=false, has_break=false
Test results: JSON snapshot 6/6 PASS, VM bridge trim 2/2 PASS
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Phase 31 Step 3-A: Add early return using is_case_a_minimal_target() filter
- Check before LoopScopeShape construction for efficiency
- Returns None immediately for non-target functions
Phase 31 Step 3-B: Add structural validation to is_supported_case_a_loop()
- Single exit check: loop_form.break_targets.len() <= 1
- Variable presence check: !carriers.is_empty() || !pinned.is_empty()
- Debug logging for rejection reasons
Also refactored lower_with_scope() from if-else chain to match expression for clarity.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>