diff --git a/lib/ruby_vm/mjit/insn_compiler.rb b/lib/ruby_vm/mjit/insn_compiler.rb index dabc0b385c..04f1a349c7 100644 --- a/lib/ruby_vm/mjit/insn_compiler.rb +++ b/lib/ruby_vm/mjit/insn_compiler.rb @@ -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) diff --git a/mjit_c.h b/mjit_c.h index 668920e3fb..c07b7bc6ec 100644 --- a/mjit_c.h +++ b/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, diff --git a/mjit_c.rb b/mjit_c.rb index 1de0887aa3..a5c4878779 100644 --- a/mjit_c.rb +++ b/mjit_c.rb @@ -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)")],