tomoaki
fa00ed3018
refactor(joinir): Split contract_checks.rs into 2 files (Phase 286C-4.3)
Split 1,239-line contract_checks.rs into responsibility-based modules
for better maintainability and clarity.
## Changes
1. **New file: debug_assertions.rs** (440 lines)
- 6 debug-only verification functions (panic! on violation)
- All functions guarded with #[cfg(debug_assertions)]
- Excluded from release builds
- Functions:
* verify_loop_header_phis()
* verify_exit_line()
* verify_exit_phi_no_collision()
* verify_valueid_regions()
* verify_condition_bindings_consistent()
* verify_header_phi_dsts_not_redefined()
2. **Updated: contract_checks.rs** (1,239 → 848 lines, -391 lines)
- Kept 6 Fail-Fast functions (Result<(), String>)
- Kept all 13 unit tests
- Removed debug-only functions and imports
3. **Updated: mod.rs**
- Added `mod debug_assertions;` declaration
## Responsibility Split
- **contract_checks.rs**: Fail-Fast contracts (production)
- Return errors with diagnostic messages
- Run in both debug and release builds
- **debug_assertions.rs**: Debug-only assertions (development)
- Panic on contract violations
- Excluded from release builds (#[cfg(debug_assertions)])
## Benefits
- Single Responsibility Principle (each file <850 lines)
- Clear separation: Fail-Fast vs Debug-only
- Improved maintainability (localized changes)
- Better build performance (debug code stripped in release)
## Test Results
- ✅ Build: 0 errors
- ✅ Smoke tests: 45/46 PASS (no regression)
- ❌ core_direct_array_oob_set_rc_vm: FAIL (existing known issue)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-25 06:08:46 +09:00
..
2025-12-24 04:49:52 +09:00
2025-12-20 03:11:58 +09:00
2025-12-25 06:08:46 +09:00
2025-12-25 05:18:06 +09:00
2025-12-18 01:38:25 +09:00
2025-12-16 21:37:07 +09:00
2025-12-21 04:34:22 +09:00
2025-12-16 21:37:07 +09:00
2025-12-24 03:44:56 +09:00
2025-12-21 05:47:37 +09:00