ZJIT: Temporarily revert path compression
authorMax Bernstein <[email protected]>
Thu, 8 May 2025 12:22:44 +0000 (8 08:22 -0400)
committerGitHub <[email protected]>
Thu, 8 May 2025 12:22:44 +0000 (8 21:22 +0900)
For reasons I don't understand yet, this causes an issue when trying to
boot yjit-bench. Temporarily revert it.

zjit/src/hir.rs

index 72cd855..c0ba168 100644 (file)
@@ -752,7 +752,9 @@ impl Function {
         macro_rules! find {
             ( $x:expr ) => {
                 {
-                    self.union_find.borrow_mut().find($x)
+                    // TODO(max): Figure out why borrow_mut().find() causes `already borrowed:
+                    // BorrowMutError`
+                    self.union_find.borrow().find_const($x)
                 }
             };
         }
@@ -773,7 +775,7 @@ impl Function {
                 }
             };
         }
-        let insn_id = self.union_find.borrow_mut().find(insn_id);
+        let insn_id = find!(insn_id);
         use Insn::*;
         match &self.insns[insn_id.0] {
             result@(PutSelf | Const {..} | Param {..} | GetConstantPath {..}