Files
hakorune/docs/development/current/main/20-Decisions.md
tomoaki 4082abb30c feat(normalization): Phase 142 P0 - Loop statement-level normalization
Phase 142-loopstmt P0: Statement-level normalization

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-19 05:28:49 +09:00

19 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Self Current Task — Decisions (main)
20251213
- JoinIR lowering の name-based 変数解決は、dev-only`normalized_dev`)で BindingId-based に段階移行するdual-path を維持)。
- promoted carriersDigitPos/Trim などの synthetic nameは、`BindingId(original) → BindingId(promoted) → ValueId(join)` の鎖で接続し、by-name ルール分岐は導入しない。
- debug/観測は既存のフラグ(例: `NYASH_JOINIR_DEBUG`)に集約し、新しい環境変数のスパローは避ける。
20251219
- return の表現力拡張は「パターン総当たり」ではなく、pure expression を扱う `NormalizedExprLowererBox`AST walkerへ収束させるPhase 140
- Call/MethodCall は effects + typing の論点が増えるため、pure とは分離して Phase 141+ で段階投入する。
- out-of-scope は `Ok(None)` で既存経路へフォールバックし、既定挙動不変を維持するstrict は “close-but-unsupported” のみ fail-fast
20250908
- ループ制御は既存命令Branch/Jump/Phiで表現し、新命令は導入しない。
- Builder に loop_ctx{head, exit}を導入し、continue/break を分岐で降ろす。
- Verifier の支配関係/SSA を崩さないよう、単一 exit と postterminated 後の emit 禁止を徹底。
- VInvokevector 経路)の戻り値は、短期は「既知メソッドの整数返り」を特例扱いで保持し、
中期は nyash.toml の戻り型ヒント or NyRT シムの期待フラグで正道化。