nyash-codex
ef71ea955c
feat(control_tree): Phase 133 P0 - Multiple post-loop assigns support
Extend Phase 132's loop(true) + post-loop to accept multiple assignments:
Goal: `x=0; loop(true){ x=1; break }; x=x+2; x=x+3; return x` → exit code 6
Implementation:
- Extended loop_true_break_once.rs pattern detection (len() == 2 → len() >= 2)
- Added iterative assignment lowering (for loop over post_nodes)
- Reused Phase 130's lower_assign_stmt for each assignment
- Maintained ExitMeta DirectValue mode (PHI-free)
Changes:
- apps/tests/phase133_loop_true_break_once_post_multi_add_min.hako (new fixture)
- tools/smokes/v2/profiles/integration/apps/phase133_*_multi_add_*.sh (new smokes)
- src/mir/control_tree/normalized_shadow/loop_true_break_once.rs (+30 lines)
- docs/development/current/main/phases/phase-133/README.md (new documentation)
- docs/development/current/main/10-Now.md (Phase 133 entry added)
Scope (Phase 130 baseline):
- ✅ x = <int literal>
- ✅ x = y (variable copy)
- ✅ x = x + <int literal> (increment)
- ❌ Function calls / general expressions (future phases)
Design principles:
- Minimal change: ~30 lines added
- SSOT preservation: env_post_k remains single source of truth
- Reuse: Leveraged existing lower_assign_stmt
- Fail-Fast: Contract violations trigger freeze_with_hint
Test results:
- cargo test --lib: 1176 PASS
- Phase 133 VM: PASS (exit code 6)
- Phase 133 LLVM EXE: PASS (exit code 6)
- Phase 132 regression: PASS (exit code 3)
- Phase 131 regression: PASS (exit code 1)
- Phase 97 regression: PASS
Architecture maintained:
- 5-function structure unchanged (main/loop_step/loop_body/k_exit/post_k)
- PHI-free DirectValue mode
- Zero changes to ExitMeta, merge logic, or JoinIR contracts
Related: Phase 133 loop(true) + multiple post-loop assignments
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 22:11:08 +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-13 22:51:13 +09:00
2025-12-16 21:37:07 +09:00
2025-12-17 00:59:33 +09:00
2025-12-17 01:01:07 +09:00
2025-12-17 04:25:57 +09:00
2025-12-17 21:24:59 +09:00
2025-12-17 21:24:59 +09:00
2025-12-17 21:24:59 +09:00
2025-12-17 04:26:05 +09:00
2025-12-17 21:24:59 +09:00
2025-12-17 06:10:59 +09:00
2025-12-17 05:43:44 +09:00
2025-12-17 21:24:59 +09:00
2025-12-17 16:33:26 +09:00
2025-12-17 21:24:59 +09:00
2025-12-17 16:57:11 +09:00
2025-12-17 21:24:59 +09:00
2025-12-18 02:32:32 +09:00
2025-12-17 21:24:59 +09:00
2025-12-18 02:32:32 +09:00
2025-12-17 21:25:12 +09:00
2025-12-17 21:25:12 +09:00
2025-12-17 21:24:59 +09:00
2025-12-17 18:29:27 +09:00
2025-12-17 22:47:42 +09:00
2025-12-17 22:47:42 +09:00
2025-12-17 23:16:53 +09:00
2025-12-17 23:16:53 +09:00
2025-12-18 01:58:38 +09:00
2025-12-18 02:32:32 +09:00
2025-12-18 02:18:57 +09:00
2025-12-18 02:32:32 +09:00
2025-12-18 02:32:08 +09:00
2025-12-18 02:32:08 +09:00
2025-12-18 02:39:33 +09:00
2025-12-18 02:39:33 +09:00
2025-12-18 02:55:02 +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 03:43:10 +09:00
2025-12-18 03:43:10 +09:00
2025-12-18 04:39:23 +09:00
2025-12-18 04:39:23 +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:32:10 +09:00
2025-12-18 07:15:23 +09:00
2025-12-18 07:07:04 +09:00
2025-12-18 07:18:00 +09:00
2025-12-18 07:53:27 +09:00
2025-12-18 09:13:13 +09:00
2025-12-18 09:13:13 +09:00
2025-12-18 18:28:50 +09:00
2025-12-18 18:28:50 +09:00
2025-12-15 12:12:54 +09:00
2025-12-18 21:51:33 +09:00
2025-12-18 21:51:33 +09:00
2025-12-15 16:57:28 +09:00
2025-12-18 22:11:08 +09:00
2025-12-18 22:11:08 +09:00
2025-12-15 17:49:08 +09:00
2025-12-15 17:00:51 +09:00
2025-12-15 19:25:33 +09:00