mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add bop to redefinition callback
This commit is contained in:
parent
53bd13edf3
commit
9453267689
3 changed files with 3 additions and 3 deletions
2
ujit.h
2
ujit.h
|
@ -52,6 +52,6 @@ void rb_ujit_collect_vm_usage_insn(int insn);
|
||||||
void rb_ujit_method_lookup_change(VALUE cme_or_cc);
|
void rb_ujit_method_lookup_change(VALUE cme_or_cc);
|
||||||
void rb_ujit_compile_iseq(const rb_iseq_t *iseq);
|
void rb_ujit_compile_iseq(const rb_iseq_t *iseq);
|
||||||
void rb_ujit_init(struct rb_ujit_options *options);
|
void rb_ujit_init(struct rb_ujit_options *options);
|
||||||
void rb_ujit_bop_redefined(VALUE klass, const rb_method_entry_t *me);
|
void rb_ujit_bop_redefined(VALUE klass, const rb_method_entry_t *me, enum ruby_basic_operators bop);
|
||||||
|
|
||||||
#endif // #ifndef UJIT_H
|
#endif // #ifndef UJIT_H
|
||||||
|
|
|
@ -415,7 +415,7 @@ iseq_end_index(VALUE self)
|
||||||
|
|
||||||
/* Called when a basic operation is redefined */
|
/* Called when a basic operation is redefined */
|
||||||
void
|
void
|
||||||
rb_ujit_bop_redefined(VALUE klass, const rb_method_entry_t *me)
|
rb_ujit_bop_redefined(VALUE klass, const rb_method_entry_t *me, enum ruby_basic_operators bop)
|
||||||
{
|
{
|
||||||
//fprintf(stderr, "bop redefined\n");
|
//fprintf(stderr, "bop redefined\n");
|
||||||
}
|
}
|
||||||
|
|
2
vm.c
2
vm.c
|
@ -1856,7 +1856,7 @@ 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);
|
||||||
rb_ujit_bop_redefined(klass, me);
|
rb_ujit_bop_redefined(klass, me, (enum ruby_basic_operators)bop);
|
||||||
|
|
||||||
ruby_vm_redefined_flag[bop] |= flag;
|
ruby_vm_redefined_flag[bop] |= flag;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue