diff options
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -1798,7 +1798,7 @@ rb_iter_break_value(VALUE val) /* optimization: redefine management */ -static st_table *vm_opt_method_table = 0; +static st_table *vm_opt_method_def_table = 0; static st_table *vm_opt_mid_table = 0; static int @@ -1852,9 +1852,8 @@ rb_vm_check_redefinition_opt_method(const rb_method_entry_t *me, VALUE klass) klass = RBASIC_CLASS(klass); } if (vm_redefinition_check_method_type(me->def)) { - if (st_lookup(vm_opt_method_table, (st_data_t)me, &bop)) { - int flag = vm_redefinition_check_flag(klass); - + if (st_lookup(vm_opt_method_def_table, (st_data_t)me->def, &bop)) { + int flag = vm_redefinition_check_flag(klass); ruby_vm_redefined_flag[bop] |= flag; } } @@ -1885,7 +1884,7 @@ add_opt_method(VALUE klass, ID mid, VALUE bop) const rb_method_entry_t *me = rb_method_entry_at(klass, mid); if (me && vm_redefinition_check_method_type(me->def)) { - st_insert(vm_opt_method_table, (st_data_t)me, (st_data_t)bop); + st_insert(vm_opt_method_def_table, (st_data_t)me->def, (st_data_t)bop); st_insert(vm_opt_mid_table, (st_data_t)mid, (st_data_t)Qtrue); } else { @@ -1899,7 +1898,7 @@ vm_init_redefined_flag(void) ID mid; VALUE bop; - vm_opt_method_table = st_init_numtable(); + vm_opt_method_def_table = st_init_numtable(); vm_opt_mid_table = st_init_numtable(); #define OP(mid_, bop_) (mid = id##mid_, bop = BOP_##bop_, ruby_vm_redefined_flag[bop] = 0) |