docs: Phase 192-impl completion + Phase 193 MethodCall in Init design
Phase 192-impl documentation updates: - joinir-architecture-overview.md: Section 2.2/7.2 updated with Phase 192 completion - ComplexAddendNormalizer AST preprocessing完了 - Phase 193/194 roadmap追加 Phase 193 instruction document: - phase193-init-methodcall-design.md: 5-task breakdown for MethodCall in init support - Task 193-1: Init expression inventory (indexOf, get patterns) - Task 193-2: LoopBodyLocalInitLowerer extension design - Task 193-3: Implementation - emit_method_call_init function - Task 193-4: E2E verification (phase193_init_method_call.hako) - Task 193-5: Documentation updates - Method whitelist approach (Fail-Fast for unsupported methods) - ConditionEnv-only receiver resolution 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@ -188,7 +188,10 @@ JoinIR ラインで守るべきルールを先に書いておくよ:
|
||||
- 設計原則:
|
||||
- **箱理論**: 各 Box が単一責任を持ち、境界明確。
|
||||
- **決定性**: BTreeMap 使用で一貫した順序保証(PHI 生成の決定性)。
|
||||
- **Phase 192予定**: Complex addend(`v = v*10 + f(x)`)は Normalizer で temp に落としてから NumberAccumulation に載せる。
|
||||
- **Phase 192完了**: Complex addend(`v = v*10 + f(x)`)は ComplexAddendNormalizer で temp に分解してから NumberAccumulation に載せる。
|
||||
- `complex_addend_normalizer.rs`: Pure AST transformer(前処理箱)
|
||||
- Pattern2 統合完了、emission ライン再利用(変更なし)
|
||||
- 制約: MethodCall を含む init 式は Phase 193 で対応予定
|
||||
|
||||
### 2.3 キャリア / Exit / Boundary ライン
|
||||
|
||||
@ -500,12 +503,18 @@ JoinIR は Rust 側だけでなく、将来的に .hako selfhost コンパイラ
|
||||
- 対応済み: 整数リテラル、変数参照、二項演算
|
||||
- テスト: `phase191_body_local_atoi.hako` → 期待値 123 ✅
|
||||
|
||||
2. **Complex addend 対応(Phase 192)**
|
||||
- `v = v * 10 + digits.indexOf(ch)` のような method call を含む NumberAccumulation
|
||||
- 方針: ComplexAddendNormalizer で `temp = f(x)` に分解してから NumberAccumulation に載せる
|
||||
- 現状は Fail-Fast で拒否
|
||||
2. **✅ Complex addend 対応** → Phase 192 完了
|
||||
- `v = v * 10 + digits.indexOf(ch)` のような method call を含む NumberAccumulation対応
|
||||
- ComplexAddendNormalizer で `temp = f(x)` に分解してから NumberAccumulation に載せる実装完了
|
||||
- テスト: phase192_normalization_demo.hako → 123 ✅
|
||||
- 制約: MethodCall を含む init 式は Phase 193 で対応予定
|
||||
|
||||
3. **JsonParser 残り複雑ループ・selfhost ループへの適用(Phase 193+)**
|
||||
3. **MethodCall を含む init 式の対応(Phase 193)**
|
||||
- `local digit = digits.indexOf(ch)` のような MethodCall init の lowering
|
||||
- LoopBodyLocalInitLowerer 拡張(BoxCall emission)
|
||||
- メソッド whitelist: indexOf, substring 等
|
||||
|
||||
4. **JsonParser 残り複雑ループ・selfhost ループへの適用(Phase 194+)**
|
||||
- `_parse_array` / `_parse_object`(P4 Continue + 複数 MethodCall)
|
||||
- `_unescape_string`(複雑なキャリア + flatten)
|
||||
- selfhost `.hako` コンパイラの全ループを JoinIR で処理
|
||||
|
||||
Reference in New Issue
Block a user