1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Partial revert of ceebc7fc98

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.
This commit is contained in:
Aaron Patterson 2021-06-28 15:00:35 -07:00 committed by Alan Wu
parent b385f31188
commit 0d63600e4f
3 changed files with 11 additions and 14 deletions

2
gc.c
View file

@ -2907,7 +2907,7 @@ vm_ccs_free(struct rb_class_cc_entries *ccs, int alive, rb_objspace_t *objspace,
asan_poison_object((VALUE)cc);
}
}
rb_vm_cc_invalidate(cc);
vm_cc_invalidate(cc);
}
ruby_xfree(ccs->entries);
}

View file

@ -409,7 +409,16 @@ vm_cc_method_missing_reason_set(const struct rb_callcache *cc, enum method_missi
*(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 */

View file

@ -115,18 +115,6 @@ rb_vm_mtbl_dump(const char *msg, VALUE klass, ID target_mid)
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)
{