ZJIT: Prepare for sharing JIT hooks with ZJIT (#14044)

This commit is contained in:
Takashi Kokubun 2025-07-30 10:11:10 -07:00 committed by GitHub
parent 4263c49d1c
commit 2cd10de330
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 142 additions and 118 deletions

View file

@ -46,7 +46,7 @@ pub struct Options {
// The number of registers allocated for stack temps
pub num_temp_regs: usize,
// Disable Ruby builtin methods defined by `with_yjit` hooks, e.g. Array#each in Ruby
// Disable Ruby builtin methods defined by `with_jit` hooks, e.g. Array#each in Ruby
pub c_builtin: bool,
// Capture stats

View file

@ -57,7 +57,7 @@ fn yjit_init() {
// Call YJIT hooks before enabling YJIT to avoid compiling the hooks themselves
unsafe {
let yjit = rb_const_get(rb_cRubyVM, rust_str_to_id("YJIT"));
rb_funcall(yjit, rust_str_to_id("call_yjit_hooks"), 0);
rb_funcall(yjit, rust_str_to_id("call_jit_hooks"), 0);
}
// Catch panics to avoid UB for unwinding into C frames.