ruby/mjit.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 строки
606 B
Ruby
Исходник Обычный вид История

module RubyVM::MJIT
def self.enabled?
Primitive.cexpr! 'RBOOL(mjit_enabled)'
end
def self.pause(wait: true)
Primitive.cexpr! 'mjit_pause(RTEST(wait))'
end
def self.resume
Primitive.cexpr! 'mjit_resume()'
end
end
if RubyVM::MJIT.enabled?
begin
require 'fiddle'
require 'fiddle/import'
rescue LoadError
return # miniruby doesn't support MJIT
end
RubyVM::MJIT::C = Object.new # forward declaration for mjit/compiler
require "mjit/c_type"
require "mjit/instruction"
require "mjit/compiler"
module RubyVM::MJIT
2022-11-28 09:14:48 +03:00
private_constant(*constants)
end
end