summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-07 22:43:37 -0800
committerGitHub <noreply@github.com>2023-03-07 22:43:37 -0800
commit6d91df08b53d0b17fa8cd949a3c6b42164c46c8d (patch)
tree8aea38651881189841c537dd8c8ca097a850f351 /vm.c
parent0bf4cd8e1c3178345a63ce5b9d80d02781d93497 (diff)
downloadruby-6d91df08b53d0b17fa8cd949a3c6b42164c46c8d.tar.gz
Allow enabling YJIT and RJIT independently (#7474)
We used to require MJIT is supported when YJIT is supported. However, now that RJIT dropped some platforms that YJIT supports, it no longer makes sense. We should be able to enable only YJIT, and vice versa.
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index 0e70ded06d..9937a48221 100644
--- a/vm.c
+++ b/vm.c
@@ -403,7 +403,7 @@ jit_exec(rb_execution_context_t *ec)
}
}
else { // rjit_call_p
- if (body->total_calls == rjit_opts.call_threshold) {
+ if (body->total_calls == rb_rjit_call_threshold()) {
rb_rjit_compile(iseq);
}
if ((func = body->jit_func) == 0) {
@@ -414,6 +414,12 @@ jit_exec(rb_execution_context_t *ec)
// Call the JIT code
return func(ec, ec->cfp); // SystemV x64 calling convention: ec -> RDI, cfp -> RSI
}
+#else
+static inline VALUE
+jit_exec(rb_execution_context_t *ec)
+{
+ return Qundef;
+}
#endif
#include "vm_insnhelper.c"