Implement greedy versioning. Refactor versioning logic. (#10)

* Implement eager versioning. Refactor versioning logic.

* Add --version-limit and --greedy-versioning command-line args
This commit is contained in:
Maxime Chevalier-Boisvert 2021-04-24 00:16:48 -04:00 committed by Alan Wu
parent 4c7afa64b4
commit 96f4f918b0
7 changed files with 90 additions and 45 deletions

6
ruby.c
View file

@ -1039,6 +1039,12 @@ setup_yjit_options(const char *s, struct rb_yjit_options *yjit_opt)
if (opt_match_arg(s, l, "call-threshold")) {
yjit_opt->call_threshold = atoi(s + 1);
}
else if (opt_match_arg(s, l, "version-limit")) {
yjit_opt->version_limit = atoi(s + 1);
}
else if (opt_match_noarg(s, l, "greedy-versioning")) {
yjit_opt->greedy_versioning = true;
}
else if (opt_match_noarg(s, l, "stats")) {
yjit_opt->gen_stats = true;
}