summaryrefslogtreecommitdiff
path: root/yjit.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-07-24 13:51:46 -0700
committerGitHub <noreply@github.com>2023-07-24 13:51:46 -0700
commitcef60e93e6db859b47c818f745be809feb04ae48 (patch)
tree60ac5fe6f0c41aa72b152656d6ce426b1c708d70 /yjit.c
parentc4e893ceb5811f3436f1e16cab769a16469b56b0 (diff)
YJIT: Fallback send instructions to vm_sendish (#8106)
Notes
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
Diffstat (limited to 'yjit.c')
-rw-r--r--yjit.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/yjit.c b/yjit.c
index 4db46d59f3..50dcecae96 100644
--- a/yjit.c
+++ b/yjit.c
@@ -1122,6 +1122,20 @@ rb_yjit_assert_holding_vm_lock(void)
ASSERT_vm_locking();
}
+// The number of stack slots that vm_sendish() pops for send and invokesuper.
+size_t
+rb_yjit_sendish_sp_pops(const struct rb_callinfo *ci)
+{
+ return 1 - sp_inc_of_sendish(ci); // + 1 to ignore return value push
+}
+
+// The number of stack slots that vm_sendish() pops for invokeblock.
+size_t
+rb_yjit_invokeblock_sp_pops(const struct rb_callinfo *ci)
+{
+ return 1 - sp_inc_of_invokeblock(ci); // + 1 to ignore return value push
+}
+
// Primitives used by yjit.rb
VALUE rb_yjit_stats_enabled_p(rb_execution_context_t *ec, VALUE self);
VALUE rb_yjit_trace_exit_locations_enabled_p(rb_execution_context_t *ec, VALUE self);