nyash-codex
caf38dba19
feat(joinir): Phase 190 - LoopExitBinding boxification
Formalize exit PHI → variable_map reconnection with explicit LoopExitBinding
structure. Eliminates hardcoded variable names and prepares for Pattern 4+
multi-carrier support.
Key changes:
1. **New LoopExitBinding struct**:
- carrier_name: String (e.g., "sum", "count")
- join_exit_value: ValueId (JoinIR exit value)
- host_slot: ValueId (variable_map destination)
Makes it explicit: WHICH variable, FROM where, TO where.
2. **Updated JoinInlineBoundary**:
- Replaced implicit host_outputs: Vec<ValueId>
- With explicit exit_bindings: Vec<LoopExitBinding>
- Old APIs marked #[deprecated] for backward compatibility
3. **Pattern 3 now uses explicit bindings**:
Before: boundary.host_outputs = vec![sum_var_id] // implicit
After: boundary.exit_bindings = vec![LoopExitBinding {
carrier_name: "sum".to_string(),
join_exit_value: ValueId(18),
host_slot: sum_var_id,
}]
4. **merge_joinir_mir_blocks() updated**:
- Consumes exit_bindings instead of bare ValueIds
- Enhanced debug output shows carrier names
- Validates carrier name matches variable_map expectations
Benefits:
- Self-documenting code: bindings explain themselves
- Multi-carrier ready: Pattern 4+ just extend the vec![]
- Type-safe: No implicit semantics
- Debuggable: Explicit carrier name in logs
Test status:
- Build: ✅ SUCCESS (0 errors, 47 warnings)
- Pattern 3: ✅ PASS (no regressions)
- Backward compatibility: ✅ Maintained via #[deprecated]
Prepare for Phase 191: Pattern Router Table and Phase 192: JoinLoopTrace
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: ChatGPT <noreply@openai.com>
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 19:59:40 +09:00
..
2025-11-24 14:17:02 +09:00
2025-12-01 11:10:46 +09:00
2025-12-04 22:33:56 +09:00
2025-11-24 14:17:02 +09:00
2025-11-26 10:28:03 +09:00
2025-11-28 17:42:19 +09:00
2025-12-05 15:05:25 +09:00
2025-12-05 15:05:25 +09:00
2025-12-05 15:05:25 +09:00
2025-12-01 11:10:46 +09:00
2025-12-05 17:22:14 +09:00
2025-12-04 22:33:56 +09:00
2025-11-29 15:08:23 +09:00
2025-11-29 16:11:39 +09:00
2025-12-04 22:33:56 +09:00
2025-12-05 19:59:40 +09:00
2025-12-01 11:10:46 +09:00
2025-12-05 15:45:42 +09:00
2025-12-05 13:03:48 +09:00
2025-12-05 15:28:54 +09:00
2025-12-05 15:45:42 +09:00
2025-12-02 18:16:21 +09:00
2025-11-24 15:02:51 +09:00
2025-12-05 15:45:42 +09:00
2025-12-05 13:46:44 +09:00
2025-12-05 07:47:22 +09:00
2025-11-26 10:28:03 +09:00
2025-11-28 17:42:19 +09:00
2025-11-26 10:47:35 +09:00
2025-11-28 17:42:19 +09:00
2025-11-30 08:54:18 +09:00
2025-11-30 06:10:58 +09:00
2025-11-24 14:17:02 +09:00