diff options
| author | Aaron Patterson <tenderlove@ruby-lang.org> | 2025-02-10 12:01:17 -0800 |
|---|---|---|
| committer | Aaron Patterson <aaron.patterson@gmail.com> | 2025-02-10 15:50:23 -0500 |
| commit | d680a13ad061eeb562b1df7c11d094e6984789ce (patch) | |
| tree | 8fc2ab2681674bd07a30a565e37257449a8a25fa | |
| parent | b74077c19ef882b3d2022d05e6f736feda3f8894 (diff) | |
Always return jit_entry even if NULL
We can just always return the jit_entry since it will be initialized to
NULL. There is no reason to specifically return NULL if yjit / rjit are
disabled
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12729
| -rw-r--r-- | vm.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -435,12 +435,9 @@ jit_compile(rb_execution_context_t *ec) const rb_iseq_t *iseq = ec->cfp->iseq; struct rb_iseq_constant_body *body = ISEQ_BODY(iseq); bool yjit_enabled = rb_yjit_enabled_p; - if (!(yjit_enabled || rb_rjit_call_p)) { - return NULL; - } // Increment the ISEQ's call counter and trigger JIT compilation if not compiled - if (body->jit_entry == NULL) { + 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)) { |
