summaryrefslogtreecommitdiff
path: root/mjit.h
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2020-10-16 13:45:25 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:25 -0400
commitba45aff16b1246a3c6b31e9cebb0096fb4e1fcae (patch)
tree0257f15f77f3eb65ae64b144b90411e8bb19a02b /mjit.h
parenta245db8df8d69feca7c36b4824f26ee6f802721a (diff)
Don't call MicroJIT from MJIT output
Diffstat (limited to 'mjit.h')
-rw-r--r--mjit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mjit.h b/mjit.h
index 413e6f83cc..d887e7df5c 100644
--- a/mjit.h
+++ b/mjit.h
@@ -151,10 +151,12 @@ mjit_exec(rb_execution_context_t *ec)
body = iseq->body;
body->total_calls++;
+#ifndef MJIT_HEADER
const int ujit_call_threashold = 10;
if (body->total_calls == ujit_call_threashold) {
rb_ujit_compile_iseq(iseq);
}
+#endif
mjit_func_t func = body->jit_func;
if (UNLIKELY((uintptr_t)func <= LAST_JIT_ISEQ_FUNC)) {