diff --git a/mjit.c b/mjit.c index 48bebb0e7e..ee3aa3fb5e 100644 --- a/mjit.c +++ b/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