feat(joinir): Phase 65-3 lifecycle.rs P3-A/P3-B統合

Phase 65-3 完了:lifecycle.rs で P1/P2/P3-A/P3-B 統一処理

## 実装内容

### 1. is_type_hint_target() 拡張
- **P3-A 追加**: `read_quoted*` で StringBox メソッド対応(P2 と重複)
  - substring/length 型ヒントが P2 経路で既にカバー済み
- **P3-B 追加**: `NewBoxTest.*` で NewBox コンストラクタ対応
  - ArrayBox/StringBox/MapBox 等の型ヒント対応

### 2. P1/P2/P3-A/P3-B 統一経路確認
- すべて同じ経路で `get_phi_type_hint()` → `infer_type_from_phi_with_hint()` 通過
- 段階的拡大のため関数名フィルタで制御(箱理論)

## テスト状況
-  ビルド: 0 エラー
-  P3-B A/B テスト: Phase 65-4 で追加予定

## 次のステップ
- Phase 65-4: 削除条件 5/5 達成確認(P3-B テスト追加)

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-11-30 06:21:07 +09:00
parent 6a05243f10
commit 47715d3615
2 changed files with 13 additions and 3 deletions

View File

@ -279,7 +279,7 @@
- **P1/P2 両方で JoinIR 型ヒント → lifecycle.rs → 型推論の経路確立**
- `is_type_hint_target()` で関数名フィルタを箱化
- 箱理論「まず箱に切り出す」原則の実践
- 次のステップ: Phase 65 で P3 ケース実装、削除条件 5/5 達成へ
- 次のステップ: Phase 65 で P3-A/B ケース実装Method/Box 戻り値、P3-C は Phase 66+ に分離
---

View File

@ -61,7 +61,7 @@ fn get_phi_type_hint(
None
}
/// Phase 64-3: P1/P2 型ヒント対象判定
/// Phase 65-3: P1/P2/P3-A/P3-B 型ヒント対象判定
///
/// 関数名が型ヒント使用対象かどうかを判定する。
/// 箱理論: 段階的拡大のため、関数名フィルタで制御
@ -72,6 +72,12 @@ fn get_phi_type_hint(
/// # P2 対象Phase 64-3 追加)
/// - `IfMergeTest.*` - If Merge パターンのテスト関数
/// - `read_quoted*` - selfhost の read_quoted 系関数
///
/// # P3-A 対象Phase 65-3 追加)
/// - `read_quoted*` - StringBox メソッド (substring/length) 使用P2 と重複)
///
/// # P3-B 対象Phase 65-3 追加)
/// - `NewBoxTest.*` - NewBox コンストラクタテスト関数
fn is_type_hint_target(func_name: &str) -> bool {
// P1: If Select テスト関数
if func_name.starts_with("IfSelectTest.") {
@ -81,10 +87,14 @@ fn is_type_hint_target(func_name: &str) -> bool {
if func_name.starts_with("IfMergeTest.") {
return true;
}
// P2: selfhost read_quoted 系関数
// P2/P3-A: selfhost read_quoted 系関数StringBox メソッドも含む)
if func_name.contains("read_quoted") {
return true;
}
// P3-B: NewBox コンストラクタテスト関数
if func_name.starts_with("NewBoxTest.") {
return true;
}
false
}