Add --zjit option
This commit is contained in:
parent
43234138d6
commit
d993307d4c
Notes:
git
2025-04-18 13:50:00 +00:00
@ -39,6 +39,7 @@ typedef struct ruby_cmdline_options {
|
|||||||
#if USE_YJIT
|
#if USE_YJIT
|
||||||
unsigned int yjit: 1;
|
unsigned int yjit: 1;
|
||||||
#endif
|
#endif
|
||||||
|
unsigned int zjit: 1;
|
||||||
} ruby_cmdline_options_t;
|
} ruby_cmdline_options_t;
|
||||||
|
|
||||||
struct ruby_opt_message {
|
struct ruby_opt_message {
|
||||||
|
9
ruby.c
9
ruby.c
@ -106,6 +106,8 @@ void rb_warning_category_update(unsigned int mask, unsigned int bits);
|
|||||||
X(frozen_string_literal) \
|
X(frozen_string_literal) \
|
||||||
SEP \
|
SEP \
|
||||||
X(yjit) \
|
X(yjit) \
|
||||||
|
SEP \
|
||||||
|
X(zjit) \
|
||||||
/* END OF FEATURES */
|
/* END OF FEATURES */
|
||||||
#define EACH_DEBUG_FEATURES(X, SEP) \
|
#define EACH_DEBUG_FEATURES(X, SEP) \
|
||||||
X(frozen_string_literal) \
|
X(frozen_string_literal) \
|
||||||
@ -342,9 +344,10 @@ usage(const char *name, int help, int highlight, int columns)
|
|||||||
#if USE_YJIT
|
#if USE_YJIT
|
||||||
M("--yjit", "", "Enable in-process JIT compiler."),
|
M("--yjit", "", "Enable in-process JIT compiler."),
|
||||||
#endif
|
#endif
|
||||||
|
M("--zjit", "", "Enable in-process JIT compiler."),
|
||||||
M("-h", "", "Print this help message; use --help for longer message."),
|
M("-h", "", "Print this help message; use --help for longer message."),
|
||||||
};
|
};
|
||||||
STATIC_ASSERT(usage_msg_size, numberof(usage_msg) < 25);
|
STATIC_ASSERT(usage_msg_size, numberof(usage_msg) < 26);
|
||||||
|
|
||||||
static const struct ruby_opt_message help_msg[] = {
|
static const struct ruby_opt_message help_msg[] = {
|
||||||
M("--backtrace-limit=num", "", "Set backtrace limit."),
|
M("--backtrace-limit=num", "", "Set backtrace limit."),
|
||||||
@ -1450,6 +1453,10 @@ proc_long_options(ruby_cmdline_options_t *opt, const char *s, long argc, char **
|
|||||||
" You may need to install rustc to build Ruby with YJIT.");
|
" You may need to install rustc to build Ruby with YJIT.");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
else if (is_option_with_optarg("zjit", '-', true, false, false)) {
|
||||||
|
FEATURE_SET(opt->features, FEATURE_BIT(yjit));
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
else if (strcmp("yydebug", s) == 0) {
|
else if (strcmp("yydebug", s) == 0) {
|
||||||
if (envopt) goto noenvopt_long;
|
if (envopt) goto noenvopt_long;
|
||||||
opt->dump |= DUMP_BIT(yydebug);
|
opt->dump |= DUMP_BIT(yydebug);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user