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-12-19 04:41:01 +09:00
2025-12-19 03:59:41 +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-18 21:52:21 +09:00
2025-12-18 21:51:52 +09:00
2025-12-11 20:54:33 +09:00
2025-12-17 21:24:46 +09:00
2025-12-17 16:33:11 +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-16 07:02:14 +09:00
2025-11-30 09:38:28 +09:00
2025-12-16 07:02:14 +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-18 08:14:49 +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-15 22:03:34 +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-16 07:02:14 +09:00
2025-12-16 03:33:56 +09:00
2025-11-24 14:17:02 +09:00
2025-12-18 00:22:21 +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