refactor(mir): Remove CoreContext legacy fields (Phase 2-2/7)

完全移行→削除の安全順序(Option C)に従い、CoreContext の
deprecated フィールドと sync helpers を完全削除。

## Changes
- Migrated all access sites to core_ctx.* (SSOT allocators)
  - utils.rs: value_gen (3 sites), block_gen (1 site), temp_slot_counter (1 site)
  - loop_api.rs: block_gen (1 site)
  - phi_helpers.rs: value_gen (1 site)
  - builder.rs: sync helpers (2 methods), test assertions (2 sites)
- Removed 5 deprecated fields from builder.rs
  - value_gen: ValueIdGenerator
  - block_gen: BasicBlockIdGenerator
  - next_binding_id: u32
  - temp_slot_counter: u32
  - debug_join_counter: u32
- Removed sync helper calls (allocate_binding_id, debug_next_join_id)
- Removed field initializations from MirBuilder::new()
- Maintained Phase 136 P0 SSOT structure (next_value_id() remains as high-level API)

## Tests
- cargo build --release: PASS
- cargo test --release --lib: 1029 passed (4 pre-existing failures)
- Deprecation warnings: 435 → 456 (+21)
  Note: Warnings increased due to remaining deprecated field *uses* being exposed
  after removing the field *definitions*. This is expected during migration.

## Code metrics
- Net reduction: 40 lines (-56 removed, +16 modifications)
- Files changed: 4 (builder.rs, utils.rs, loop_api.rs, phi_helpers.rs)

Phase 2 Progress: 2/7 contexts complete (MetadataContext , CoreContext )
This commit is contained in:
nyash-codex
2025-12-15 23:05:36 +09:00
parent a898e99310
commit 2db8ff72d0
4 changed files with 16 additions and 56 deletions

View File

@ -66,7 +66,7 @@ impl MirBuilder {
let phi_val = if let Some(ref mut f) = self.current_function {
f.next_value_id() // Function context: use local ID allocator
} else {
self.value_gen.next() // Module context: use global ID allocator
self.core_ctx.next_value() // Module context: use core_ctx SSOT
};
// 統一された挿入ロジック(既存パターンと完全互換)