nyash-codex
9a352a8f02
refactor(phi): Phase 25.1q - PhiMergeHelper unified PHI insertion
**Changes**:
1. Created phi_merge.rs - Unified PHI insertion helper
- PhiMergeHelper struct for Conservative PHI strategy
- merge_variable() - single variable merging
- merge_all_vars() - batch variable merging
- 280 lines of well-documented, reusable logic
2. Refactored phi.rs merge_modified_vars
- Use PhiMergeHelper::merge_all_vars() instead of inline logic
- Reduced from ~80 lines to ~15 lines (81% reduction!)
- Eliminated PHI insertion duplication
**Benefits**:
- Single source of truth for PHI insertion logic
- Improved code clarity (Box-First theory applied)
- Foundation for future loop PHI unification
- Easy to test and maintain
**Testing**:
✅ mir_stage1_using_resolver_full_collect_entries_verifies passes
✅ mir_stage1_using_resolver_min_fragment_verifies passes
✅ Phase 25.1c/k SSA fix preserved
✅ MIR correctness verified
**Code Reduction**:
- Phase A-1: 25 lines (Conservative unification)
- Phase A-2: 65 lines (PhiMergeHelper)
- **Total: 90 lines reduced** (36% of 215 target!)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 10:46:07 +09:00
..
2025-11-19 08:04:43 +09:00
2025-11-18 18:56:35 +09:00
2025-11-17 07:58:44 +09:00
2025-11-18 18:56:35 +09:00
2025-09-28 12:19:49 +09:00
2025-11-13 16:40:58 +09:00
2025-11-18 18:56:35 +09:00
2025-09-28 20:38:09 +09:00
2025-11-18 18:56:35 +09:00
2025-11-19 02:44:40 +09:00
2025-11-18 18:56:35 +09:00
2025-11-18 18:56:35 +09:00
2025-11-18 18:56:35 +09:00
2025-11-18 18:56:35 +09:00
2025-11-18 06:39:45 +09:00
2025-11-19 08:04:43 +09:00
2025-11-17 00:48:18 +09:00
2025-11-17 00:48:18 +09:00
2025-11-17 00:48:18 +09:00
2025-11-17 00:48:18 +09:00
2025-11-18 06:11:17 +09:00
2025-11-17 00:48:18 +09:00
2025-11-19 10:20:46 +09:00
2025-11-19 03:28:58 +09:00
2025-11-19 08:35:56 +09:00
2025-11-18 18:56:35 +09:00
2025-09-28 20:38:09 +09:00
2025-11-17 00:48:18 +09:00
2025-11-19 10:46:07 +09:00
2025-11-19 10:46:07 +09:00
2025-09-11 05:22:52 +09:00
2025-11-17 23:13:57 +09:00
2025-11-19 08:04:43 +09:00
2025-11-18 18:56:35 +09:00
2025-11-19 02:44:40 +09:00
2025-10-31 20:18:39 +09:00