summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2025-08-18 12:59:06 -0700
committerGitHub <noreply@github.com>2025-08-18 12:59:06 -0700
commit6f472c8b61bf8bbf4c2fd3c0af9ddaf92538c94e (patch)
tree482a8082513b56d93d8a4cc773afab9238ac2384
parent0b098a93dbb9cb2112e7c0c8519e09cca4478fd0 (diff)
ZJIT: Fix BorrowError on --zjit-dump-disasm (#14267)
-rw-r--r--zjit/src/codegen.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs
index d2810cddb7..5780a26357 100644
--- a/zjit/src/codegen.rs
+++ b/zjit/src/codegen.rs
@@ -152,8 +152,9 @@ fn gen_iseq_call(cb: &mut CodeBlock, caller_iseq: IseqPtr, iseq_call: &Rc<RefCel
// Update the JIT-to-JIT call to call the stub
let stub_addr = stub_ptr.raw_ptr(cb);
+ let iseq = iseq_call.borrow().iseq;
iseq_call.borrow_mut().regenerate(cb, |asm| {
- asm_comment!(asm, "call function stub: {}", iseq_get_location(iseq_call.borrow().iseq, 0));
+ asm_comment!(asm, "call function stub: {}", iseq_get_location(iseq, 0));
asm.ccall(stub_addr, vec![]);
});
Some(())
@@ -1520,8 +1521,9 @@ fn function_stub_hit_body(cb: &mut CodeBlock, iseq_call: &Rc<RefCell<IseqCall>>)
// Update the stub to call the code pointer
let code_addr = code_ptr.raw_ptr(cb);
+ let iseq = iseq_call.borrow().iseq;
iseq_call.borrow_mut().regenerate(cb, |asm| {
- asm_comment!(asm, "call compiled function: {}", iseq_get_location(iseq_call.borrow().iseq, 0));
+ asm_comment!(asm, "call compiled function: {}", iseq_get_location(iseq, 0));
asm.ccall(code_addr, vec![]);
});