mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
YJIT: Add RubyVM::YJIT.enable (#8705)
This commit is contained in:
parent
62e340251b
commit
6beb09c2c9
11 changed files with 111 additions and 109 deletions
8
yjit.rb
8
yjit.rb
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue