summaryrefslogtreecommitdiff
path: root/rjit.c
diff options
context:
space:
mode:
Diffstat (limited to 'rjit.c')
-rw-r--r--rjit.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/rjit.c b/rjit.c
index b9f11a0800..f1d3440ce9 100644
--- a/rjit.c
+++ b/rjit.c
@@ -361,6 +361,26 @@ rb_rjit_compile(const rb_iseq_t *iseq)
}
void *
+rb_rjit_entry_stub_hit(VALUE branch_stub)
+{
+ VALUE result;
+
+ RB_VM_LOCK_ENTER();
+ rb_vm_barrier();
+
+ rb_control_frame_t *cfp = GET_EC()->cfp;
+
+ WITH_RJIT_ISOLATED({
+ VALUE cfp_ptr = rb_funcall(rb_cRJITCfpPtr, rb_intern("new"), 1, SIZET2NUM((size_t)cfp));
+ result = rb_funcall(rb_RJITCompiler, rb_intern("entry_stub_hit"), 2, branch_stub, cfp_ptr);
+ });
+
+ RB_VM_LOCK_LEAVE();
+
+ return (void *)NUM2SIZET(result);
+}
+
+void *
rb_rjit_branch_stub_hit(VALUE branch_stub, int sp_offset, int target0_p)
{
VALUE result;