YJIT: Avoid unnecessary BOP invalidation
Previously we would invalidate BOPs in YJIT when the method registered as a BOP was redefined on a subclass.
This commit is contained in:
parent
b563f12297
commit
b7ae08992f
Notes:
git
2021-12-15 08:23:15 +09:00
8
vm.c
8
vm.c
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user