summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-08 23:14:33 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2023-03-08 23:24:38 -0800
commitf5909ac6d962acf1eb2736a66316c74693e63a2f (patch)
treedc83934955383100fab09eca212b9b4f1872c11d /ruby.c
parenta0918a4a80226700ee7c8ea27b30b87f86e5a25d (diff)
downloadruby-f5909ac6d962acf1eb2736a66316c74693e63a2f.tar.gz
RJIT: Stop allowing leaked globals rjit_*
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/ruby.c b/ruby.c
index 2aa3ab8c32..035175915d 100644
--- a/ruby.c
+++ b/ruby.c
@@ -342,7 +342,7 @@ usage(const char *name, int help, int highlight, int columns)
};
#endif
#if USE_RJIT
- extern const struct ruby_opt_message rjit_option_messages[];
+ extern const struct ruby_opt_message rb_rjit_option_messages[];
#endif
int i;
const char *sb = highlight ? esc_standout+1 : esc_none;
@@ -377,8 +377,8 @@ usage(const char *name, int help, int highlight, int columns)
#endif
#if USE_RJIT
printf("%s""RJIT options (experimental):%s\n", sb, se);
- for (i = 0; rjit_option_messages[i].str; ++i)
- SHOW(rjit_option_messages[i]);
+ for (i = 0; rb_rjit_option_messages[i].str; ++i)
+ SHOW(rb_rjit_option_messages[i]);
#endif
}
@@ -1494,9 +1494,9 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt)
}
else if (is_option_with_optarg("rjit", '-', true, false, false)) {
#if USE_RJIT
- extern void rjit_setup_options(const char *s, struct rjit_options *rjit_opt);
+ extern void rb_rjit_setup_options(const char *s, struct rjit_options *rjit_opt);
FEATURE_SET(opt->features, FEATURE_BIT(rjit));
- rjit_setup_options(s, &opt->rjit);
+ rb_rjit_setup_options(s, &opt->rjit);
#else
rb_warn("RJIT support is disabled.");
#endif
@@ -1614,9 +1614,9 @@ ruby_opt_init(ruby_cmdline_options_t *opt)
#if USE_RJIT
// rb_call_builtin_inits depends on RubyVM::RJIT.enabled?
if (opt->rjit.on)
- rjit_enabled = true;
+ rb_rjit_enabled = true;
if (opt->rjit.stats)
- rjit_stats_enabled = true;
+ rb_rjit_stats_enabled = true;
#endif
Init_ext(); /* load statically linked extensions before rubygems */
@@ -1626,9 +1626,9 @@ ruby_opt_init(ruby_cmdline_options_t *opt)
// Initialize JITs after prelude because JITing prelude is typically not optimal.
#if USE_RJIT
- // Also, rjit_init is safe only after rb_call_builtin_inits() defines RubyVM::RJIT::Compiler.
+ // Also, rb_rjit_init is safe only after rb_call_builtin_inits() defines RubyVM::RJIT::Compiler.
if (opt->rjit.on)
- rjit_init(&opt->rjit);
+ rb_rjit_init(&opt->rjit);
#endif
#if USE_YJIT
if (opt->yjit)
@@ -1941,7 +1941,7 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
#if USE_RJIT
if (FEATURE_SET_P(opt->features, rjit)) {
- opt->rjit.on = true; // set opt->rjit.on for Init_ruby_description() and calling rjit_init()
+ opt->rjit.on = true; // set opt->rjit.on for Init_ruby_description() and calling rb_rjit_init()
}
#endif
#if USE_YJIT