vm_insnhelper.c: vm_stack_consistency_error
* vm_insnhelper.c (vm_stack_consistency_error): extracted from insns.def for further info in the future. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
83d1fdeee5
commit
02fa3456ce
@ -913,8 +913,7 @@ leave
|
|||||||
if (OPT_CHECKED_RUN) {
|
if (OPT_CHECKED_RUN) {
|
||||||
const VALUE *const bp = vm_base_ptr(reg_cfp);
|
const VALUE *const bp = vm_base_ptr(reg_cfp);
|
||||||
if (reg_cfp->sp != bp) {
|
if (reg_cfp->sp != bp) {
|
||||||
rb_bug("Stack consistency error (sp: %"PRIdPTRDIFF", bp: %"PRIdPTRDIFF")",
|
vm_stack_consistency_error(th, reg_cfp, bp);
|
||||||
VM_SP_CNT(th, reg_cfp->sp), VM_SP_CNT(th, bp));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3297,6 +3297,22 @@ vm_case_dispatch(CDHASH hash, OFFSET else_offset, VALUE key)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NORETURN(static void
|
||||||
|
vm_stack_consistency_error(rb_thread_t *,
|
||||||
|
const rb_control_frame_t *,
|
||||||
|
const VALUE *));
|
||||||
|
static void
|
||||||
|
vm_stack_consistency_error(rb_thread_t *th,
|
||||||
|
const rb_control_frame_t *cfp,
|
||||||
|
const VALUE *bp)
|
||||||
|
{
|
||||||
|
const ptrdiff_t nsp = VM_SP_CNT(th, cfp->sp);
|
||||||
|
const ptrdiff_t nbp = VM_SP_CNT(th, bp);
|
||||||
|
static const char stack_consistency_error[] =
|
||||||
|
"Stack consistency error (sp: %"PRIdPTRDIFF", bp: %"PRIdPTRDIFF")";
|
||||||
|
rb_bug(stack_consistency_error, nsp, nbp);
|
||||||
|
}
|
||||||
|
|
||||||
enum binop_operands_type {
|
enum binop_operands_type {
|
||||||
bot_others = 0,
|
bot_others = 0,
|
||||||
bot_fixnum,
|
bot_fixnum,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user