feat(naming): Phase 21.7++ Phase 1 完全達成 - StaticMethodId SSOT 基盤確立
## 🎉 成果概要 **Phase 1: 基盤整備** - NamingBox SSOT の構造化された基盤完成! ### ✅ 実装完了項目(全5タスク) 1. **StaticMethodId 構造体導入** (src/mir/naming.rs:86-248) - 構造化された関数名表現: box_name, method, arity - Optional arity でパース柔軟性確保 2. **ヘルパー関数追加** - `parse()`: "Box.method/N" or "Box.method" をパース - `format()`: 構造化 ID → 文字列変換 - `with_arity()`: arity 補完用ビルダー - 互換性エイリアス: parse_global_name(), format_global_name() 3. **包括的テスト追加** (src/tests/namingbox_static_method_id.rs) - 13 テストケース全通過 ✅ - arity 有り/無し、normalize、format、round-trip、エラー処理 - エッジケース: 複数ドット、大きな arity、不正入力 4. **テスト登録** (src/tests/mod.rs:21) - Phase 21.7++ コメント付きで登録 5. **動作確認** - `cargo test --release --lib namingbox_static_method_id` - 全 13 テスト PASS (0.00s) ### 📊 技術的効果 - **SSOT 確立**: 関数名パース/フォーマットを 1 箇所に集約 - **型安全**: 構造化表現で誤用防止 - **テスト保証**: 13 ケースで安全性確保 - **後方互換**: エイリアス関数で段階移行可能 ### 🎯 Phase 2 への準備完了 - VM 側の関数ルックアップを StaticMethodId ベース化 - arity バグ根治への基盤確立 --- **Phase 0**: ✅ 完了 (Silent Failure 根絶) **Phase 1**: ✅ 完了 (SSOT 基盤確立) **Phase 2**: 次のタスク (VM 統一) 🧮 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -18,6 +18,7 @@ pub mod mir_stage1_cli_emit_program_min;
|
||||
pub mod mir_stage1_staticcompiler_receiver; // Phase 25.1: StaticCompiler receiver型推論バグ回帰防止
|
||||
pub mod mir_stage1_using_resolver_verify;
|
||||
pub mod json_lint_stringutils_min_vm; // Phase 21.7++: using StringUtils alias resolution fix
|
||||
pub mod namingbox_static_method_id; // Phase 21.7++ Phase 1: StaticMethodId structure tests
|
||||
pub mod stage1_cli_entry_ssa_smoke;
|
||||
pub mod mir_stageb_like_args_length;
|
||||
pub mod mir_stageb_loop_break_continue;
|
||||
|
||||
Reference in New Issue
Block a user