From cc1fd6490c920520436ff3bf0d9cf6b180b8a544 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 25 Sep 2025 17:05:51 -0700 Subject: ZJIT: Remove an obsoleted PC guard A little follow-up on https://github.com/ruby/ruby/pull/14653 Now that we don't generate a PC-less side exit at the entry block, we shouldn't need this guard that was added by https://github.com/ruby/ruby/pull/14643. --- zjit/src/backend/lir.rs | 9 +++------ zjit/src/hir.rs | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/zjit/src/backend/lir.rs b/zjit/src/backend/lir.rs index e931e14e8f..21adc42cd1 100644 --- a/zjit/src/backend/lir.rs +++ b/zjit/src/backend/lir.rs @@ -1607,12 +1607,9 @@ impl Assembler self.store(Opnd::mem(64, SP, (-local_size_and_idx_to_ep_offset(locals.len(), idx) - 1) * SIZEOF_VALUE_I32), opnd); } - // Avoid setting cfp->pc when exiting entry_block with optional arguments - if !pc.is_null() { - asm_comment!(self, "save cfp->pc"); - self.load_into(SCRATCH_OPND, Opnd::const_ptr(pc)); - self.store(Opnd::mem(64, CFP, RUBY_OFFSET_CFP_PC), SCRATCH_OPND); - } + asm_comment!(self, "save cfp->pc"); + self.load_into(SCRATCH_OPND, Opnd::const_ptr(pc)); + self.store(Opnd::mem(64, CFP, RUBY_OFFSET_CFP_PC), SCRATCH_OPND); asm_comment!(self, "save cfp->sp"); self.lea_into(SCRATCH_OPND, Opnd::mem(64, SP, stack.len() as i32 * SIZEOF_VALUE_I32)); diff --git a/zjit/src/hir.rs b/zjit/src/hir.rs index 63749f0991..598bcb00c4 100644 --- a/zjit/src/hir.rs +++ b/zjit/src/hir.rs @@ -3323,7 +3323,6 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result { // optimizing locals in that case because they're shared with other frames. let ep_escaped = iseq_escapes_ep(iseq); - // Compile an entry_block for the interpreter compile_entry_block(&mut fun, &jit_entry_insns); -- cgit v1.2.3