aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-24 07:31:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-24 07:31:56 +0000
commited6b6cbe801b1beb140e62d3d1c435a227f8885c (patch)
treec763ce4b7d4ddcb40b45e2500a1d3b11ca606c26 /compile.c
parent90f93333aa4a3be4037e293a3a795ec89cee608f (diff)
downloadruby-ed6b6cbe801b1beb140e62d3d1c435a227f8885c.tar.gz
compile.c: show failed instructions
* compile.c (iseq_set_sequence): show failed instructions at adjuststack mismatch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index fcadf29cc2..64916e3e96 100644
--- a/compile.c
+++ b/compile.c
@@ -1000,6 +1000,8 @@ debug_list(ISEQ_ARG_DECLARE LINK_ANCHOR *const anchor)
#if CPDEBUG < 0
#define debug_list(anc) debug_list(iseq, (anc))
#endif
+#else
+#define debug_list(anc) ((void)0)
#endif
static LABEL *
@@ -1914,11 +1916,13 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
generated_iseq[code_index++] = BIN(pop);
}
else if (diff < 0) {
+ int label_no = adjust->label ? adjust->label->label_no : -1;
xfree(generated_iseq);
xfree(line_info_table);
+ debug_list(anchor);
COMPILE_ERROR(iseq, adjust->line_no,
- "iseq_set_sequence: adjust bug %d < %d",
- orig_sp, sp);
+ "iseq_set_sequence: adjust bug to %d %d < %d",
+ label_no, orig_sp, sp);
return COMPILE_NG;
}
}