diff --git a/docs/development/current/main/01-JoinIR-Selfhost-INDEX.md b/docs/development/current/main/01-JoinIR-Selfhost-INDEX.md index f3c4e0fa..c872dd12 100644 --- a/docs/development/current/main/01-JoinIR-Selfhost-INDEX.md +++ b/docs/development/current/main/01-JoinIR-Selfhost-INDEX.md @@ -42,7 +42,14 @@ JoinIR の箱構造と責務、ループ/if の lowering パターンを把握 - `docs/development/current/main/phase81-pattern2-exitline-contract.md`(promoted carriers の ExitLine 契約検証) 5. Boxification feedback(Phase 78–85 の振り返りと Phase 86 推奨) - `docs/development/current/main/phase78-85-boxification-feedback.md` -4. 代表的な Phase 文書(現役ラインとの接点だけ絞ったもの) +6. Phase 86: Carrier Init Builder + Error Tags ✅ + - **Status**: COMPLETE (2025-12-13) + - **Modules**: + - `src/mir/builder/control_flow/joinir/merge/carrier_init_builder.rs` (+8 tests) + - `src/mir/join_ir/lowering/error_tags.rs` (+5 tests) + - **Achievements**: SSOT 確立(CarrierInit → ValueId 生成統一、エラータグ中央化、DebugOutputBox 完全移行) + - **Impact**: 987/987 tests PASS, +13 unit tests, Single Responsibility validated +7. 代表的な Phase 文書(現役ラインとの接点だけ絞ったもの) - `docs/development/current/main/phase33-16-INDEX.md` - `docs/development/current/main/phase33-17-joinir-modularization-analysis.md` - `docs/development/current/main/phase183-selfhost-depth2-joinir-status.md` diff --git a/docs/development/current/main/10-Now.md b/docs/development/current/main/10-Now.md index 3d9e2beb..42798ba5 100644 --- a/docs/development/current/main/10-Now.md +++ b/docs/development/current/main/10-Now.md @@ -17,8 +17,24 @@ - 残課題(JoinIR ライン): - JoinIR→MIR merge の一般化(複雑な Select/PHI パターンの統合) - JsonParserBox など実アプリ側での長期運用テスト - - Boxification(箱化)の振り返りと、次の小粒リファクタ(Phase 86 推奨): - - `docs/development/current/main/phase78-85-boxification-feedback.md` + +### Phase 86: Carrier Init Builder + Error Tags (2025-12-13) ✅ + +**Status**: COMPLETE - SSOT 確立完了 + +**Achievements**: +- Carrier Initialization Builder: CarrierInit → ValueId 生成を単一関数化 (carrier_init_builder.rs, +8 tests) +- Error Message Centralization: JoinIR エラータグを SSOT 化 (error_tags.rs, +5 tests) +- DebugOutputBox Migration: 全 JOINIR_DEBUG 使用箇所を DebugOutputBox に統一 + +**Impact**: +- Tests: 987/987 PASS (+13 unit tests from Phase 86) +- SSOT modules: carrier_init_builder, error_tags (一貫性向上) +- Code quality: Single Responsibility, Testability First principles validated + +**Next**: Phase 87 (LLVM exe line SSOT) + +**Reference**: phase78-85-boxification-feedback.md, carrier_init_builder.rs, error_tags.rs ### Scope / BindingId(dev-only の段階移行ライン) diff --git a/docs/development/current/main/joinir-architecture-overview.md b/docs/development/current/main/joinir-architecture-overview.md index c2e5e795..8082c7be 100644 --- a/docs/development/current/main/joinir-architecture-overview.md +++ b/docs/development/current/main/joinir-architecture-overview.md @@ -683,6 +683,20 @@ Local Region (1000..=LOCAL_MAX): - **Phase 200-A**: 既存実装に委譲する skeleton。 - **Phase 200-B**: CapturedEnv の変数を condition_bindings に追加する実装予定。 +- **Phase 86 SSOT Modules (2025-12-13) ✅** + + - **carrier_init_builder.rs**: CarrierInit → ValueId 生成の SSOT + - Location: `src/mir/builder/control_flow/joinir/merge/carrier_init_builder.rs` + - Function: `init_value(builder, init, host_id, name, debug) -> ValueId` + - Purpose: FromHost/BoolConst/LoopLocalZero の統一変換(34+ 行の重複 match 削減) + - Tests: 8 unit tests + + - **error_tags.rs**: JoinIR エラーメッセージ整形の SSOT + - Location: `src/mir/join_ir/lowering/error_tags.rs` + - Functions: `freeze()`, `exit_line_contract()`, `ownership_relay_unsupported()`, `pattern_detection_failed()`, `lowering_error()` + - Purpose: 一貫したエラータグフォーマット(typo 防止、重複文字列削減) + - Tests: 5 unit tests + ### 2.4 expr result ライン(式としての戻り値) - **exit_phi_builder**