Misc #19250
closedThe require path of MJIT
Description
Background¶
Since Ruby 3.2, MJIT is written in Ruby [Misc #18968]. We made it a require
-able library instead of a builtin/prebuilt ISeq so that it will never be an extra overhead when MJIT is disabled. It's loaded with require "mjit/compiler"
on prelude when --mjit is given.
However, while it's technically a "standard library", we don't mean to maintain its backward compatibility. To make it clear, it's implemented as RubyVM::MJIT::Compiler
, implying that it's CRuby-specific by prefixing RubyVM::
, and make every constant under RubyVM::MJIT
a private constant. Even if users manually require it, the interface is private.
Discussion¶
For consistency with the constant name RubyVM::MJIT::Compiler
and to make it even clearer that we don't guarantee backward compatibility, @ko1 (Koichi Sasada) suggested to change require "mjit/compiler"
to require "ruby_vm/mjit/compiler"
.
I'm fine with both ways, so I'll do so after confirming that with @matz (Yukihiro Matsumoto).
Updated by matz (Yukihiro Matsumoto) over 2 years ago
No problem. Accepted.
Matz.
Updated by k0kubun (Takashi Kokubun) over 2 years ago
- Status changed from Open to Closed
Applied in changeset git|bb4cbd0803c3297ad036008adc7a01159ce44e1e.
Put RubyVM::MJIT::Compiler under ruby_vm directory (#6989)
[Misc #19250]