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:
Alan Wu 2021-10-22 13:41:34 -04:00
Родитель 7246c5b811
Коммит f80069820e
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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()) {