Polish the public docs for MJIT [ci skip]
Now every private interface is cleaned up, and the public interface is documented.
This commit is contained in:
parent
cce6a30fdd
commit
0b2aea861c
@ -18,6 +18,7 @@ gc.rb
|
||||
io.rb
|
||||
kernel.rb
|
||||
marshal.rb
|
||||
mjit.rb
|
||||
numeric.rb
|
||||
nilclass.rb
|
||||
pack.rb
|
||||
|
7
mjit.rb
7
mjit.rb
@ -1,12 +1,15 @@
|
||||
module RubyVM::MJIT
|
||||
# Return true if MJIT is enabled.
|
||||
def self.enabled?
|
||||
Primitive.cexpr! 'RBOOL(mjit_enabled)'
|
||||
end
|
||||
|
||||
# Stop generating JITed code.
|
||||
def self.pause(wait: true)
|
||||
Primitive.cexpr! 'mjit_pause(RTEST(wait))'
|
||||
end
|
||||
|
||||
# Start generating JITed code again after pause.
|
||||
def self.resume
|
||||
Primitive.cexpr! 'mjit_resume()'
|
||||
end
|
||||
@ -20,7 +23,9 @@ if RubyVM::MJIT.enabled?
|
||||
return # miniruby doesn't support MJIT
|
||||
end
|
||||
|
||||
RubyVM::MJIT::C = Object.new # forward declaration for ruby_vm/mjit/compiler
|
||||
# forward declaration for ruby_vm/mjit/compiler
|
||||
RubyVM::MJIT::C = Object.new # :nodoc:
|
||||
|
||||
require 'ruby_vm/mjit/c_type'
|
||||
require 'ruby_vm/mjit/instruction'
|
||||
require 'ruby_vm/mjit/compiler'
|
||||
|
@ -1,4 +1,4 @@
|
||||
module RubyVM::MJIT
|
||||
module RubyVM::MJIT # :nodoc: all
|
||||
Instruction = Struct.new(
|
||||
:name,
|
||||
:bin,
|
||||
|
Loading…
x
Reference in New Issue
Block a user