Skip to content

Commit 5139ab4

Browse files
committed
ZJIT: Decode bare opcodes in locals_written_in_block
1 parent 9309f14 commit 5139ab4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

zjit/src/hir.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6267,7 +6267,8 @@ fn locals_written_in_block(parent_iseq: IseqPtr, blockiseq: IseqPtr, target_dept
62676267

62686268
while insn_idx < iseq_size {
62696269
let pc = unsafe { rb_iseq_pc_at_idx(blockiseq, insn_idx) };
6270-
let opcode = unsafe { rb_iseq_opcode_at_pc(blockiseq, pc) } as u32;
6270+
// Use rb_vm_insn_decode to get the bare opcode, stripping zjit/trace specializations.
6271+
let opcode = unsafe { rb_vm_insn_decode(*pc) } as u32;
62716272

62726273
match opcode {
62736274
YARVINSN_setlocal | YARVINSN_setblockparam

0 commit comments

Comments
 (0)