diff options
author | Alan Wu <[email protected]> | 2021-10-22 13:41:34 -0400 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-22 17:22:41 -0400 |
commit | f80069820e1f7d44ef9c385254d498468a352021 (patch) | |
tree | 7d22c2dfc085e9dd3f478f9cd3ca312be345a308 /yjit_iface.c | |
parent | 7246c5b811a7b937854efb821cc457f101ad5ff1 (diff) |
YJIT: Don't take VM lock on constant IC fill when disabled
While theoretically it's fine to take the lock and then immediately release
it, we don't need to do it when YJIT is off.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5007
Diffstat (limited to 'yjit_iface.c')
-rw-r--r-- | yjit_iface.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/yjit_iface.c b/yjit_iface.c index 73b51fd50d..870a8d1efd 100644 --- a/yjit_iface.c +++ b/yjit_iface.c @@ -592,6 +592,8 @@ rb_yjit_constant_state_changed(void) void rb_yjit_constant_ic_update(const rb_iseq_t *iseq, IC ic) { + if (!rb_yjit_enabled_p()) return; + // We can't generate code in these situations, so no need to invalidate. // See gen_opt_getinlinecache. if (ic->entry->ic_cref || rb_multi_ractor_p()) { |