From e16c64f6ae64b28e985f9efa6dd3c1ba771f3d5f Mon Sep 17 00:00:00 2001 From: Moe Charm Date: Tue, 26 Aug 2025 06:38:15 +0900 Subject: [PATCH] Cleanup: remove remaining cfg gating for mir_typeop_poc in builder binary-op compare pre-cast - Always use TypeOp(Cast) for IntegerBox pre-normalization path. - All tests remain green (179). --- src/mir/builder.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/mir/builder.rs b/src/mir/builder.rs index 6e37caf8..b4df8154 100644 --- a/src/mir/builder.rs +++ b/src/mir/builder.rs @@ -490,16 +490,8 @@ impl MirBuilder { && self.value_origin_newbox.get(&rhs).map(|s| s == "IntegerBox").unwrap_or(false) { let li = self.value_gen.next(); let ri = self.value_gen.next(); - #[cfg(feature = "mir_typeop_poc")] - { - self.emit_instruction(MirInstruction::TypeOp { dst: li, op: super::TypeOpKind::Cast, value: lhs, ty: MirType::Integer })?; - self.emit_instruction(MirInstruction::TypeOp { dst: ri, op: super::TypeOpKind::Cast, value: rhs, ty: MirType::Integer })?; - } - #[cfg(not(feature = "mir_typeop_poc"))] - { - self.emit_instruction(MirInstruction::Cast { dst: li, value: lhs, target_type: MirType::Integer })?; - self.emit_instruction(MirInstruction::Cast { dst: ri, value: rhs, target_type: MirType::Integer })?; - } + self.emit_instruction(MirInstruction::TypeOp { dst: li, op: super::TypeOpKind::Cast, value: lhs, ty: MirType::Integer })?; + self.emit_instruction(MirInstruction::TypeOp { dst: ri, op: super::TypeOpKind::Cast, value: rhs, ty: MirType::Integer })?; (li, ri) } else { (lhs, rhs) }; self.emit_instruction(MirInstruction::Compare { dst, op, lhs: lhs2, rhs: rhs2 })?;