|
59 | 59 | #include "internal/process.h" |
60 | 60 | #include "internal/variable.h" |
61 | 61 | #include "mjit.h" |
62 | | -#include "ujit.h" |
| 62 | +#include "yjit.h" |
63 | 63 | #include "ruby/encoding.h" |
64 | 64 | #include "ruby/thread.h" |
65 | 65 | #include "ruby/util.h" |
@@ -103,7 +103,7 @@ void rb_warning_category_update(unsigned int mask, unsigned int bits); |
103 | 103 | SEP \ |
104 | 104 | X(jit) \ |
105 | 105 | SEP \ |
106 | | - X(ujit) |
| 106 | + X(yjit) |
107 | 107 | /* END OF FEATURES */ |
108 | 108 | #define EACH_DEBUG_FEATURES(X, SEP) \ |
109 | 109 | X(frozen_string_literal) \ |
@@ -187,7 +187,7 @@ struct ruby_cmdline_options { |
187 | 187 | #if USE_MJIT |
188 | 188 | struct mjit_options mjit; |
189 | 189 | #endif |
190 | | - struct rb_ujit_options ujit; |
| 190 | + struct rb_yjit_options yjit; |
191 | 191 |
|
192 | 192 | int sflag, xflag; |
193 | 193 | unsigned int warning: 1; |
@@ -232,7 +232,7 @@ cmdline_options_init(ruby_cmdline_options_t *opt) |
232 | 232 | #ifdef MJIT_FORCE_ENABLE /* to use with: ./configure cppflags="-DMJIT_FORCE_ENABLE" */ |
233 | 233 | opt->features.set |= FEATURE_BIT(jit); |
234 | 234 | #endif |
235 | | - opt->features.set |= FEATURE_BIT(ujit); |
| 235 | + opt->features.set |= FEATURE_BIT(yjit); |
236 | 236 | return opt; |
237 | 237 | } |
238 | 238 |
|
@@ -330,7 +330,7 @@ usage(const char *name, int help, int highlight, int columns) |
330 | 330 | M("rubyopt", "", "RUBYOPT environment variable (default: enabled)"), |
331 | 331 | M("frozen-string-literal", "", "freeze all string literals (default: disabled)"), |
332 | 332 | M("jit", "", "JIT compiler (default: disabled)"), |
333 | | - M("ujit", "", "in-process JIT compiler (default: enabled)"), |
| 333 | + M("yjit", "", "in-process JIT compiler (default: enabled)"), |
334 | 334 | }; |
335 | 335 | static const struct message warn_categories[] = { |
336 | 336 | M("deprecated", "", "deprecated features"), |
@@ -1023,20 +1023,20 @@ set_option_encoding_once(const char *type, VALUE *name, const char *e, long elen |
1023 | 1023 | opt_match(s, l, name) && (*(s) ? 1 : (rb_raise(rb_eRuntimeError, "--jit-" name " needs an argument"), 0)) |
1024 | 1024 |
|
1025 | 1025 | static void |
1026 | | -setup_ujit_options(const char *s, struct rb_ujit_options *ujit_opt) |
| 1026 | +setup_yjit_options(const char *s, struct rb_yjit_options *yjit_opt) |
1027 | 1027 | { |
1028 | 1028 | if (*s != '-') return; |
1029 | 1029 | const size_t l = strlen(++s); |
1030 | 1030 |
|
1031 | 1031 | if (opt_match_arg(s, l, "call-threshold")) { |
1032 | | - ujit_opt->call_threshold = atoi(s + 1); |
| 1032 | + yjit_opt->call_threshold = atoi(s + 1); |
1033 | 1033 | } |
1034 | 1034 | else if (opt_match_noarg(s, l, "stats")) { |
1035 | | - ujit_opt->gen_stats = true; |
| 1035 | + yjit_opt->gen_stats = true; |
1036 | 1036 | } |
1037 | 1037 | else { |
1038 | 1038 | rb_raise(rb_eRuntimeError, |
1039 | | - "invalid ujit option `%s' (--help will show valid ujit options)", s); |
| 1039 | + "invalid yjit option `%s' (--help will show valid yjit options)", s); |
1040 | 1040 | } |
1041 | 1041 | } |
1042 | 1042 |
|
@@ -1453,9 +1453,9 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt) |
1453 | 1453 | rb_warn("MJIT support is disabled."); |
1454 | 1454 | #endif |
1455 | 1455 | } |
1456 | | - else if (strncmp("ujit", s, 4) == 0) { |
1457 | | - FEATURE_SET(opt->features, FEATURE_BIT(ujit)); |
1458 | | - setup_ujit_options(s + 4, &opt->ujit); |
| 1456 | + else if (strncmp("yjit", s, 4) == 0) { |
| 1457 | + FEATURE_SET(opt->features, FEATURE_BIT(yjit)); |
| 1458 | + setup_yjit_options(s + 4, &opt->yjit); |
1459 | 1459 | } |
1460 | 1460 | else if (strcmp("yydebug", s) == 0) { |
1461 | 1461 | if (envopt) goto noenvopt_long; |
@@ -1801,8 +1801,8 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt) |
1801 | 1801 | */ |
1802 | 1802 | rb_warning("-K is specified; it is for 1.8 compatibility and may cause odd behavior"); |
1803 | 1803 |
|
1804 | | - if (opt->features.set & FEATURE_BIT(ujit)) |
1805 | | - rb_ujit_init(&opt->ujit); |
| 1804 | + if (opt->features.set & FEATURE_BIT(yjit)) |
| 1805 | + rb_yjit_init(&opt->yjit); |
1806 | 1806 | #if USE_MJIT |
1807 | 1807 | if (opt->features.set & FEATURE_BIT(jit)) { |
1808 | 1808 | opt->mjit.on = TRUE; /* set mjit.on for ruby_show_version() API and check to call mjit_init() */ |
|
0 commit comments