summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2025-02-13 15:59:16 +0900
committerNobuyoshi Nakada <[email protected]>2025-02-13 18:01:03 +0900
commit4a67ef09ccd703047552b740431cfe15e32451f4 ()
tree1092e15836655fde8935c7788eb0a411e8c9ca42 /vm.c
parentd35cc0cc772b48c5aaba354e7084278da68f44e4 (diff)
[Feature #21116] Extract RJIT as a third-party gem
Notes: Merged: https://.com/ruby/ruby/pull/12740
-rw-r--r--vm.c16
1 files changed, 2 insertions, 14 deletions
@@ -32,7 +32,6 @@
#include "internal/sanitizers.h"
#include "internal/variable.h"
#include "iseq.h"
-#include "rjit.h"
#include "symbol.h" // This includes a macro for a more performant rb_id2sym.
#include "yjit.h"
#include "ruby/st.h"
@@ -420,7 +419,7 @@ rb_yjit_threshold_hit(const rb_iseq_t *iseq, uint64_t entry_calls)
#define rb_yjit_threshold_hit(iseq, entry_calls) false
#endif
-#if USE_RJIT || USE_YJIT
// Generate JIT code that supports the following kinds of ISEQ entries:
// * The first ISEQ on vm_exec (e.g. <main>, or Ruby methods/blocks
// called by a C method). The current frame has VM_FRAME_FLAG_FINISH.
@@ -437,16 +436,13 @@ jit_compile(rb_execution_context_t *ec)
bool yjit_enabled = rb_yjit_enabled_p;
// Increment the ISEQ's call counter and trigger JIT compilation if not compiled
- if (body->jit_entry == NULL && (yjit_enabled || rb_rjit_call_p)) {
body->jit_entry_calls++;
if (yjit_enabled) {
if (rb_yjit_threshold_hit(iseq, body->jit_entry_calls)) {
rb_yjit_compile_iseq(iseq, ec, false);
}
}
- else if (body->jit_entry_calls == rb_rjit_call_threshold()) {
- rb_rjit_compile(iseq);
- }
}
return body->jit_entry;
}
@@ -2171,7 +2167,6 @@ rb_vm_check_redefinition_opt_method(const rb_method_entry_t *me, VALUE klass)
rb_id2name(me->called_id)
);
rb_yjit_bop_redefined(flag, (enum ruby_basic_operators)bop);
- rb_rjit_bop_redefined(flag, (enum ruby_basic_operators)bop);
ruby_vm_redefined_flag[bop] |= flag;
}
}
@@ -3036,7 +3031,6 @@ rb_vm_mark(void *ptr)
}
rb_thread_sched_mark_zombies(vm);
- rb_rjit_mark();
}
RUBY_MARK_LEAVE("vm");
@@ -4455,12 +4449,6 @@ void Init_builtin_yjit(void) {}
// Whether YJIT is enabled or not, we load yjit_hook.rb to remove Kernel#with_yjit.
#include "yjit_hook.rbinc"
-// Stub for builtin function when not building RJIT units
-#if !USE_RJIT
-void Init_builtin_rjit(void) {}
-void Init_builtin_rjit_c(void) {}
-#endif
-
/* top self */
static VALUE