From 9453267689fdc405aa3d2eb0bb27e52addf982ec Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 1 Feb 2021 09:23:06 -0800 Subject: [PATCH] add bop to redefinition callback --- ujit.h | 2 +- ujit_iface.c | 2 +- vm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ujit.h b/ujit.h index 51ce80b304..3fb78200fd 100644 --- a/ujit.h +++ b/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_compile_iseq(const rb_iseq_t *iseq); 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 diff --git a/ujit_iface.c b/ujit_iface.c index e9c617e351..d894c1321d 100644 --- a/ujit_iface.c +++ b/ujit_iface.c @@ -415,7 +415,7 @@ iseq_end_index(VALUE self) /* Called when a basic operation is redefined */ 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"); } diff --git a/vm.c b/vm.c index f8041eab9a..e98f89864b 100644 --- a/vm.c +++ b/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 (st_lookup(vm_opt_method_def_table, (st_data_t)me->def, &bop)) { 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; }