aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ruby_vm
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2023-04-12 16:32:07 -0700
committerJohn Hawthorn <john@hawthorn.email>2023-04-12 17:48:34 -0700
commitbe08e1b14c25979f8727edde70b37fc48b808cac (patch)
tree815430b55e3c589d4e91b1ca6ef63cca07e397da /lib/ruby_vm
parent0ce2bdc76dd17aa3d42a352a6244c87a51e7606d (diff)
downloadruby-be08e1b14c25979f8727edde70b37fc48b808cac.tar.gz
RJIT: argc check in known cfuncs
Diffstat (limited to 'lib/ruby_vm')
-rw-r--r--lib/ruby_vm/rjit/insn_compiler.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ruby_vm/rjit/insn_compiler.rb b/lib/ruby_vm/rjit/insn_compiler.rb
index 906743ae0f..1788b20c3a 100644
--- a/lib/ruby_vm/rjit/insn_compiler.rb
+++ b/lib/ruby_vm/rjit/insn_compiler.rb
@@ -4937,7 +4937,7 @@ module RubyVM::RJIT
end
# Delegate to codegen for C methods if we have it.
- if kw_arg.nil? && flags & C::VM_CALL_OPT_SEND == 0
+ if kw_arg.nil? && flags & C::VM_CALL_OPT_SEND == 0 && flags & C::VM_CALL_ARGS_SPLAT == 0 && (cfunc_argc == -1 || argc == cfunc_argc)
known_cfunc_codegen = lookup_cfunc_codegen(cme.def)
if known_cfunc_codegen&.call(jit, ctx, asm, argc, known_recv_class)
# cfunc codegen generated code. Terminate the block so