summaryrefslogtreecommitdiff
path: root/yjit.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-16 10:41:12 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2023-03-16 10:42:17 -0700
commit9947574b9cad74fbf04fa44d49647c591590c511 (patch)
tree0a36aa340dc9747c8ef277f96f9712cce8d69b26 /yjit.c
parenta8e7fee80129b0ba360c2671582117c8e18a6464 (diff)
Refactor jit_func_t and jit_exec
I closed https://github.com/ruby/ruby/pull/7543, but part of the diff seems useful regardless, so I extracted it.
Diffstat (limited to 'yjit.c')
-rw-r--r--yjit.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/yjit.c b/yjit.c
index a9d1d2c38b..8e8342971e 100644
--- a/yjit.c
+++ b/yjit.c
@@ -1023,9 +1023,6 @@ rb_yjit_vm_unlock(unsigned int *recursive_lock_level, const char *file, int line
rb_vm_lock_leave(recursive_lock_level, file, line);
}
-// Pointer to a YJIT entry point (machine code generated by YJIT)
-typedef VALUE (*yjit_func_t)(rb_execution_context_t *, rb_control_frame_t *);
-
bool
rb_yjit_compile_iseq(const rb_iseq_t *iseq, rb_execution_context_t *ec)
{
@@ -1038,7 +1035,7 @@ rb_yjit_compile_iseq(const rb_iseq_t *iseq, rb_execution_context_t *ec)
uint8_t *code_ptr = rb_yjit_iseq_gen_entry_point(iseq, ec);
if (code_ptr) {
- iseq->body->jit_func = (yjit_func_t)code_ptr;
+ iseq->body->jit_func = (rb_jit_func_t)code_ptr;
}
else {
iseq->body->jit_func = 0;