nyash-codex
8c2bc45be6
refactor(joinir): Phase 85 - Quick wins: loop_patterns removal, DebugOutputBox, dead_code audit
Quick Win 1: Remove loop_patterns_old.rs (COMPLETED)
- Deleted obsolete legacy loop pattern dispatcher (914 lines)
- All patterns (Break/Continue/Simple) now in modular loop_patterns/ system
- Moved helper functions (has_break_in_loop_body, has_continue_in_loop_body) to analysis.rs
- Updated loop_frontend_binding.rs to remove fallback
- Verified zero regressions: 974/974 lib tests PASS
Quick Win 2: DebugOutputBox consolidation (COMPLETED)
- New module: src/mir/join_ir/lowering/debug_output_box.rs (170 lines)
- Centralized debug output management with automatic HAKO_JOINIR_DEBUG checking
- Refactored 4 files to use DebugOutputBox:
- condition_env.rs: 3 scattered checks → 3 Box calls
- carrier_binding_assigner.rs: 1 check → 1 Box call
- scope_manager.rs: 3 checks → 3 Box calls
- analysis.rs: Updated lower_loop_with_if_meta to use new pattern system
- Benefits: Consistent formatting, centralized control, zero runtime cost when disabled
- Added 4 unit tests for DebugOutputBox
Quick Win 3: Dead code directive audit (COMPLETED)
- Audited all 40 #[allow(dead_code)] directives in lowering/
- Findings: All legitimate (Phase utilities, future placeholders, API completeness)
- No unsafe removals needed
- Categories:
- Phase 192 utilities (whitespace_check, entry_builder): Public API with tests
- Phase 231 placeholders (expr_lowerer): Explicitly marked future use
- Const helpers (value_id_ranges): API completeness
- Loop metadata (loop_update_summary): Future phase fields
Result: Net -858 lines, improved code clarity, zero regressions
Tests: 974/974 PASS (gained 4 from DebugOutputBox tests)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-13 19:25:11 +09:00
..
2025-12-13 19:01:14 +09:00
2025-11-21 06:25:17 +09:00
2025-12-08 23:43:26 +09:00
2025-12-11 20:54:33 +09:00
2025-11-30 04:35:40 +09:00
2025-12-13 19:25:11 +09:00
2025-12-12 17:12:58 +09:00
2025-12-11 20:54:33 +09:00
2025-12-13 19:01:14 +09:00
2025-11-30 14:30:28 +09:00
2025-12-11 20:54:33 +09:00
2025-12-11 20:54:33 +09:00
2025-12-11 20:54:33 +09:00
2025-12-03 13:59:06 +09:00
2025-11-30 09:38:28 +09:00
2025-12-11 20:54:33 +09:00
2025-11-24 15:02:51 +09:00
2025-11-21 06:25:17 +09:00
2025-12-11 17:16:10 +09:00
2025-12-13 05:34:56 +09:00
2025-12-13 07:05:30 +09:00
2025-12-07 23:45:55 +09:00
2025-12-03 13:59:06 +09:00
2025-12-03 13:59:06 +09:00
2025-11-21 06:25:17 +09:00
2025-12-05 17:22:14 +09:00
2025-12-11 20:54:33 +09:00
2025-09-17 07:43:07 +09:00
2025-11-30 04:35:40 +09:00
2025-12-05 15:45:42 +09:00
2025-12-12 16:40:20 +09:00
2025-11-24 15:02:51 +09:00
2025-11-24 14:17:02 +09:00
2025-12-13 05:34:56 +09:00
2025-11-24 14:17:02 +09:00
2025-09-17 07:43:07 +09:00
2025-12-03 13:59:06 +09:00
2025-11-30 04:35:40 +09:00
2025-12-05 19:39:54 +09:00
2025-11-24 15:02:51 +09:00
2025-09-24 09:30:42 +09:00
2025-11-24 15:02:51 +09:00
2025-11-21 06:25:17 +09:00
2025-11-17 09:45:03 +09:00
2025-11-24 15:02:51 +09:00
2025-11-21 06:25:17 +09:00
2025-12-03 13:59:06 +09:00