From 6beb09c2c99a2575027bdbc60a6fbb099416f74d Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 19 Oct 2023 10:54:35 -0700 Subject: YJIT: Add RubyVM::YJIT.enable (#8705) --- yjit.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'yjit.c') diff --git a/yjit.c b/yjit.c index 7c9a933c20..baefed41cf 100644 --- a/yjit.c +++ b/yjit.c @@ -1171,20 +1171,15 @@ VALUE rb_yjit_insns_compiled(rb_execution_context_t *ec, VALUE self, VALUE iseq) VALUE rb_yjit_code_gc(rb_execution_context_t *ec, VALUE self); VALUE rb_yjit_simulate_oom_bang(rb_execution_context_t *ec, VALUE self); VALUE rb_yjit_get_exit_locations(rb_execution_context_t *ec, VALUE self); -VALUE rb_yjit_resume(rb_execution_context_t *ec, VALUE self); +VALUE rb_yjit_enable(rb_execution_context_t *ec, VALUE self); // Preprocessed yjit.rb generated during build #include "yjit.rbinc" -// Can raise RuntimeError +// Initialize the GC hooks void -rb_yjit_init(void) +rb_yjit_init_gc_hooks(void) { - // Call the Rust initialization code - void rb_yjit_init_rust(void); - rb_yjit_init_rust(); - - // Initialize the GC hooks. Do this second as some code depend on Rust initialization. struct yjit_root_struct *root; VALUE yjit_root = TypedData_Make_Struct(0, struct yjit_root_struct, &yjit_root_type, root); rb_gc_register_mark_object(yjit_root); -- cgit v1.2.3