Skip to content

Commit

Permalink
RJIT: Resurrect --rjit-pause and RJIT.resume
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed Mar 10, 2023
1 parent e07e9f8 commit 3c35c13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rjit.c
Expand Up @@ -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
Expand Down
12 changes: 5 additions & 7 deletions rjit.rb
Expand Up @@ -4,14 +4,12 @@ def self.enabled?
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
Expand Down

0 comments on commit 3c35c13

Please sign in to comment.