summaryrefslogtreecommitdiff
path: root/vm_core.h
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 /vm_core.h
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 'vm_core.h')
-rw-r--r--vm_core.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_core.h b/vm_core.h
index 724c8cd739..f7313205ee 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -373,6 +373,8 @@ enum rb_builtin_attr {
BUILTIN_ATTR_NO_GC = 0x02,
};
+typedef VALUE (*rb_jit_func_t)(struct rb_execution_context_struct *, struct rb_control_frame_struct *);
+
struct rb_iseq_constant_body {
enum rb_iseq_type type;
@@ -505,7 +507,7 @@ struct rb_iseq_constant_body {
#if USE_RJIT || USE_YJIT
// Function pointer for JIT code
- VALUE (*jit_func)(struct rb_execution_context_struct *, struct rb_control_frame_struct *);
+ rb_jit_func_t jit_func;
// Number of total calls with jit_exec()
long unsigned total_calls;
#endif
@@ -521,8 +523,6 @@ struct rb_iseq_constant_body {
#endif
};
-typedef VALUE (*jit_func_t)(struct rb_execution_context_struct *, struct rb_control_frame_struct *);
-
/* T_IMEMO/iseq */
/* typedef rb_iseq_t is in method.h */
struct rb_iseq_struct {