From a635a468bb6e332add6d70c1a1aef7623c6cf2a5 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 11 Apr 2017 04:17:45 +0000 Subject: vm_insnhelper.c: CHECK_CFP_CONSISTENCY * vm_insnhelper.c (CHECK_CFP_CONSISTENCY): make [BUG] messages consistent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_eval.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'vm_eval.c') diff --git a/vm_eval.c b/vm_eval.c index d820f628b5..ed9463da79 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -92,9 +92,7 @@ vm_call0_cfunc(rb_thread_t* th, struct rb_calling_info *calling, const struct rb th->passed_ci = 0; } else { - if (reg_cfp != th->cfp + 1) { - rb_bug("vm_call0_cfunc: cfp consistency error"); - } + CHECK_CFP_CONSISTENCY("vm_call0_cfunc"); VM_PROFILE_UP(C2C_POPF); rb_vm_pop_frame(th); } @@ -131,9 +129,7 @@ vm_call0_cfunc_with_frame(rb_thread_t* th, struct rb_calling_info *calling, cons VM_PROFILE_UP(C2C_CALL); val = (*cfunc->invoker)(cfunc->func, recv, argc, argv); - if (UNLIKELY(reg_cfp != th->cfp + 1)) { - rb_bug("vm_call0_cfunc_with_frame: cfp consistency error"); - } + CHECK_CFP_CONSISTENCY("vm_call0_cfunc_with_frame"); VM_PROFILE_UP(C2C_POPF); rb_vm_pop_frame(th); } -- cgit v1.2.3