Files
hakorune/docs/development/current/main/design
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
..

design/

docs/development/current/main/design/ は、長期参照する設計図SSOT 寄り)を置く場所。

  • 原則: “Phaseの作業ログ/完了報告” は ../phases/ に置く。
  • 原則: “不具合調査ログ” は ../investigations/ に置く。

現役の設計図(入口)

  • JoinIR の地図navigation SSOT: docs/development/current/main/design/joinir-design-map.md
  • Loop Canonicalizer設計 SSOT: docs/development/current/main/design/loop-canonicalizer.md
  • ControlTree / StepTree構造SSOT: docs/development/current/main/design/control-tree.md
  • Normalized ExprLowerer式の一般化 SSOT: docs/development/current/main/design/normalized-expr-lowering.md