Skip to content

Commit aca692c

Browse files
authored
ZJIT: Disable profiling instructions before asserting opcodes in tests (#13720)
1 parent 3d5619c commit aca692c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zjit/src/hir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3159,10 +3159,10 @@ mod tests {
31593159
#[track_caller]
31603160
fn assert_method_hir_with_opcodes(method: &str, opcodes: &[u32], hir: Expect) {
31613161
let iseq = crate::cruby::with_rubyvm(|| get_method_iseq("self", method));
3162+
unsafe { crate::cruby::rb_zjit_profile_disable(iseq) };
31623163
for &opcode in opcodes {
31633164
assert!(iseq_contains_opcode(iseq, opcode), "iseq {method} does not contain {}", insn_name(opcode as usize));
31643165
}
3165-
unsafe { crate::cruby::rb_zjit_profile_disable(iseq) };
31663166
let function = iseq_to_hir(iseq).unwrap();
31673167
assert_function_hir(function, hir);
31683168
}

0 commit comments

Comments
 (0)