This commit is contained in:
Takashi Kokubun 2022-12-11 00:00:14 -08:00
Родитель 251f976235
Коммит 3d19db4f8b
1 изменённых файлов: 4 добавлений и 2 удалений

6
mjit.c
Просмотреть файл

@ -262,7 +262,7 @@ rb_mjit_recompile_const(const rb_iseq_t *iseq)
// Default permitted number of units with a JIT code kept in memory.
#define DEFAULT_MAX_CACHE_SIZE 100
// A default threshold used to add iseq to JIT.
#define DEFAULT_CALL_THRESHOLD 10000
#define DEFAULT_CALL_THRESHOLD 1
#define opt_match_noarg(s, l, name) \
opt_match(s, l, name) && (*(s) ? (rb_warn("argument to --mjit-" name " is ignored"), 1) : 1)
@ -395,7 +395,9 @@ mjit_init(const struct mjit_options *opts)
mjit_call_p = true;
// TODO: implement
// Normalize options
if (mjit_opts.call_threshold == 0)
mjit_opts.call_threshold = DEFAULT_CALL_THRESHOLD;
}
void