mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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.
This commit is contained in:
parent
7246c5b811
commit
f80069820e
Notes:
git
2021-10-23 06:23:02 +09:00
1 changed files with 2 additions and 0 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue