feat(joinir): Phase 240-EX - Pattern2 header condition ExprLowerer integration
Implementation: - Add make_pattern2_scope_manager() helper for DRY - Header conditions use ExprLowerer for supported patterns - Legacy fallback for unsupported patterns - Fail-Fast on supported patterns that fail Tests: - 4 new tests (all pass) - test_expr_lowerer_supports_simple_header_condition_i_less_literal - test_expr_lowerer_supports_header_condition_var_less_var - test_expr_lowerer_header_condition_generates_expected_instructions - test_pattern2_header_condition_via_exprlowerer Also: Archive old phase documentation (34k lines removed) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
Status: Historical
|
||||
|
||||
# 🧹 プロジェクト大掃除計画 2025-11-04
|
||||
|
||||
**作成日**: 2025-11-04
|
||||
@ -1,3 +1,5 @@
|
||||
Status: Historical
|
||||
|
||||
# 🧹 プロジェクト大掃除実行レポート 2025-11-04
|
||||
|
||||
**実行日時**: 2025-11-04 16:25
|
||||
@ -1,3 +1,5 @@
|
||||
Status: Historical
|
||||
|
||||
# Hakorune Rustコードベース 重複コード・共通化調査レポート
|
||||
|
||||
## 概要
|
||||
@ -1,3 +1,5 @@
|
||||
Status: Historical
|
||||
|
||||
# Hakorune Legacy Code Investigation Report
|
||||
|
||||
**調査日**: 2025-11-06
|
||||
@ -489,4 +491,3 @@ cargo test
|
||||
|
||||
**調査担当**: Claude Code
|
||||
**次のアクション**: Phase A (Safe削除) の実行
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
Status: Historical
|
||||
|
||||
# 🧹 Phase 2 実行レポート 2025-11-04
|
||||
|
||||
**実行日時**: 2025-11-04 16:45
|
||||
@ -1,3 +1,5 @@
|
||||
Status: Historical
|
||||
|
||||
# Nyash ドキュメント再編成計画 📚
|
||||
|
||||
## 📊 現状の分析結果
|
||||
@ -1,3 +1,5 @@
|
||||
Status: Historical
|
||||
|
||||
# Nyash ドキュメント再編成報告書 📋
|
||||
|
||||
## 実行日時
|
||||
@ -1,3 +1,5 @@
|
||||
Status: Historical
|
||||
|
||||
# call() Replacement Report - lang/src
|
||||
|
||||
**Date:** 2025-11-01
|
||||
8
docs/archive/phases/phase-170-197/README.md
Normal file
8
docs/archive/phases/phase-170-197/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# Phase 170–197 Archive
|
||||
|
||||
Status: Historical
|
||||
Scope: JsonParser / JoinIR 実戦フェーズ(Phase 170〜197)の詳細メモ・設計・調査ログのアーカイブ。
|
||||
|
||||
Phase 170〜197 に関する設計や調査の詳細ドキュメントは、このディレクトリに集約しているよ。
|
||||
現行ラインからは、必要なものだけを `docs/development/current/main` 側で参照する前提だよ。
|
||||
|
||||
@ -184,3 +184,4 @@ src/mir/join_ir/lowering/
|
||||
2. **差し替え容易**: 名前 → AST → MIR と段階的に精度向上可能
|
||||
3. **テスト容易**: LoopUpdateSummary を直接テスト可能
|
||||
4. **後方互換**: LoopFeatures.update_summary は Option なので影響最小
|
||||
Status: Historical
|
||||
@ -224,3 +224,4 @@ NYASH_JOINIR_STRUCTURE_ONLY=1 \
|
||||
---
|
||||
|
||||
**End of Report**
|
||||
Status: Historical
|
||||
@ -253,3 +253,4 @@ loop(pos < len) {
|
||||
⚠️ **Next Blockers**: Method calls in loops (Pattern 5+ features, not bugs)
|
||||
|
||||
**Overall Impact**: Significant progress - variable scope classification is now correct. Remaining errors are legitimate feature gaps, not misclassification bugs.
|
||||
Status: Historical
|
||||
@ -458,3 +458,4 @@ true // ✅ FIX: Default to OuterLocal for function parameters
|
||||
- Extended scope heuristics
|
||||
- Condition simplification analysis
|
||||
- Method call support in loop conditions
|
||||
Status: Historical
|
||||
@ -108,3 +108,4 @@ LoopBodyLocal を含む条件式を扱いたくなった場合は:
|
||||
- それを新しい Pattern5 として設計すれば、既存 Pattern2/4 の仕様を崩さずに拡張できる。
|
||||
|
||||
このドキュメントは設計メモのみであり、実装は別フェーズ(Phase 170‑D‑impl など)で行う。
|
||||
Status: Historical
|
||||
@ -250,3 +250,4 @@ JoinInlineBoundary::new_inputs_only(
|
||||
2. Update all 4 patterns
|
||||
3. Re-run Phase 170 validation tests
|
||||
4. Document the "always include condition variables in boundary" pattern
|
||||
Status: Historical
|
||||
@ -316,3 +316,4 @@ CURRENT_TASK.md に Phase 170 セクションを追加(1-2 段落):
|
||||
**Phase**: 170(.hako JSON ライブラリ設計)
|
||||
**予定工数**: 2-3 時間
|
||||
**難易度**: 低(調査 + ドキュメント化)
|
||||
Status: Historical
|
||||
@ -207,3 +207,4 @@ Proceed to Phase 171-2 for design decision.
|
||||
- Phase 170 Analysis: `phase170-valueid-boundary-analysis.md`
|
||||
- Phase 170 Completion: `phase170-completion-report.md`
|
||||
- JoinIR Design: `docs/development/current/main/phase33-10-if-joinir-design.md`
|
||||
Status: Historical
|
||||
@ -416,3 +416,4 @@ This follows the "Fail-Fast" principle from CLAUDE.md.
|
||||
- Phase 171-1 Analysis: `phase171-1-boundary-analysis.md`
|
||||
- JoinInlineBoundary: `src/mir/join_ir/lowering/inline_boundary.rs`
|
||||
- Merge Logic: `src/mir/builder/control_flow/joinir/merge/mod.rs`
|
||||
Status: Historical
|
||||
@ -447,3 +447,4 @@ Phase 171-2 完了後:
|
||||
**実工数**: 2 時間(実装完了、using 制限発見)
|
||||
**難易度**: 中(統合 + テスト確認)
|
||||
**状態**: 実装完了(using 制限により Phase 173 で動作確認予定)
|
||||
Status: Historical
|
||||
@ -276,3 +276,4 @@ Finished `release` profile [optimized] target(s) in 0.07s
|
||||
- Phase 171-1 Analysis: `phase171-1-boundary-analysis.md`
|
||||
- Phase 171-2 Design: `phase171-2-condition-inputs-design.md`
|
||||
- JoinIR Design: `docs/development/current/main/phase33-10-if-joinir-design.md`
|
||||
Status: Historical
|
||||
@ -422,3 +422,4 @@ LoopBodyCarrierPromoter::try_promote()
|
||||
- [ ] Phase 172-2: JsonParser loops への展開
|
||||
- Similar pattern recognition
|
||||
- Generalized carrier promotion
|
||||
Status: Historical
|
||||
@ -491,3 +491,4 @@ Phase 171 MVP は正確性 > 速度を優先。最適化は Phase 173+ へ。
|
||||
**予定工数**: 3-4 時間
|
||||
**難易度**: 中(JSON パーサ実装 + .hako での Box 設計)
|
||||
**期待削減**: hako_check 行数 60%、コード共通化 100%
|
||||
Status: Historical
|
||||
@ -343,3 +343,4 @@ Phase 172 will **replace this early return** with actual lowering logic.
|
||||
- **Phase 171-C-5**: TrimLoopHelper design
|
||||
- **Pattern2 Lowerer**: `src/mir/builder/control_flow/joinir/patterns/pattern2_with_break.rs`
|
||||
- **Test File**: `local_tests/test_trim_main_pattern.hako`
|
||||
Status: Historical
|
||||
@ -292,3 +292,4 @@ box ProgramJSONBox {
|
||||
**実装者**: Claude Code (AI 協働開発)
|
||||
**レビュー日**: 2025-12-04
|
||||
**Phase 状態**: 172 実装完了 ✅、173+ 提案あり
|
||||
Status: Historical
|
||||
@ -489,3 +489,4 @@ for def in defs {
|
||||
**予定工数**: 2-3 時間
|
||||
**難易度**: 低-中(既存実装の適用 + 薄いラッパー追加)
|
||||
**期待効果**: JSON 処理 SSOT 確立、selfhost depth-2 基盤完成
|
||||
Status: Historical
|
||||
@ -178,3 +178,4 @@ User/stakeholder should decide:
|
||||
**Outcome**: Investigation complete, two implementation options proposed
|
||||
**Recommendation**: Option 1 (minimal parser fix)
|
||||
**Estimated Completion**: 2-3 hours (Option 1) or 30 minutes (Option 2)
|
||||
Status: Historical
|
||||
@ -209,3 +209,4 @@ The core using resolver + MIR lowering integration is **functionally complete**
|
||||
**Investigation Time**: 2 hours
|
||||
**Complexity**: Medium (Runtime debugging required)
|
||||
**Blocking**: No (workarounds available)
|
||||
Status: Historical
|
||||
@ -198,3 +198,4 @@ JsonParserBox.parse/1("{}")
|
||||
**Phase**: 173-2 Investigation
|
||||
**Outcome**: Strategy revision required
|
||||
**Recommendation**: Minimal parser fix (Option 1)
|
||||
Status: Historical
|
||||
@ -444,3 +444,4 @@ JsonParserBox が「正式な標準ライブラリ」として完全に機能す
|
||||
**予定工数**: 4-6 時間
|
||||
**難易度**: 高(名前解決・MIR lowering の統合)
|
||||
**前提**: Phase 173 前半(Task 1-3)完了
|
||||
Status: Historical
|
||||
@ -381,3 +381,4 @@ Phase 171 で実装した Trim パイプラインが、JsonParser の `_trim`
|
||||
- `_unescape_string` - Pattern1、LoopBodyLocal 問題なし(対象外)
|
||||
|
||||
**Phase 173-3 での設計方針**: 既存の Trim パイプラインをそのまま活用
|
||||
Status: Historical
|
||||
@ -308,3 +308,4 @@ loop(p < s.length()) {
|
||||
**ドキュメント成果物**:
|
||||
- `phase173-jsonparser-p5-impl.md` - 実装結果レポート
|
||||
- `CURRENT_TASK.md` - Phase 173 成果記録
|
||||
Status: Historical
|
||||
@ -329,3 +329,4 @@ NYASH_JOINIR_CORE=1 NYASH_LEGACY_LOOPBUILDER=0 \
|
||||
- 複雑なループへの拡張
|
||||
- MethodCall 対応
|
||||
- Execution 問題の解決
|
||||
Status: Historical
|
||||
@ -228,3 +228,4 @@ NYASH_CLI_VERBOSE=1
|
||||
**更新日**: 2025-12-04
|
||||
**Phase**: 173(using + 静的 Box メソッド解決)
|
||||
**進捗**: Task 1-2 完了(25%)/ Task 3-8 残り(75%)
|
||||
Status: Historical
|
||||
@ -330,3 +330,4 @@ local parser = new JsonLib.JsonParserBox()
|
||||
**Phase**: 173(using + 静的 Box メソッド解決)
|
||||
**進捗**: Task 1-2 完了(25%)
|
||||
**次タスク**: Task 3(JsonParserBox バグ修正)または Task 4(using resolver 修正)
|
||||
Status: Historical
|
||||
@ -262,3 +262,4 @@ local parser = new JsonLib.JsonParserBox()
|
||||
**作成日**: 2025-12-04
|
||||
**調査時間**: 約2時間
|
||||
**次のタスク**: Task 3(JsonParserBox バグ修正)または Task 2(仕様固定)
|
||||
Status: Historical
|
||||
@ -385,3 +385,4 @@ Phase 173 完了後:
|
||||
**予定工数**: 4-6 時間
|
||||
**難易度**: 高(名前解決・MIR lowering の修正)
|
||||
**Rust VM 変更**: なし(.hako/using 側のみ)
|
||||
Status: Historical
|
||||
@ -115,3 +115,4 @@
|
||||
- **Ready for Phase 34+**: No technical debt from this refactoring
|
||||
|
||||
**Answer to user's question**: "It's simpler now, not complex!" ✨
|
||||
Status: Historical
|
||||
@ -343,3 +343,4 @@ loop(pos < len) {
|
||||
3. Phase 176: エスケープ処理追加(continue 対応)
|
||||
4. Phase 177: _parse_number 対応(indexOf パターン)
|
||||
5. Phase 178+: _parse_array/_parse_object(複雑ループ)
|
||||
Status: Historical
|
||||
@ -360,3 +360,4 @@ NYASH_JOINIR_CORE=1 NYASH_LEGACY_LOOPBUILDER=0 \
|
||||
**成功すれば**:
|
||||
- Trim P5 パイプラインが「Trim 専用」ではなく「文字比較ループ汎用」であることが証明される
|
||||
- Phase 175+ での拡張(複数キャリア・continue 等)の基盤が確立される
|
||||
Status: Historical
|
||||
@ -278,3 +278,4 @@ bb12: // Exit block
|
||||
- **Phase 174**: P5 minimal PoC (quote detection only)
|
||||
- **Phase 176**: Pattern2 multi-carrier implementation ([phase176-completion-report.md](phase176-completion-report.md))
|
||||
- **Pattern Space**: [docs/development/current/main/loop_pattern_space.md](loop_pattern_space.md)
|
||||
Status: Historical
|
||||
@ -234,3 +234,4 @@ The problem is that `lower_loop_with_break_minimal()` completely ignores `Carrie
|
||||
3. **Integration Test**: Pattern 3 (trim) with Pattern 2 shape
|
||||
- Test case: `loop(pos < len) { if ch == ' ' { break } pos = pos + 1 }`
|
||||
- Verify sum/count carriers survive through break exits
|
||||
Status: Historical
|
||||
@ -163,3 +163,4 @@ _parse_string の制御フロー:
|
||||
- **Production 適用**: 構造は変えず、制御フローのみ追加(Phase 177+)
|
||||
|
||||
→ **「Carrier 数を固定して制御フローを段階的に複雑化」が正解**
|
||||
Status: Historical
|
||||
@ -176,3 +176,4 @@ static box JsonParserStringTest3 {
|
||||
## まとめ
|
||||
**Phase 177-A では、min2 と同型の Simple Case を Production 環境に適用する。**
|
||||
エスケープ処理は Phase 178 以降に回し、まず「2-carrier + break」の動作確認を優先する。
|
||||
Status: Historical
|
||||
@ -69,3 +69,4 @@ To support string loops, either:
|
||||
2. Process loop body statements in MIR alongside JoinIR control flow (Option B)
|
||||
|
||||
Phase 178 provides the detection foundation for future string support.
|
||||
Status: Historical
|
||||
@ -372,3 +372,4 @@ Pattern 2 has complex Trim pattern logic (~100 lines) that:
|
||||
- **LoopScopeShapeBuilder**: `src/mir/builder/control_flow/joinir/patterns/loop_scope_shape_builder.rs`
|
||||
- **ConditionEnvBuilder**: `src/mir/builder/control_flow/joinir/patterns/condition_env_builder.rs`
|
||||
- **JoinIRConversionPipeline**: `src/mir/builder/control_flow/joinir/patterns/conversion_pipeline.rs`
|
||||
Status: Historical
|
||||
@ -321,3 +321,4 @@ return Err(format!(
|
||||
- Focus is on code organization and maintainability
|
||||
- Trim pattern logic remains identical, just relocated
|
||||
- Future Phase 181+ can build on this clean foundation
|
||||
Status: Historical
|
||||
@ -415,3 +415,4 @@ cargo test --release --lib pattern4
|
||||
**Phase**: 182(CharComparison 汎用化の準備・設計)
|
||||
**ステータス**: ドキュメント・計画のみ(コード変更なし)
|
||||
**次フェーズ**: Phase 183(実装・リネーム)
|
||||
Status: Historical
|
||||
@ -126,3 +126,4 @@ Success criteria:
|
||||
- Phase 181: JsonParser loop analysis
|
||||
- Pattern detection: `src/mir/builder/control_flow/joinir/patterns/detection.rs`
|
||||
- P1/P2 lowerers: `src/mir/builder/control_flow/joinir/patterns/pattern{1,2}_*.rs`
|
||||
Status: Historical
|
||||
@ -238,3 +238,4 @@ To support `_parse_number` and `_atoi` fully, we need:
|
||||
- Phase 181: JsonParser loop inventory
|
||||
- Phase 171-C: LoopBodyCarrierPromoter original design
|
||||
- Phase 170-D: LoopConditionScopeBox implementation
|
||||
Status: Historical
|
||||
@ -372,3 +372,4 @@ loop(i < 5) {
|
||||
- **Phase 171-C**: LoopBodyCarrierPromoter original design
|
||||
- **carrier_update_emitter.rs**: Current update emission logic
|
||||
- **condition_env.rs**: Condition variable environment design
|
||||
Status: Historical
|
||||
@ -674,3 +674,4 @@ If full expression lowering is too complex, **Phase 186-simple** could:
|
||||
2. **Testing earlier would have caught this**: Phase 184 should have had E2E test
|
||||
3. **Phase 185 assumption was wrong**: Assumed init lowering was done, it wasn't
|
||||
4. **Clear scope boundaries needed**: "Infrastructure" vs "Full implementation"
|
||||
Status: Historical
|
||||
@ -529,3 +529,4 @@ loop(...) {
|
||||
## Changelog
|
||||
|
||||
- **2025-12-09**: Initial design document created
|
||||
Status: Historical
|
||||
@ -410,3 +410,4 @@ Phase 187 establishes a clear design for string update handling in JoinIR:
|
||||
**No code changes in Phase 187**—all design decisions documented for Phase 188+ implementation.
|
||||
|
||||
**Next Phase**: Phase 188 - Implement StringAppendChar/Literal lowering (3-4 hours estimate).
|
||||
Status: Historical
|
||||
@ -412,3 +412,4 @@ Three minimal test files created for verification:
|
||||
|
||||
**Report Status**: ✅ Complete
|
||||
**Next Action**: Update CURRENT_TASK.md and roadmap documents
|
||||
Status: Historical
|
||||
@ -350,3 +350,4 @@ static box Main {
|
||||
🤖 **Created by**: Claude Code
|
||||
📅 **Date**: 2025-12-05
|
||||
🎯 **Target**: Phase 189 - Select Instruction MIR Bridge Implementation
|
||||
Status: Historical
|
||||
@ -980,3 +980,4 @@ Assignment {
|
||||
- **E2E 結果**: `phase190_atoi_impl.hako` → 12 ✅、`phase190_parse_number_impl.hako` → 123 ✅
|
||||
- **制約**: body-local 変数 assignment は JoinIR 未対応(Phase 186 残タスク)
|
||||
- ExitLine contract Verifier 追加(`#[cfg(debug_assertions)]`)
|
||||
Status: Historical
|
||||
@ -289,3 +289,4 @@ Phase 191 で以下が達成されました:
|
||||
- `apps/tests/phase191_body_local_atoi.hako`(新規作成)
|
||||
- `apps/tests/phase190_atoi_impl.hako`(退行確認)
|
||||
- `apps/tests/phase190_parse_number_impl.hako`(退行確認)
|
||||
Status: Historical
|
||||
@ -598,3 +598,4 @@ When running a test with complex addend pattern:
|
||||
|
||||
- **2025-12-09**: Initial design document (Section 1-8)
|
||||
- **2025-12-09**: Implementation complete (Section 9)
|
||||
Status: Historical
|
||||
@ -105,4 +105,5 @@ No pattern depends on function names (e.g. `"main"`) or specific variable names
|
||||
- Multiple carrier variables
|
||||
- More complex continue/break combinations
|
||||
- Align LoopForm/LoopScopeShape-based detection with this AST-based pipeline so both views are consistent.
|
||||
Status: Historical
|
||||
|
||||
@ -665,3 +665,4 @@ Phase 193 では **ConditionEnv を「ループパラメータ専用 view」と
|
||||
> 「テーブル+メソッド呼び出し」のような複合パターンは、次の箱(または .hako 側のリライト)案件にする。
|
||||
|
||||
→ **Phase 194+ は Option C(実戦投入優先)を推奨**
|
||||
Status: Historical
|
||||
@ -201,3 +201,4 @@ Phase 193 achieves complete modularization and enhancement of JoinIR loop loweri
|
||||
- **ValueId Allocation**: Currently uses `max(variable_map) + 1` strategy. Future: delegate to builder's proper ValueId allocator.
|
||||
- **Debugging**: Environment variable `NYASH_TRACE_EXIT_BINDING=1` will be useful for debugging Phase 193-5 integration.
|
||||
- **Next Phase**: Phase 194 can now focus on advanced pattern detection without carrier handling complexity.
|
||||
Status: Historical
|
||||
@ -362,3 +362,4 @@ Output example:
|
||||
- [ ] loop_continue_multi_carrier.hako test passes with correct output
|
||||
- [ ] Variable map correctly reflects post-loop carrier state
|
||||
- [ ] Debugging environment variable works as expected
|
||||
Status: Historical
|
||||
@ -572,3 +572,4 @@ let structure_only = match std::env::var("NYASH_JOINIR_STRUCTURE_ONLY") {
|
||||
3. Multiple MethodCalls 未対応
|
||||
|
||||
**全体評価**: Phase 194 は「検証フェーズ」として大成功。次の Phase への明確な道筋を示した。
|
||||
Status: Historical
|
||||
@ -319,3 +319,4 @@ Phase 194 is about **validating existing infrastructure**, not adding new functi
|
||||
- **Multiple MethodCalls**: Needs Phase 195+ design
|
||||
|
||||
This inventory provides a clear roadmap for future JoinIR expansion based on real-world loop patterns.
|
||||
Status: Historical
|
||||
@ -86,4 +86,5 @@ pub fn trace() -> &'static JoinLoopTrace
|
||||
|
||||
- Phase 194 は **挙動を変えない** リファクタフェーズ(観測レイヤーの整形)として扱う。
|
||||
- Loop パターンや ExitBinding まわりは Phase 193/196/197 で安定しているので、それを壊さない形でログだけを寄せることが目的。
|
||||
Status: Historical
|
||||
|
||||
@ -625,3 +625,4 @@ Section 7.2 の Phase 195 を完了マークに更新:
|
||||
- 設計書に基づく実装
|
||||
- 単一責任の原則維持
|
||||
- ドキュメント駆動開発
|
||||
Status: Historical
|
||||
@ -692,3 +692,4 @@ MIR (壊れている):
|
||||
- P3 Lowerer は複数キャリア対応完了 ✅
|
||||
- ExitLine/CarrierVar は既に対応済み(変更不要)✅
|
||||
- JoinIR→MIR bridge の Select バグは別 Issue として分離 ✅
|
||||
Status: Historical
|
||||
@ -219,3 +219,4 @@ RC: 0
|
||||
### 成果
|
||||
- Phase 195 の Multi-carrier Pattern 3 が完全動作
|
||||
- 既存 Pattern 1/2/3 に退行なし
|
||||
Status: Historical
|
||||
@ -597,3 +597,4 @@ bb10:
|
||||
### コミット
|
||||
|
||||
- **[996925eb]** fix(joinir): Phase 196 Select double-remap bug in instruction_rewriter
|
||||
Status: Historical
|
||||
@ -213,3 +213,4 @@ for idx in 1..=carrier_info.carriers.len() {
|
||||
- Created Phase 196 documentation (Task 196-1)
|
||||
- Identified root cause: hardcoded ExitMeta::single() and join_inputs
|
||||
- Task investigation completed by Agent
|
||||
Status: Historical
|
||||
@ -443,3 +443,4 @@ NYASH_JOINIR_CORE=1 ./target/release/hakorune apps/tests/phase182_p1_match_liter
|
||||
- `docs/development/current/main/phase194-loop-inventory.md`(ループ一覧)
|
||||
- `docs/development/current/main/joinir-architecture-overview.md`(実戦適用状況表)
|
||||
- `CURRENT_TASK.md`(Phase 197 セクション)
|
||||
Status: Historical
|
||||
@ -141,3 +141,4 @@ After implementation:
|
||||
- Test case: `apps/tests/loop_continue_multi_carrier.hako`
|
||||
- Lowerer: `src/mir/join_ir/lowering/loop_with_continue_minimal.rs`
|
||||
- Pattern detection: `src/mir/builder/control_flow/joinir/patterns/pattern4_with_continue.rs`
|
||||
Status: Historical
|
||||
9
docs/archive/phases/phase-33/README.md
Normal file
9
docs/archive/phases/phase-33/README.md
Normal file
@ -0,0 +1,9 @@
|
||||
# Phase 33 Archive (JoinIR 初期フェーズ)
|
||||
|
||||
Status: Historical
|
||||
Scope: Phase 33 の JoinIR 初期フェーズに関する設計/分析/実装メモを集約。
|
||||
|
||||
Phase 33 で書かれた JoinIR の初期ドキュメントはこのフォルダに集めたよ。
|
||||
現行設計は `docs/development/current/main/joinir-architecture-overview.md`(SSOT)と
|
||||
`docs/development/current/main/01-JoinIR-Selfhost-INDEX.md`(入口)を参照してね。
|
||||
|
||||
@ -253,3 +253,4 @@ bb10:
|
||||
**Created**: 2025-12-06
|
||||
**Status**: Analysis Complete, Ready for Implementation
|
||||
**Priority**: HIGH (Correctness Issue)
|
||||
Status: Historical
|
||||
@ -164,3 +164,4 @@ bb10:
|
||||
```
|
||||
|
||||
The PHI instruction for `sum_merged = Select(continue_cond, sum_param, sum_next)` (line 304 in loop_with_continue_minimal.rs) is being lost during merge.
|
||||
Status: Historical
|
||||
@ -628,3 +628,4 @@ if merge_block.instructions.iter().any(|inst| {
|
||||
|
||||
**Phase 33-10完了判定**: PHIチェック追加のみで完了とする
|
||||
**次のフェーズ**: Phase 33-11(IfMerge実装、またはPhase 34へ移行)
|
||||
Status: Historical
|
||||
@ -139,3 +139,4 @@ Expected output:
|
||||
1
|
||||
2
|
||||
```
|
||||
Status: Historical
|
||||
@ -397,3 +397,4 @@ if let Some(phi_dst) = carrier_phis.get(&binding.carrier_name) {
|
||||
|
||||
## Date: 2025-12-07
|
||||
## Status: In Progress - Design Phase Complete!
|
||||
Status: Historical
|
||||
@ -502,3 +502,4 @@ Phase 33-16 transforms exit value handling from "skip and hope" to "SSA-correct
|
||||
5. Passing correct values to ExitLineOrchestrator (Phase 6)
|
||||
|
||||
This eliminates SSA-undef errors while maintaining clear separation of concerns and backward compatibility.
|
||||
Status: Historical
|
||||
@ -242,4 +242,5 @@ Boundary 構造体自体には新フィールドを足さず、
|
||||
4. 上記テスト戦略に沿って回帰テスト・SSA 検証を行う。
|
||||
|
||||
実装時に設計が変わった場合は、このファイルと `joinir-architecture-overview.md` を SSOT として必ず更新すること。
|
||||
Status: Historical
|
||||
|
||||
@ -299,3 +299,4 @@ merge_joinir_mir_blocks() {
|
||||
**Replace skip logic**: Yes, with fallback mechanism for backward compatibility
|
||||
|
||||
**The magic**: Loop header PHI dst (allocated in Phase 3.5, finalized in Phase 4.5) is SSA-defined and can be safely used in exit values instead of parameters!
|
||||
Status: Historical
|
||||
@ -137,3 +137,4 @@ The original code worked but required deep knowledge to maintain. The refactorin
|
||||
**Related Files**:
|
||||
- `src/mir/builder/control_flow/joinir/merge/instruction_rewriter.rs` (refactored)
|
||||
- `docs/development/current/main/phase33-16-self-loop-fix.md` (original bug fix)
|
||||
Status: Historical
|
||||
@ -465,3 +465,4 @@ jq '.functions[0].blocks[0].instructions[0:3]' mir.json # First 3 instructions
|
||||
| 6 | ExitLineOrchestrator | carrier_phis | var_map updated | existing |
|
||||
|
||||
**Total changes**: ~6 locations, ~100 lines added/modified, 0 lines removed (backward compat)
|
||||
Status: Historical
|
||||
@ -207,3 +207,4 @@ instruction_rewriter.rs (589行)
|
||||
**Build**: Success(1m 03s)
|
||||
**Tests**: All Pass
|
||||
**Next**: Phase 33-17-B 実施検討
|
||||
Status: Historical
|
||||
@ -207,3 +207,4 @@ pub fn classify(features: &LoopFeatures) -> LoopPatternKind {
|
||||
|
||||
**作成日**: 2025-12-07
|
||||
**Phase**: 33-18 (Design Only)
|
||||
Status: Historical
|
||||
@ -140,4 +140,5 @@ LoopBuilder 完全削除後の JoinIR ループラインにおいて、
|
||||
|
||||
このフェーズで「LoopBuilder 無しの JoinIR ループ出口ラインの基礎」は固まったので、
|
||||
今後は continue 系と JsonParserBox のような実アプリ側ロジックを順番に乗せていく段階に入る。**
|
||||
Status: Historical
|
||||
|
||||
@ -384,3 +384,4 @@ sum=9, RC: 0 ✅
|
||||
- JoinIRConversionPipeline: `src/mir/builder/control_flow/joinir/patterns/conversion_pipeline.rs`
|
||||
- Phase 33-23 fix: boundary.loop_var_name setting
|
||||
- Pattern 1-4: `src/mir/builder/control_flow/joinir/patterns/pattern*.rs`
|
||||
Status: Historical
|
||||
@ -222,3 +222,4 @@ Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
||||
|
||||
**作成者**: Claude Code (Sonnet 4.5)
|
||||
**承認**: 要ユーザーレビュー
|
||||
Status: Historical
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user