YJIT: Chain guard classes on instance_of (#8209)
This commit is contained in:
parent
2a3acbc420
commit
75c9487a98
Notes:
git
2023-08-14 14:18:40 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
@ -4264,7 +4264,7 @@ fn jit_rb_kernel_is_a(
|
||||
fn jit_rb_kernel_instance_of(
|
||||
jit: &mut JITState,
|
||||
asm: &mut Assembler,
|
||||
_ocb: &mut OutlinedCb,
|
||||
ocb: &mut OutlinedCb,
|
||||
_ci: *const rb_callinfo,
|
||||
_cme: *const rb_callable_method_entry_t,
|
||||
_block: Option<BlockHandler>,
|
||||
@ -4305,7 +4305,14 @@ fn jit_rb_kernel_instance_of(
|
||||
|
||||
asm.comment("Kernel#instance_of?");
|
||||
asm.cmp(asm.stack_opnd(0), sample_rhs.into());
|
||||
asm.jne(Target::side_exit(Counter::guard_send_instance_of_class_mismatch));
|
||||
jit_chain_guard(
|
||||
JCC_JNE,
|
||||
jit,
|
||||
asm,
|
||||
ocb,
|
||||
SEND_MAX_CHAIN_DEPTH,
|
||||
Counter::guard_send_instance_of_class_mismatch,
|
||||
);
|
||||
|
||||
asm.stack_pop(2);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user