Skip to content

Commit

Permalink
YJIT: Avoid unnecessary BOP invalidation
Browse files Browse the repository at this point in the history
Previously we would invalidate BOPs in YJIT when the method registered
as a BOP was redefined on a subclass.
  • Loading branch information
jhawthorn committed Dec 14, 2021
1 parent b563f12 commit b7ae089
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions vm.c
Expand Up @@ -1885,9 +1885,11 @@ rb_vm_check_redefinition_opt_method(const rb_method_entry_t *me, VALUE klass)
if (vm_redefinition_check_method_type(me->def)) {
if (st_lookup(vm_opt_method_def_table, (st_data_t)me->def, &bop)) {
int flag = vm_redefinition_check_flag(klass);
rb_yjit_bop_redefined(klass, me, (enum ruby_basic_operators)bop);
ruby_vm_redefined_flag[bop] |= flag;
}
if (flag != 0) {
rb_yjit_bop_redefined(klass, me, (enum ruby_basic_operators)bop);
ruby_vm_redefined_flag[bop] |= flag;
}
}
}
}

Expand Down

0 comments on commit b7ae089

Please sign in to comment.