зеркало из https://github.com/github/ruby.git
YJIT: Chain guard method IDs for respond_to? (#8196)
This commit is contained in:
Родитель
493acaf4d4
Коммит
1ccd0eae11
|
@ -1958,7 +1958,8 @@ fn jit_chain_guard(
|
|||
};
|
||||
|
||||
if (asm.ctx.get_chain_depth() as i32) < depth_limit {
|
||||
let mut deeper = asm.ctx.clone();
|
||||
// Rewind Context to use the stack_size at the beginning of this instruction.
|
||||
let mut deeper = asm.ctx.with_stack_size(jit.stack_size_for_pc);
|
||||
deeper.increment_chain_depth();
|
||||
let bid = BlockId {
|
||||
iseq: jit.iseq,
|
||||
|
@ -4833,7 +4834,14 @@ fn jit_obj_respond_to(
|
|||
// This is necessary because we have no guarantee that sym_opnd is a constant
|
||||
asm.comment("guard known mid");
|
||||
asm.cmp(sym_opnd, mid_sym.into());
|
||||
asm.jne(Target::side_exit(Counter::guard_send_mid_mismatch));
|
||||
jit_chain_guard(
|
||||
JCC_JNE,
|
||||
jit,
|
||||
asm,
|
||||
ocb,
|
||||
SEND_MAX_CHAIN_DEPTH,
|
||||
Counter::guard_send_respond_to_mid_mismatch,
|
||||
);
|
||||
|
||||
jit_putobject(asm, result);
|
||||
|
||||
|
|
|
@ -310,7 +310,7 @@ make_counters! {
|
|||
guard_send_interrupted,
|
||||
guard_send_not_fixnums,
|
||||
guard_send_not_string,
|
||||
guard_send_mid_mismatch,
|
||||
guard_send_respond_to_mid_mismatch,
|
||||
|
||||
guard_invokesuper_me_changed,
|
||||
guard_invokesuper_block_given,
|
||||
|
|
Загрузка…
Ссылка в новой задаче