Files
hakorune/docs/development
nyash-codex 23ebb86e6e docs(joinir): Phase 47 - Normalized P3 (If-Sum) design
Complete design for extending Normalized JoinIR to Pattern3 (if-sum) loops,
reusing 90% of existing P2 infrastructure.

Key insight: P3 already uses P2's Structured JoinIR foundation (Phase 220
ConditionEnv integration), so Normalized extension is straightforward.

Design documents:
- phase47-norm-p3-design.md: Complete P3 Normalized design
  - Infrastructure reuse analysis (ConditionEnv, CarrierInfo, ExitLine)
  - Representative loops identified (phase212_if_sum_min primary target)
  - StepScheduleBox extension (IfCond, ThenUpdates, ElseUpdates)
  - JpInst reuse (If instruction already exists)
  - Implementation strategy (dev-only → canonical)
  - File impact estimate (~365 lines, pure additive)

- phase47-test-files-inventory.md: P3 test file catalog
  - 3 P3 test files analyzed
  - phase212_if_sum_min.hako: Single carrier (PRIMARY)
  - phase217_if_sum_multi_min.hako: Multi-carrier (sum + count)
  - phase218_json_if_sum_min.hako: Variable accumulation (sum + i)

Architecture:
- Unified Normalized for P1/P2/P3 (same pipeline)
- Conditional updates only difference vs P2
- No P2 code changes needed (pure additive)

Benefits:
- 90% infrastructure reuse from P2
- Proven incremental rollout (dev → canonical)
- Clear path to P4 (continue pattern)

Implementation roadmap:
- Phase 47-A: Minimal sum_count (dev-only)
- Phase 47-B: array_filter (body-local + method calls)
- Phase 47-C: Canonical promotion

Updates:
- joinir-architecture-overview.md: Added Phase 47 section
- CURRENT_TASK.md: Updated Phase 47 entry (Design Complete)

Status: Design phase complete, ready for implementation
2025-12-12 04:50:26 +09:00
..

Nyash Development Documentation 🔧

開発者向けの進行中タスクと開発計画ドキュメントです。

📂 ディレクトリ構造

current/

  • CURRENT_TASK.md - 現在進行中のタスク
  • アクティブな開発作業の詳細
  • 最新の実装状況

roadmap/

  • phases/ - フェーズ別開発計画
    • phase-8/ - AST→MIR変換
    • phase-9/ - VM/JIT実装
    • phase-10/ - AOT最適化
  • native-plan/ - ネイティブビルド計画
    • 実行バックエンド統合
    • パフォーマンス目標

proposals/

  • RFCRequest for Comments
  • 新機能提案
  • 設計ディスカッション

🎯 重要な参照先

  • 進行状況: current/CURRENT_TASK.md
  • 開発計画: roadmap/phases/
  • 技術提案: proposals/
  • ドキュメントのステータス/入口ポリシー: doc-status-policy.md
  • JoinIR / Selfhost の入口: current/main/01-JoinIR-Selfhost-INDEX.md

📝 注意事項

このディレクトリの内容は開発中であり、頻繁に変更されます。 安定した仕様はreference/を参照してください。