Skip to content

Commit cc1fd64

Browse files
committed
ZJIT: Remove an obsoleted PC guard
A little follow-up on #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 #14643.
1 parent 61a0de1 commit cc1fd64

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

zjit/src/backend/lir.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,12 +1607,9 @@ impl Assembler
16071607
self.store(Opnd::mem(64, SP, (-local_size_and_idx_to_ep_offset(locals.len(), idx) - 1) * SIZEOF_VALUE_I32), opnd);
16081608
}
16091609

1610-
// Avoid setting cfp->pc when exiting entry_block with optional arguments
1611-
if !pc.is_null() {
1612-
asm_comment!(self, "save cfp->pc");
1613-
self.load_into(SCRATCH_OPND, Opnd::const_ptr(pc));
1614-
self.store(Opnd::mem(64, CFP, RUBY_OFFSET_CFP_PC), SCRATCH_OPND);
1615-
}
1610+
asm_comment!(self, "save cfp->pc");
1611+
self.load_into(SCRATCH_OPND, Opnd::const_ptr(pc));
1612+
self.store(Opnd::mem(64, CFP, RUBY_OFFSET_CFP_PC), SCRATCH_OPND);
16161613

16171614
asm_comment!(self, "save cfp->sp");
16181615
self.lea_into(SCRATCH_OPND, Opnd::mem(64, SP, stack.len() as i32 * SIZEOF_VALUE_I32));

zjit/src/hir.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3323,7 +3323,6 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
33233323
// optimizing locals in that case because they're shared with other frames.
33243324
let ep_escaped = iseq_escapes_ep(iseq);
33253325

3326-
33273326
// Compile an entry_block for the interpreter
33283327
compile_entry_block(&mut fun, &jit_entry_insns);
33293328

0 commit comments

Comments
 (0)