diff --git a/src/mir/builder.rs b/src/mir/builder.rs index 817130fb..0b446bbd 100644 --- a/src/mir/builder.rs +++ b/src/mir/builder.rs @@ -212,10 +212,7 @@ pub struct MirBuilder { #[deprecated(note = "Use comp_ctx.reserved_value_ids instead")] pub(super) reserved_value_ids: HashSet, - /// [DEPRECATED] Phase 74: BindingId mapping for lexical variable bindings - /// Phase 136: Moved to binding_ctx.binding_map (backward compat wrapper) - #[deprecated(note = "Use binding_ctx.binding_map instead")] - pub binding_map: BTreeMap, + // Phase 2-5: binding_map removed - use binding_ctx.binding_map instead // include guards removed // フェーズM: no_phi_modeフィールド削除(常にPHI使用) @@ -321,7 +318,7 @@ impl MirBuilder { fn_body_ast: None, // Phase 200-C: Initialize to None reserved_value_ids: HashSet::new(), // Phase 201-A: Initialize to empty - binding_map: BTreeMap::new(), // Phase 74: Initialize BindingId mapping + // Phase 2-5: binding_map initialization removed // フェーズM: no_phi_modeフィールド削除 return_defer_active: false, @@ -344,18 +341,7 @@ impl MirBuilder { } } - // ---- Phase 136 Step 4/7: BindingContext synchronization helpers ---- - /// Sync binding_ctx changes back to legacy fields (backward compatibility) - #[allow(deprecated)] - fn sync_binding_ctx_to_legacy(&mut self) { - self.binding_map = self.binding_ctx.binding_map.clone(); - } - - /// Sync legacy field changes to binding_ctx (backward compatibility) - #[allow(deprecated)] - fn sync_legacy_to_binding_ctx(&mut self) { - self.binding_ctx.binding_map = self.binding_map.clone(); - } + // Phase 2-5: BindingContext sync helpers removed - binding_ctx is now SSOT /// Phase 136 Step 5/7: Sync variable_ctx changes back to legacy field (backward compatibility) #[allow(deprecated)] diff --git a/src/mir/builder/vars/lexical_scope.rs b/src/mir/builder/vars/lexical_scope.rs index fb61ac38..21baa9cf 100644 --- a/src/mir/builder/vars/lexical_scope.rs +++ b/src/mir/builder/vars/lexical_scope.rs @@ -69,7 +69,7 @@ impl super::super::MirBuilder { } // Phase 74: Restore BindingId mappings in parallel - // Phase 136 Step 4/7: Update binding_ctx (SSOT) then sync to legacy field + // Phase 2-5: Update binding_ctx (SSOT) - legacy field removed for (name, previous_binding) in frame.restore_binding { match previous_binding { Some(prev_bid) => { @@ -80,7 +80,6 @@ impl super::super::MirBuilder { } } } - self.sync_binding_ctx_to_legacy(); } #[allow(deprecated)] @@ -112,9 +111,8 @@ impl super::super::MirBuilder { // Phase 74: Allocate and register new BindingId for this binding let binding_id = self.allocate_binding_id(); - // Phase 136 Step 4/7: Update binding_ctx (SSOT) then sync to legacy field + // Phase 2-5: Update binding_ctx (SSOT) - legacy field removed self.binding_ctx.insert(name.to_string(), binding_id); - self.sync_binding_ctx_to_legacy(); Ok(()) }