tomoaki
275fe45ba4
feat(normalization): Phase 142 P0 - Statement-level normalization
## Summary
Changed normalization unit from "block suffix" to "statement (loop only)"
to prevent pattern explosion.
## Changes
1. **PlanBox** (`plan_box.rs`):
- Always return `loop_only()` for any `loop(true)`, regardless of what follows
- Subsequent statements (return, assignments) handled by normal MIR lowering
- ~70 lines reduced, 7 unit tests updated
2. **build_block** (`stmts.rs`):
- Removed `break` after consumed=1 from suffix_router
- Continue processing subsequent statements normally
- Phase 142 P0 comments added
3. **Tests**:
- Fixture: `phase142_loop_stmt_only_then_return_length_min.hako`
- VM smoke: exit code 3 (s="abc" → s.length() → 3)
## Results
- ✅ Unit tests: 10/10 passed
- ✅ Phase 142 VM smoke: PASS
- ✅ Phase 131 regression: PASS
- ✅ Build: Success
## Design
- **Pattern Explosion Prevention**: Normalize only the loop (consumed=1)
- **Out-of-Scope Policy**: Always Ok(None) for fallback
- **Fail-Fast**: Only for "in-scope but broken" cases
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-19 04:41:01 +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-18 22:46:32 +09:00
2025-12-18 22:46:32 +09:00
2025-12-15 19:25:33 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 00:15:32 +09:00
2025-12-19 04:41:01 +09:00