summaryrefslogtreecommitdiff
path: root/mjit.h
diff options
context:
space:
mode:
Diffstat (limited to 'mjit.h')
-rw-r--r--mjit.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/mjit.h b/mjit.h
index c52b253..964ab38 100644
--- a/mjit.h
+++ b/mjit.h
@@ -102,17 +102,14 @@ mjit_exec(rb_execution_context_t *ec)
total_calls = ++body->total_calls;
func = body->jit_func;
- if (UNLIKELY(mjit_opts.wait && mjit_opts.min_calls == total_calls && mjit_target_iseq_p(body)
- && func == (mjit_func_t)NOT_ADDED_JIT_ISEQ_FUNC)) {
- mjit_add_iseq_to_process(iseq);
- func = mjit_get_iseq_func(body);
- }
-
if (UNLIKELY((ptrdiff_t)func <= (ptrdiff_t)LAST_JIT_ISEQ_FUNC)) {
switch ((enum rb_mjit_iseq_func)func) {
case NOT_ADDED_JIT_ISEQ_FUNC:
if (total_calls == mjit_opts.min_calls && mjit_target_iseq_p(body)) {
mjit_add_iseq_to_process(iseq);
+ if (UNLIKELY(mjit_opts.wait)) {
+ func = mjit_get_iseq_func(body);
+ }
}
return Qundef;
case NOT_READY_JIT_ISEQ_FUNC: