diff options
author | John Hawthorn <[email protected]> | 2021-09-04 01:35:22 -0700 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:39 -0400 |
commit | ce02aefabbc4536e3b7f8b13e4c9dc1ac3d258b4 (patch) | |
tree | 26e51bdd19910af2f84bd625aa209c7678b08a31 /yjit_codegen.c | |
parent | 922aed92b5e4602571d191e62904304458c9998d (diff) |
Allow calling variadic cfuncs with many args
We have a check to ensure we don't have to push args on the stack to
call a cfunc with many args. However we never need to use the stack for
variadic cfuncs, so we shouldn't care about the number of arguments.
Diffstat (limited to 'yjit_codegen.c')
-rw-r--r-- | yjit_codegen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yjit_codegen.c b/yjit_codegen.c index 77a0e02de4..d75a4bd20c 100644 --- a/yjit_codegen.c +++ b/yjit_codegen.c @@ -2864,7 +2864,7 @@ gen_send_cfunc(jitstate_t *jit, ctx_t *ctx, const struct rb_callinfo *ci, const } // Don't JIT functions that need C stack arguments for now - if (argc + 1 > NUM_C_ARG_REGS) { + if (cfunc->argc >= 0 && argc + 1 > NUM_C_ARG_REGS) { GEN_COUNTER_INC(cb, send_cfunc_toomany_args); return YJIT_CANT_COMPILE; } |