Files
hakorune/commit_message.txt
Selfhosting Dev 868519c691 cleanup: MIRレガシーコード71行削除でJSON作業準備完了
Phase 15.5準備として、MIRコードベースの大規模クリーンアップを実施。
JSON centralization作業前の環境整備が完了しました。

削除内容(71行):
- コメントアウトされたimport文: 2行
- 不要なlegacy/removedコメント: 9行
- movedコメント大規模整理: 56行
- 開発用debugコード(eprintln!): 4行

安全性確認:
- 統一Call実装(NYASH_MIR_UNIFIED_CALL=1): 正常動作
- Legacy実装(NYASH_MIR_UNIFIED_CALL=0): 後方互換性維持
- JSON出力: mir_call形式で正常生成

Phase 15(80k→20k行削減)への貢献: 約0.09%

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 04:09:23 +09:00

37 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

feat: MIR Call命令統一Phase 3.3完了 - BoxCall統一実装
## 実装内容
- emit_box_or_plugin_call関数に統一Call対応を追加
- NYASH_MIR_UNIFIED_CALL=1で段階的移行可能
- BoxCallをCallTarget::Methodとして統一Call化
## 技術詳細
- src/mir/builder/utils.rs: emit_box_or_plugin_call修正
- Box型推論ロジックを追加value_origin_newbox/value_types参照
- emit_unified_callメソッドを使用してMethod呼び出しを生成
- 環境変数による新旧実装の切り替え機能実装
## MIR出力の変化
Before (BoxCall命令):
```
call %1.upper()
call %3.push(%4)
```
After (統一Call命令):
```
call_method StringBox.upper() [recv: %1]
call_method ArrayBox.push(%4) [recv: %3]
```
## Phase 3進捗
- Phase 3.1: ✅ indirect call統一
- Phase 3.2: ✅ print/基本関数統一
- Phase 3.3: ✅ BoxCall統一本コミット
- Phase 3.4: 次ステップPython LLVM統一
ChatGPT5 Pro A++設計による段階的移行戦略の一環として実装。
後方互換性を保ちながら、26%のコード削減を目指す。
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>