YJIT: Add RubyVM::YJIT.enable (#8705)

This commit is contained in:
Takashi Kokubun 2023-10-19 10:54:35 -07:00 committed by GitHub
parent 62e340251b
commit 6beb09c2c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 111 additions and 109 deletions

View file

@ -11,7 +11,7 @@
module RubyVM::YJIT
# Check if YJIT is enabled
def self.enabled?
Primitive.cexpr! 'RBOOL(rb_yjit_enabled_p())'
Primitive.cexpr! 'RBOOL(rb_yjit_enabled_p)'
end
# Check if --yjit-stats is used.
@ -29,9 +29,9 @@ module RubyVM::YJIT
Primitive.rb_yjit_reset_stats_bang
end
# Resume YJIT compilation after paused on startup with --yjit-pause
def self.resume
Primitive.rb_yjit_resume
# Enable YJIT compilation.
def self.enable
Primitive.rb_yjit_enable
end
# If --yjit-trace-exits is enabled parse the hashes from