Commit Graph

2 Commits

Author SHA1 Message Date
4ef5eec162 feat(mir): Phase 84-2 CopyTypePropagator for Copy chain type propagation
- Add CopyTypePropagator box (ChatGPT Pro design) for fixed-point
  Copy instruction type propagation
- Integrate into lifecycle.rs before return type inference
- Case D reduced from 12 to 9 (25% reduction)

Implementation:
- src/mir/phi_core/copy_type_propagator.rs: New box with fixed-point loop
- src/mir/phi_core/mod.rs: Add module export
- src/mir/builder/lifecycle.rs: Call propagator before return inference

Test results:
- Baseline: 494 passed, 33 failed (was 489/34)
- Case D: 9 remaining (from 12)
- Unit tests: 4/4 passed

Remaining 9 Case D breakdown:
- GroupA: Loop Edge Copy (7 cases) - PHI incoming needs Copy trace
- GroupB: Multi-level PHI (2 cases) - Recursive PHI resolution needed

Phase 84-3 will address GroupA with Edge Copy tracing in GenericTypeResolver.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 19:37:01 +09:00
0771945735 docs: Add Phase 84 Case D detailed analysis
Task先生による残り15件のCase D詳細分析レポート。

## 主要発見

**根本原因**: Const命令の型アノテーション欠如(58-67%)
- Integer/Bool/Float/Null/Void定数が型登録されていない
- String定数は既に実装済み

## 分類

- GroupA: Const命令型アノテーション欠如(14-16件、58-67%)
- GroupB: Copy命令型伝播不足(6-8件、25-33%)
- GroupC: PHI命令型推論不足(4-6件、17-25%)
- GroupD: その他の命令型(2-4件)

## Phase 84-1 推奨

`src/mir/builder/emission/constant.rs` に5行追加で90%削減可能。

## ドキュメント

- phase84-case-d-detailed-analysis.md: 全24件の詳細分析
- phase84-case-d-summary.md: エグゼクティブサマリー

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 18:37:36 +09:00