From c2677f4d0ba7ef3741020c754a498e4582cfe708 Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Wed, 23 Apr 2025 11:57:08 -0400 Subject: [PATCH] Make type_of use union-find Otherwise we might have stale types floating around --- zjit/src/hir.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs index a0ecd14411..9758731460 100644 --- a/zjit/src/hir.rs +++ b/zjit/src/hir.rs @@ -789,7 +789,7 @@ impl Function { fn type_of(&self, insn: InsnId) -> Type { assert!(self.insns[insn.0].has_output()); - self.insn_types[insn.0] + self.insn_types[self.union_find.find_const(insn).0] } /// Check if the type of `insn` is a subtype of `ty`.