зеркало из https://github.com/github/ruby.git
Show actual imemo type when unexpected type
This commit is contained in:
Родитель
d31a12a210
Коммит
f3cc1f9a70
|
@ -56,12 +56,12 @@
|
|||
#define RVALUE_SIZE (sizeof(struct RBasic) + sizeof(VALUE[RBIMPL_RVALUE_EMBED_LEN_MAX]))
|
||||
|
||||
#if VM_CHECK_MODE > 0
|
||||
#define VM_ASSERT(expr) RUBY_ASSERT_MESG_WHEN(VM_CHECK_MODE > 0, expr, #expr)
|
||||
#define VM_ASSERT(/*expr, */...) RUBY_ASSERT_WHEN(VM_CHECK_MODE > 0, __VA_ARGS__)
|
||||
#define VM_UNREACHABLE(func) rb_bug(#func ": unreachable")
|
||||
#define RUBY_ASSERT_CRITICAL_SECTION
|
||||
#define RUBY_DEBUG_THREAD_SCHEDULE() rb_thread_schedule()
|
||||
#else
|
||||
#define VM_ASSERT(expr) ((void)0)
|
||||
#define VM_ASSERT(/*expr, */...) ((void)0)
|
||||
#define VM_UNREACHABLE(func) UNREACHABLE
|
||||
#define RUBY_DEBUG_THREAD_SCHEDULE()
|
||||
#endif
|
||||
|
|
|
@ -118,7 +118,7 @@ rb_vm_mtbl_dump(const char *msg, VALUE klass, ID target_mid)
|
|||
static inline void
|
||||
vm_cme_invalidate(rb_callable_method_entry_t *cme)
|
||||
{
|
||||
VM_ASSERT(IMEMO_TYPE_P(cme, imemo_ment));
|
||||
VM_ASSERT(IMEMO_TYPE_P(cme, imemo_ment), "cme: %d", imemo_type((VALUE)cme));
|
||||
VM_ASSERT(callable_method_entry_p(cme));
|
||||
METHOD_ENTRY_INVALIDATED_SET(cme);
|
||||
RB_DEBUG_COUNTER_INC(cc_cme_invalidate);
|
||||
|
|
Загрузка…
Ссылка в новой задаче