nyash-codex
ae61226691
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>
2025-12-06 14:46:33 +09:00
..
2025-09-17 10:58:12 +09:00
2025-12-06 14:46:33 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-08-26 01:42:18 +09:00
2025-09-05 13:29:17 +09:00
2025-12-04 14:19:48 +09:00
2025-12-04 14:19:48 +09:00