ruby-changes:69029
From: Aaron <ko1@a...>
Date: Thu, 21 Oct 2021 08:20:36 +0900 (JST)
Subject: [ruby-changes:69029] 0d63600e4f (master): Partial revert of ceebc7fc98d
https://git.ruby-lang.org/ruby.git/commit/?id=0d63600e4f From 0d63600e4f9d45e9814191e5ca7aecf9ef28a9df Mon Sep 17 00:00:00 2001 From: Aaron Patterson <tenderlove@r...> Date: Mon, 28 Jun 2021 15:00:35 -0700 Subject: Partial revert of ceebc7fc98d I'm looking through the places where YJIT needs notifications. It looks like these changes to gc.c and vm_callinfo.h have become unnecessary since 84ab77ba592. This commit just makes the diff against upstream smaller, but otherwise shouldn't change any behavior. --- gc.c | 2 +- vm_callinfo.h | 11 ++++++++++- vm_method.c | 12 ------------ 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/gc.c b/gc.c index 879b6e4dc0..4451218f71 100644 --- a/gc.c +++ b/gc.c @@ -2907,7 +2907,7 @@ vm_ccs_free(struct rb_class_cc_entries *ccs, int alive, rb_objspace_t *objspace, https://github.com/ruby/ruby/blob/trunk/gc.c#L2907 asan_poison_object((VALUE)cc); } } - rb_vm_cc_invalidate(cc); + vm_cc_invalidate(cc); } ruby_xfree(ccs->entries); } diff --git a/vm_callinfo.h b/vm_callinfo.h index 11c23e02cc..d5f4388fa8 100644 --- a/vm_callinfo.h +++ b/vm_callinfo.h @@ -409,7 +409,16 @@ vm_cc_method_missing_reason_set(const struct rb_callcache *cc, enum method_missi https://github.com/ruby/ruby/blob/trunk/vm_callinfo.h#L409 *(enum method_missing_reason *)&cc->aux_.method_missing_reason = reason; } -void rb_vm_cc_invalidate(const struct rb_callcache *cc); +static inline void +vm_cc_invalidate(const struct rb_callcache *cc) +{ + VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache)); + VM_ASSERT(cc != vm_cc_empty()); + VM_ASSERT(cc->klass != 0); // should be enable + + *(VALUE *)&cc->klass = 0; + RB_DEBUG_COUNTER_INC(cc_ent_invalidate); +} /* calldata */ diff --git a/vm_method.c b/vm_method.c index 5260f2d05c..75f38d386d 100644 --- a/vm_method.c +++ b/vm_method.c @@ -115,18 +115,6 @@ rb_vm_mtbl_dump(const char *msg, VALUE klass, ID target_mid) https://github.com/ruby/ruby/blob/trunk/vm_method.c#L115 vm_mtbl_dump(klass, target_mid); } -void -rb_vm_cc_invalidate(const struct rb_callcache *cc) -{ - VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache)); - VM_ASSERT(cc != vm_cc_empty()); - VM_ASSERT(cc->klass != 0); // should be enable - - *(VALUE *)&cc->klass = 0; - RB_DEBUG_COUNTER_INC(cc_ent_invalidate); -} - - static inline void vm_cme_invalidate(rb_callable_method_entry_t *cme) { -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/