From 9c2f61201786d13c08d25aafe6f150dd50819145 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sun, 11 Dec 2022 21:16:33 -0800 Subject: Prepare for compiling an ISEQ --- vm.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'vm.c') diff --git a/vm.c b/vm.c index 822c2c7ba4..feb07c5922 100644 --- a/vm.c +++ b/vm.c @@ -382,32 +382,6 @@ extern VALUE rb_vm_invoke_bmethod(rb_execution_context_t *ec, rb_proc_t *proc, V static VALUE vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler); #if USE_MJIT || USE_YJIT -# ifdef MJIT_HEADER -NOINLINE(static COLDFUNC VALUE mjit_check_iseq(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_iseq_constant_body *body)); -# else -static inline VALUE mjit_check_iseq(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_iseq_constant_body *body); -# endif -static VALUE -mjit_check_iseq(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_iseq_constant_body *body) -{ - uintptr_t mjit_state = (uintptr_t)(body->jit_func); - ASSUME(MJIT_FUNC_STATE_P(mjit_state)); - switch ((enum rb_mjit_func_state)mjit_state) { - case MJIT_FUNC_NOT_COMPILED: - if (body->total_calls == mjit_opts.call_threshold) { - rb_mjit_compile(iseq); - if (UNLIKELY(mjit_opts.wait && !MJIT_FUNC_STATE_P(body->jit_func))) { - return body->jit_func(ec, ec->cfp); - } - } - break; - case MJIT_FUNC_COMPILING: - case MJIT_FUNC_FAILED: - break; - } - return Qundef; -} - // Try to execute the current iseq in ec. Use JIT code if it is ready. // If it is not, add ISEQ to the compilation queue and return Qundef for MJIT. // YJIT compiles on the thread running the iseq. -- cgit v1.2.3