зеркало из https://github.com/github/ruby.git
Increase max depth for chain guards
This commit is contained in:
Родитель
487d4aa970
Коммит
42adcd5743
|
@ -1649,7 +1649,7 @@ module RubyVM::MJIT
|
|||
# @param jit [RubyVM::MJIT::JITState]
|
||||
# @param ctx [RubyVM::MJIT::Context]
|
||||
# @param asm [RubyVM::MJIT::Assembler]
|
||||
def jit_chain_guard(opcode, jit, ctx, asm, side_exit, limit: 10)
|
||||
def jit_chain_guard(opcode, jit, ctx, asm, side_exit, limit: 20)
|
||||
opcode => :je | :jne | :jnz | :jz
|
||||
|
||||
if ctx.chain_depth < limit
|
||||
|
@ -2572,12 +2572,13 @@ module RubyVM::MJIT
|
|||
end
|
||||
|
||||
asm.comment("Guard #{comptime_symbol.inspect} is on stack")
|
||||
mid_changed_exit = counted_exit(side_exit(jit, ctx), :send_optimized_send_mid_changed)
|
||||
jit_guard_known_klass(jit, ctx, asm, comptime_symbol.class, ctx.stack_opnd(argc), comptime_symbol, mid_changed_exit)
|
||||
class_changed_exit = counted_exit(side_exit(jit, ctx), :send_optimized_send_mid_class_changed)
|
||||
jit_guard_known_klass(jit, ctx, asm, comptime_symbol.class, ctx.stack_opnd(argc), comptime_symbol, class_changed_exit)
|
||||
asm.mov(C_ARGS[0], ctx.stack_opnd(argc))
|
||||
asm.call(C.rb_get_symbol_id)
|
||||
asm.cmp(C_RET, mid)
|
||||
jit_chain_guard(:jne, jit, ctx, asm, mid_changed_exit)
|
||||
id_changed_exit = counted_exit(side_exit(jit, ctx), :send_optimized_send_mid_id_changed)
|
||||
jit_chain_guard(:jne, jit, ctx, asm, id_changed_exit)
|
||||
|
||||
# rb_callable_method_entry_with_refinements
|
||||
cme = jit_search_method(jit, ctx, asm, mid, argc, flags, send_shift:)
|
||||
|
|
3
mjit_c.h
3
mjit_c.h
|
@ -157,7 +157,8 @@ MJIT_RUNTIME_COUNTERS(
|
|||
|
||||
send_optimized_send_no_args,
|
||||
send_optimized_send_not_sym_or_str,
|
||||
send_optimized_send_mid_changed,
|
||||
send_optimized_send_mid_class_changed,
|
||||
send_optimized_send_mid_id_changed,
|
||||
send_optimized_send_null_mid,
|
||||
send_optimized_send_send,
|
||||
|
||||
|
|
|
@ -1297,7 +1297,8 @@ module RubyVM::MJIT # :nodoc: all
|
|||
send_optimized_unknown_type: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_optimized_unknown_type)")],
|
||||
send_optimized_send_no_args: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_optimized_send_no_args)")],
|
||||
send_optimized_send_not_sym_or_str: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_optimized_send_not_sym_or_str)")],
|
||||
send_optimized_send_mid_changed: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_optimized_send_mid_changed)")],
|
||||
send_optimized_send_mid_class_changed: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_optimized_send_mid_class_changed)")],
|
||||
send_optimized_send_mid_id_changed: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_optimized_send_mid_id_changed)")],
|
||||
send_optimized_send_null_mid: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_optimized_send_null_mid)")],
|
||||
send_optimized_send_send: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_optimized_send_send)")],
|
||||
invokesuper_me_changed: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), invokesuper_me_changed)")],
|
||||
|
|
Загрузка…
Ссылка в новой задаче