refactor(mir): Phase 139-P3-B - RoutingDecision を enum 対応 + レガシー削除
- RoutingDecision の missing_caps を Vec<CapabilityTag> に変更(型安全化) - error_tags は to_tag() メソッドで自動生成 - 全 callsite を enum variant に修正 - capability_tags モジュール(文字列定数群)を完全削除 - 全テスト PASS(型安全性向上を確認) - フォーマット適用
This commit is contained in:
@ -192,7 +192,11 @@ impl<'env, 'builder, S: ScopeManager> ExprLowerer<'env, 'builder, S> {
|
||||
// 2. Build ConditionEnv from ScopeManager
|
||||
// Phase 79-1: Use BindingId-aware version when available
|
||||
#[cfg(feature = "normalized_dev")]
|
||||
let condition_env = scope_resolution::build_condition_env_from_scope_with_binding(self.scope, ast, self.builder)?;
|
||||
let condition_env = scope_resolution::build_condition_env_from_scope_with_binding(
|
||||
self.scope,
|
||||
ast,
|
||||
self.builder,
|
||||
)?;
|
||||
|
||||
#[cfg(not(feature = "normalized_dev"))]
|
||||
let condition_env = scope_resolution::build_condition_env_from_scope(self.scope, ast)?;
|
||||
@ -279,13 +283,17 @@ impl<'env, 'builder, S: ScopeManager> ConditionLoweringBox<S> for ExprLowerer<'e
|
||||
|
||||
// Build ConditionEnv from the provided scope (the caller controls the scope + allocator).
|
||||
#[cfg(feature = "normalized_dev")]
|
||||
let condition_env =
|
||||
scope_resolution::build_condition_env_from_scope_with_binding(context.scope, condition, self.builder)
|
||||
.map_err(|e| e.to_string())?;
|
||||
let condition_env = scope_resolution::build_condition_env_from_scope_with_binding(
|
||||
context.scope,
|
||||
condition,
|
||||
self.builder,
|
||||
)
|
||||
.map_err(|e| e.to_string())?;
|
||||
|
||||
#[cfg(not(feature = "normalized_dev"))]
|
||||
let condition_env = scope_resolution::build_condition_env_from_scope(context.scope, condition)
|
||||
.map_err(|e| e.to_string())?;
|
||||
let condition_env =
|
||||
scope_resolution::build_condition_env_from_scope(context.scope, condition)
|
||||
.map_err(|e| e.to_string())?;
|
||||
|
||||
// Delegate to the well-tested lowerer, but use the caller-provided allocator (SSOT).
|
||||
let (result_value, instructions) =
|
||||
@ -347,7 +355,7 @@ mod tests {
|
||||
carriers: vec![],
|
||||
trim_helper: None,
|
||||
promoted_loopbodylocals: vec![],
|
||||
#[cfg(feature = "normalized_dev")]
|
||||
#[cfg(feature = "normalized_dev")]
|
||||
promoted_bindings: std::collections::BTreeMap::new(),
|
||||
};
|
||||
|
||||
@ -393,7 +401,7 @@ mod tests {
|
||||
carriers: vec![],
|
||||
trim_helper: None,
|
||||
promoted_loopbodylocals: vec![],
|
||||
#[cfg(feature = "normalized_dev")]
|
||||
#[cfg(feature = "normalized_dev")]
|
||||
promoted_bindings: std::collections::BTreeMap::new(),
|
||||
};
|
||||
|
||||
@ -439,7 +447,7 @@ mod tests {
|
||||
carriers: vec![],
|
||||
trim_helper: None,
|
||||
promoted_loopbodylocals: vec![],
|
||||
#[cfg(feature = "normalized_dev")]
|
||||
#[cfg(feature = "normalized_dev")]
|
||||
promoted_bindings: std::collections::BTreeMap::new(),
|
||||
};
|
||||
|
||||
@ -521,7 +529,7 @@ mod tests {
|
||||
carriers: vec![],
|
||||
trim_helper: None,
|
||||
promoted_loopbodylocals: vec![],
|
||||
#[cfg(feature = "normalized_dev")]
|
||||
#[cfg(feature = "normalized_dev")]
|
||||
promoted_bindings: std::collections::BTreeMap::new(),
|
||||
};
|
||||
let boxed_carrier: Box<CarrierInfo> = Box::new(carrier_info);
|
||||
@ -550,7 +558,7 @@ mod tests {
|
||||
carriers: vec![],
|
||||
trim_helper: None,
|
||||
promoted_loopbodylocals: vec![],
|
||||
#[cfg(feature = "normalized_dev")]
|
||||
#[cfg(feature = "normalized_dev")]
|
||||
promoted_bindings: std::collections::BTreeMap::new(),
|
||||
};
|
||||
let boxed_carrier: Box<CarrierInfo> = Box::new(carrier_info);
|
||||
@ -701,7 +709,7 @@ mod tests {
|
||||
carriers: vec![],
|
||||
trim_helper: None,
|
||||
promoted_loopbodylocals: vec![],
|
||||
#[cfg(feature = "normalized_dev")]
|
||||
#[cfg(feature = "normalized_dev")]
|
||||
promoted_bindings: std::collections::BTreeMap::new(),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user