Files
hakorune/docs/development
nyash-codex 076f193f76 refactor(mir): Extract TypeContext from MirBuilder (Phase 136 follow-up 1/7)
## Summary
Extract type-related fields into dedicated TypeContext for better code
organization and maintainability. First step of 7-context refactoring plan.

## Changes
- **New**: src/mir/builder/type_context.rs
  - Consolidates value_types, value_kinds, value_origin_newbox
  - Provides clean API for type operations
  - BTreeMap/HashMap as appropriate for determinism

- **Modified**: src/mir/builder.rs
  - Add type_ctx field to MirBuilder
  - Deprecate old fields (backward compat)
  - Add sync helpers for gradual migration
  - Initialize type_ctx in new()

- **Doc**: phase-136-context-box-progress.md
  - Track refactoring progress (1/7 complete)
  - Document design principles
  - Plan next steps (CoreContext)

## Impact
- 16 files with 113 deprecated field usages
- No breaking changes (gradual migration)
- All tests pass (997/997)

## Test Results
 cargo build --release (warnings only)
 cargo test --release --lib (997 passed)
 phase135_trim_mir_verify.sh (PASS)
 phase132_exit_phi_parity.sh (3/3 PASS)

## Next Step
CoreContext extraction (ValueId/BlockId generators)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 19:59:55 +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/を参照してください。