зеркало из https://github.com/github/ruby.git
Side-exit on cfunc with -2 argc
This commit is contained in:
Родитель
4d97f9319c
Коммит
4271927d61
|
@ -1731,6 +1731,10 @@ module RubyVM::MJIT
|
|||
asm.incr_counter(:send_arity)
|
||||
return CantCompile
|
||||
end
|
||||
if cfunc.argc == -2
|
||||
asm.incr_counter(:send_cfunc_ruby_array_varg)
|
||||
return CantCompile
|
||||
end
|
||||
|
||||
# Check interrupts before SP motion to safely side-exit with the original SP.
|
||||
jit_check_ints(jit, ctx, asm)
|
||||
|
|
1
mjit_c.h
1
mjit_c.h
|
@ -135,6 +135,7 @@ MJIT_RUNTIME_COUNTERS(
|
|||
|
||||
send_cfunc_variadic,
|
||||
send_cfunc_too_many_args,
|
||||
send_cfunc_ruby_array_varg,
|
||||
|
||||
send_ivar,
|
||||
send_ivar_splat,
|
||||
|
|
|
@ -1061,6 +1061,7 @@ module RubyVM::MJIT # :nodoc: all
|
|||
send_iseq_kw_splat: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_iseq_kw_splat)")],
|
||||
send_cfunc_variadic: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_cfunc_variadic)")],
|
||||
send_cfunc_too_many_args: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_cfunc_too_many_args)")],
|
||||
send_cfunc_ruby_array_varg: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_cfunc_ruby_array_varg)")],
|
||||
send_ivar: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_ivar)")],
|
||||
send_ivar_splat: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_ivar_splat)")],
|
||||
send_ivar_opt_send: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_mjit_runtime_counters *)NULL)), send_ivar_opt_send)")],
|
||||
|
|
Загрузка…
Ссылка в новой задаче