diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2021-02-10 12:18:35 -0500 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:28 -0400 |
commit | f9e16b0e078b6b6c876c4dbfea868bb0199d5382 (patch) | |
tree | 7862c9208bf66637563d12106e2fc613fa73ad24 | |
parent | 69d27e3f97f1e75773a81cda411bb67a9159d107 (diff) |
Fix context push/pop in Ruby-to-Ruby calls
-rw-r--r-- | ujit_codegen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ujit_codegen.c b/ujit_codegen.c index cb0d6bcd54..9ca8216a2c 100644 --- a/ujit_codegen.c +++ b/ujit_codegen.c @@ -1284,7 +1284,8 @@ gen_opt_swb_iseq(jitstate_t* jit, ctx_t* ctx, struct rb_call_data * cd, const rb // Pop arguments and receiver in return context, push the return value // After the return, the JIT and interpreter SP will match up ctx_t return_ctx = *ctx; - ctx_stack_pop(&return_ctx, argc); + ctx_stack_pop(&return_ctx, argc + 1); + ctx_stack_push(&return_ctx, T_NONE); return_ctx.sp_offset = 0; // Write the JIT return address on the current frame |