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
2
vm.c
2
vm.c
@ -1885,11 +1885,13 @@ rb_vm_check_redefinition_opt_method(const rb_method_entry_t *me, VALUE klass)
|
|||||||
if (vm_redefinition_check_method_type(me->def)) {
|
if (vm_redefinition_check_method_type(me->def)) {
|
||||||
if (st_lookup(vm_opt_method_def_table, (st_data_t)me->def, &bop)) {
|
if (st_lookup(vm_opt_method_def_table, (st_data_t)me->def, &bop)) {
|
||||||
int flag = vm_redefinition_check_flag(klass);
|
int flag = vm_redefinition_check_flag(klass);
|
||||||
|
if (flag != 0) {
|
||||||
rb_yjit_bop_redefined(klass, me, (enum ruby_basic_operators)bop);
|
rb_yjit_bop_redefined(klass, me, (enum ruby_basic_operators)bop);
|
||||||
ruby_vm_redefined_flag[bop] |= flag;
|
ruby_vm_redefined_flag[bop] |= flag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static enum rb_id_table_iterator_result
|
static enum rb_id_table_iterator_result
|
||||||
check_redefined_method(ID mid, VALUE value, void *data)
|
check_redefined_method(ID mid, VALUE value, void *data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user