feat(joinir): Phase 197 Pattern4 multi-carrier exit fix & AST-based update
Phase 197-B: Multi-Carrier Exit Mechanism - Fixed reconnect_boundary() to use remapper for per-carrier exit values - ExitMeta now uses carrier_param_ids (Jump arguments) instead of carrier_exit_ids (k_exit parameters) - Root cause: k_exit parameters aren't defined when JoinIR functions merge into host MIR Phase 197-C: AST-Based Update Expression - LoopUpdateAnalyzer extracts update patterns from loop body AST - Pattern4 lowerer uses UpdateExpr for semantically correct RHS - sum = sum + i → uses i_next (current iteration value) - count = count + 1 → uses const_1 Files modified: - src/mir/builder/control_flow/joinir/merge/mod.rs - src/mir/join_ir/lowering/loop_with_continue_minimal.rs - src/mir/join_ir/lowering/loop_update_analyzer.rs (new) Test results: - loop_continue_multi_carrier.hako: 25, 5 ✅ - loop_continue_pattern4.hako: 25 ✅ Pattern 1–4 now unified with: - Structure-based detection (LoopFeatures + classify) - Carrier/Exit metadata (CarrierInfo + ExitMeta) - Boundary connection (JoinInlineBoundary + LoopExitBinding) - AST-based update expressions (LoopUpdateAnalyzer) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
|
||||
pub mod carrier_info; // Phase 196: Carrier metadata for loop lowering
|
||||
pub mod common;
|
||||
pub mod loop_update_analyzer; // Phase 197: Update expression analyzer for carrier semantics
|
||||
pub mod exit_args_resolver;
|
||||
pub mod funcscanner_append_defs;
|
||||
pub mod funcscanner_trim;
|
||||
|
||||
Reference in New Issue
Block a user