ruby-changes:70216
From: John <ko1@a...>
Date: Wed, 15 Dec 2021 08:23:09 +0900 (JST)
Subject: [ruby-changes:70216] b7ae08992f (master): YJIT: Avoid unnecessary BOP invalidation
https://git.ruby-lang.org/ruby.git/commit/?id=b7ae08992f From b7ae08992f7e4c663b61a3895d29d066fa22e452 Mon Sep 17 00:00:00 2001 From: John Hawthorn <john@h...> Date: Fri, 10 Dec 2021 17:08:05 -0800 Subject: YJIT: Avoid unnecessary BOP invalidation Previously we would invalidate BOPs in YJIT when the method registered as a BOP was redefined on a subclass. --- vm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vm.c b/vm.c index 44b87c3d543..c5934d52a56 100644 --- a/vm.c +++ b/vm.c @@ -1885,9 +1885,11 @@ rb_vm_check_redefinition_opt_method(const rb_method_entry_t *me, VALUE klass) https://github.com/ruby/ruby/blob/trunk/vm.c#L1885 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; + } + } } } -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/