1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Don't call MicroJIT from MJIT output

This commit is contained in:
Alan Wu 2020-10-16 13:45:25 -04:00
parent a245db8df8
commit ba45aff16b

2
mjit.h
View file

@ -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)) {