RJIT: Resurrect --rjit-pause and RJIT.resume

This commit is contained in:
Takashi Kokubun 2023-03-09 22:43:38 -08:00
parent e07e9f8491
commit 3c35c13aaa
2 changed files with 6 additions and 8 deletions

2
rjit.c
View File

@ -488,7 +488,7 @@ rb_rjit_init(const struct rjit_options *opts)
rb_cRJITCfpPtr = rb_funcall(rb_mRJITC, rb_intern("rb_control_frame_t"), 0);
rb_mRJITHooks = rb_const_get(rb_mRJIT, rb_intern("Hooks"));
rb_rjit_call_p = true;
rb_rjit_call_p = !rb_rjit_opts.pause;
rjit_stats_p = rb_rjit_opts.stats;
// Normalize options

12
rjit.rb
View File

@ -4,14 +4,12 @@ module RubyVM::RJIT
Primitive.cexpr! 'RBOOL(rb_rjit_enabled)'
end
# Stop generating JITed code.
def self.pause
# TODO: implement this
end
# Start generating JITed code again after pause.
# Start generating JITed code again after --rjit-pause.
def self.resume
# TODO: implement this
Primitive.cstmt! %{
rb_rjit_call_p = true;
return Qnil;
}
end
if Primitive.rjit_stats_enabled_p