Implement --ujit-call-threshold

This commit is contained in:
Maxime Chevalier-Boisvert 2021-02-23 15:22:20 -05:00 committed by Alan Wu
parent 58657b33e7
commit 0710bec01e
4 changed files with 31 additions and 17 deletions

2
mjit.h
View file

@ -150,7 +150,7 @@ mjit_exec(rb_execution_context_t *ec)
}
#ifndef MJIT_HEADER
if (rb_ujit_enabled_p() && !mjit_call_p && body->total_calls == UJIT_CALL_THRESHOLD) {
if (rb_ujit_enabled_p() && !mjit_call_p && body->total_calls == rb_ujit_call_threshold()) {
rb_ujit_compile_iseq(iseq);
return Qundef;
}