зеркало из https://github.com/github/ruby.git
Stringize VM_ASSERT expression before expansion
This commit is contained in:
Родитель
196d59f690
Коммит
21dfe34aae
|
@ -56,7 +56,8 @@
|
|||
#define RVALUE_SIZE (sizeof(struct RBasic) + sizeof(VALUE[RBIMPL_RVALUE_EMBED_LEN_MAX]))
|
||||
|
||||
#if VM_CHECK_MODE > 0
|
||||
#define VM_ASSERT(/*expr, */...) RUBY_ASSERT_WHEN(VM_CHECK_MODE > 0, __VA_ARGS__)
|
||||
#define VM_ASSERT(expr, ...) \
|
||||
RUBY_ASSERT_MESG_WHEN(VM_CHECK_MODE > 0, expr, #expr RBIMPL_VA_OPT_ARGS(__VA_ARGS__))
|
||||
#define VM_UNREACHABLE(func) rb_bug(#func ": unreachable")
|
||||
#define RUBY_ASSERT_CRITICAL_SECTION
|
||||
#define RUBY_DEBUG_THREAD_SCHEDULE() rb_thread_schedule()
|
||||
|
|
|
@ -2189,7 +2189,7 @@ rb_vm_search_method_slowpath(const struct rb_callinfo *ci, VALUE klass)
|
|||
{
|
||||
const struct rb_callcache *cc;
|
||||
|
||||
VM_ASSERT(RB_TYPE_P(klass, T_CLASS) || RB_TYPE_P(klass, T_ICLASS));
|
||||
VM_ASSERT(RB_TYPE_P(klass, T_CLASS) || RB_TYPE_P(klass, T_ICLASS), "klass=%"PRIxVALUE", type=%d", klass, TYPE(klass));
|
||||
|
||||
RB_VM_LOCK_ENTER();
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче