nyash-codex
91c7dfbf0b
refactor(normalization): Phase 135 P0 - Extend plan to zero post-loop assigns
Generalize NormalizationPlan suffix detection to accept zero post-loop assignments:
Goal: Improve entry point consistency by allowing `loop + assign* + return` (N >= 0)
Implementation:
- Modified plan_box.rs detection logic (only file changed)
- Removed `post_assign_count >= 1` requirement
- Unified Phase 131 (loop + return) and Phase 132-133 (loop + assign+ + return) paths
Changes:
- src/mir/builder/control_flow/normalization/plan_box.rs:
- Removed assignment count constraint
- Unified pattern detection: `loop + assign* + return` (N >= 0)
- apps/tests/phase135_loop_true_break_once_post_empty_return_min.hako (new fixture)
- tools/smokes/v2/profiles/integration/apps/phase135_*.sh (new smoke tests)
Pattern support:
- Phase 131/135: loop + return only (consumed: 2, post_assign_count: 0) ✅
- Phase 132: loop + 1 assign + return (consumed: 3, post_assign_count: 1) ✅
- Phase 133: loop + N assigns + return (consumed: 2+N, post_assign_count: N) ✅
Design principles maintained:
- **Minimal change**: Only plan_box.rs modified (execute_box unchanged)
- **SSOT**: Detection logic centralized in plan_box.rs
- **Box-First**: Responsibility separation preserved (Plan/Execute)
Test results:
- Unit tests (plan_box): 9/9 PASS (2 new tests added)
- Phase 135 VM/LLVM EXE: PASS (exit code 1)
- Phase 131 regression: 2/2 PASS (path now unified)
- Phase 133 regression: 2/2 PASS
- cargo test --lib: PASS
Benefits:
- Unified entry point for all loop + post patterns
- Easier maintenance (single detection logic)
- Future extensibility (easy to add new patterns)
- Clear separation of Phase 131 and Phase 132-135 paths
Default behavior unchanged: Dev-only guard maintained
Related: Phase 135 normalization pattern consistency improvement
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 22:46:32 +09:00
..
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-12-04 15:00:45 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-12-04 13:32:58 +09:00
2025-12-04 13:32:58 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-12-01 11:10:46 +09:00
2025-11-06 15:41:52 +09:00
2025-11-24 05:23:26 +09:00
2025-11-06 15:41:52 +09:00
2025-11-27 08:18:09 +09:00
2025-11-27 08:18:09 +09:00
2025-11-27 02:58:38 +09:00
2025-11-27 02:58:38 +09:00
2025-11-23 04:10:12 +09:00
2025-11-22 01:21:38 +09:00
2025-12-04 17:47:19 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-12-07 19:00:12 +09:00
2025-12-07 19:00:12 +09:00
2025-12-06 03:30:03 +09:00
2025-12-06 00:10:27 +09:00
2025-12-07 19:00:12 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 06:21:45 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 09:02:02 +09:00
2025-11-21 11:16:38 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-12-02 12:36:28 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-28 17:13:52 +09:00
2025-12-13 22:51:13 +09:00
2025-12-16 21:37:07 +09:00
2025-12-17 01:01:07 +09:00
2025-12-17 04:25:57 +09:00
2025-12-17 04:26:05 +09:00
2025-12-17 06:10:59 +09:00
2025-12-17 05:43:44 +09:00
2025-12-17 16:33:26 +09:00
2025-12-17 16:57:11 +09:00
2025-12-17 18:29:27 +09:00
2025-12-17 18:29:27 +09:00
2025-12-17 21:25:12 +09:00
2025-12-17 18:29:27 +09:00
2025-12-17 22:47:42 +09:00
2025-12-17 23:16:53 +09:00
2025-12-18 01:58:38 +09:00
2025-12-18 02:18:57 +09:00
2025-12-18 02:32:08 +09:00
2025-12-18 02:39:33 +09:00
2025-12-18 02:55:02 +09:00
2025-12-18 03:43:10 +09:00
2025-12-18 03:43:10 +09:00
2025-12-18 04:53:04 +09:00
2025-12-18 05:50:16 +09:00
2025-12-18 06:09:36 +09:00
2025-12-18 06:45:56 +09:00
2025-12-18 07:07:04 +09:00
2025-12-18 07:53:27 +09:00
2025-12-18 07:18:00 +09:00
2025-12-18 09:13:13 +09:00
2025-12-18 09:36:25 +09:00
2025-12-18 21:51:33 +09:00
2025-12-15 12:12:54 +09:00
2025-12-15 06:24:18 +09:00
2025-12-15 13:02:26 +09:00
2025-12-18 22:11:08 +09:00
2025-12-18 22:46:32 +09:00
2025-12-08 21:39:49 +09:00
2025-12-08 21:39:49 +09:00
2025-12-08 23:14:10 +09:00
2025-12-08 23:14:10 +09:00
2025-12-08 23:14:10 +09:00
2025-12-08 23:14:10 +09:00
2025-12-08 23:59:19 +09:00
2025-12-08 23:59:19 +09:00
2025-12-09 00:59:38 +09:00
2025-12-09 00:59:38 +09:00
2025-12-09 00:59:38 +09:00
2025-12-09 01:09:54 +09:00
2025-12-09 01:09:54 +09:00
2025-12-09 01:47:07 +09:00
2025-12-09 01:47:07 +09:00
2025-12-09 01:47:07 +09:00
2025-12-09 03:07:15 +09:00
2025-12-09 03:07:15 +09:00
2025-12-09 03:40:25 +09:00
2025-12-09 04:20:28 +09:00
2025-12-09 04:20:28 +09:00
2025-12-09 14:45:04 +09:00
2025-12-09 14:45:04 +09:00
2025-12-09 18:32:03 +09:00
2025-12-09 18:32:03 +09:00
2025-12-09 18:32:03 +09:00
2025-12-09 18:32:03 +09:00
2025-12-09 18:32:03 +09:00
2025-12-09 18:32:03 +09:00
2025-12-10 00:01:53 +09:00
2025-12-10 04:10:45 +09:00
2025-12-10 01:53:06 +09:00
2025-11-22 00:00:51 +09:00
2025-12-10 02:07:28 +09:00
2025-12-10 09:28:08 +09:00
2025-12-10 15:00:20 +09:00
2025-12-10 17:59:24 +09:00
2025-12-10 17:59:24 +09:00
2025-12-11 17:24:32 +09:00
2025-12-10 16:20:44 +09:00
2025-11-06 15:41:52 +09:00
2025-09-01 23:44:34 +09:00
2025-12-04 13:32:58 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-12-02 14:07:19 +09:00
2025-12-02 12:36:28 +09:00
2025-12-02 14:07:19 +09:00
2025-11-21 11:16:38 +09:00
2025-11-21 11:16:38 +09:00
2025-12-04 13:54:45 +09:00
2025-11-21 13:19:18 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 06:21:45 +09:00
2025-11-24 04:13:41 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-24 14:17:02 +09:00
2025-11-24 14:17:02 +09:00
2025-11-21 11:16:38 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 06:21:45 +09:00
2025-11-21 06:21:45 +09:00
2025-12-16 15:53:40 +09:00
2025-12-16 17:08:15 +09:00
2025-12-16 17:08:15 +09:00
2025-12-16 17:08:15 +09:00
2025-11-21 06:21:45 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00