Files
hakorune/docs/development/current
tomoaki 5e662eaaf6 fix(normalization): Phase 143 execution fix - Param region SSOT
Problem: normalized_helpers allocated env params as ValueId(1,2...)
in PHI Reserved region (0-99) instead of Param region (100-999)
per JoinValueSpace contract.

Root cause: All 4 normalized shadow modules started from
next_value_id=1, violating the Param region contract.

Solution:
- Add NormalizedHelperBox::alloc_env_params_param_region()
  that allocates params starting from PARAM_MIN (100)
- Update 4 normalized shadow files to use new API:
  - loop_true_if_break_continue.rs
  - loop_true_break_once.rs
  - if_as_last_join_k.rs
  - post_if_post_k.rs
- Fix instruction_rewriter.rs type mismatch
  (func.signature.params → func.params)

Verification:
- Unit tests: 69/69 PASS
- VM smoke: exit code 7 
- LLVM EXE smoke: exit code 7  (timeout resolved!)

ValueId Space Contract (Phase 201):
| Region       | Range    | Purpose                      |
|--------------|----------|------------------------------|
| PHI Reserved | 0-99     | Loop header PHI dst          |
| Param        | 100-999  | env params (flag, counter)   |
| Local        | 1000+    | Const, BinOp, condition      |

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-19 08:23:20 +09:00
..