assert cc->cme_ != NULL
when `vm_cc_markable(cc)`.
This commit is contained in:
parent
b2255153cf
commit
8d7116552d
Notes:
git
2021-11-17 22:22:04 +09:00
@ -321,10 +321,19 @@ vm_cc_class_check(const struct rb_callcache *cc, VALUE klass)
|
|||||||
return cc->klass == klass;
|
return cc->klass == klass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
vm_cc_markable(const struct rb_callcache *cc)
|
||||||
|
{
|
||||||
|
VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
|
||||||
|
return FL_TEST_RAW((VALUE)cc, VM_CALLCACHE_UNMARKABLE) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
static inline const struct rb_callable_method_entry_struct *
|
static inline const struct rb_callable_method_entry_struct *
|
||||||
vm_cc_cme(const struct rb_callcache *cc)
|
vm_cc_cme(const struct rb_callcache *cc)
|
||||||
{
|
{
|
||||||
VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
|
VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
|
||||||
|
VM_ASSERT(!vm_cc_markable(cc) || cc->cme_ != NULL);
|
||||||
|
|
||||||
return cc->cme_;
|
return cc->cme_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -350,13 +359,6 @@ vm_cc_cmethod_missing_reason(const struct rb_callcache *cc)
|
|||||||
return cc->aux_.method_missing_reason;
|
return cc->aux_.method_missing_reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
|
||||||
vm_cc_markable(const struct rb_callcache *cc)
|
|
||||||
{
|
|
||||||
VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
|
|
||||||
return FL_TEST_RAW((VALUE)cc, VM_CALLCACHE_UNMARKABLE) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
vm_cc_invalidated_p(const struct rb_callcache *cc)
|
vm_cc_invalidated_p(const struct rb_callcache *cc)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user