mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
ZJIT: Prepare for sharing JIT hooks with ZJIT (#14044)
This commit is contained in:
parent
4263c49d1c
commit
2cd10de330
20 changed files with 142 additions and 118 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue