From 6d91df08b53d0b17fa8cd949a3c6b42164c46c8d Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 7 Mar 2023 22:43:37 -0800 Subject: 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. --- vm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'vm.c') 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" -- cgit v1.2.3