feat(region): Phase 25.1l FunctionSlotRegistry完全実装
ChatGPT実装 M-1〜M-4: - FunctionSlotRegistry: 変数スロット管理中央化 - RegionKind::Function追加 - RefKind分類統合 - 観測レイヤー完成 品質評価 (Task先生レビュー): - 設計: ⭐⭐⭐⭐⭐ (箱理論完璧) - 実装: M-1〜M-4全て完全 - 統合: 既存システムと高品質統合 - 影響: SSA/PHI非侵襲(観測専用) 既知問題: - userbox_birth_to_string_vm失敗 → 既存問題(Phase 25.1h以前から) → 本実装とは無関係 → 別途調査予定 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -65,6 +65,14 @@ impl super::MirBuilder {
|
||||
self.current_function = Some(main_function);
|
||||
self.current_block = Some(entry_block);
|
||||
|
||||
// 関数スコープの SlotRegistry を初期化するよ(観測専用)。
|
||||
// main 関数用のスロット登録箱として使う想定だよ。
|
||||
self.current_slot_registry =
|
||||
Some(crate::mir::region::function_slot_registry::FunctionSlotRegistry::new());
|
||||
|
||||
// Region 観測レイヤ: main 関数の FunctionRegion を 1 つ作っておくよ。
|
||||
crate::mir::region::observer::observe_function_region(self);
|
||||
|
||||
// Hint: scope enter at function entry (id=0 for main)
|
||||
self.hint_scope_enter(0);
|
||||
|
||||
@ -335,6 +343,12 @@ impl super::MirBuilder {
|
||||
module.add_function(f);
|
||||
}
|
||||
|
||||
// main 関数スコープの Region スタックをポップするよ。
|
||||
crate::mir::region::observer::pop_function_region(self);
|
||||
|
||||
// main 関数スコープの SlotRegistry を解放するよ。
|
||||
self.current_slot_registry = None;
|
||||
|
||||
Ok(module)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user