summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-13 03:20:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-13 03:20:12 +0000
commitbe1d07ca37d58b2d5fbd34c245d1461792396d89 (patch)
tree9c2fd379d9feeaf02c80b50e0296d8ae45fae20a
parenteb0777e86533f999d90f679469174056158d3f30 (diff)
* compile.c (dump_disasm_list_with_cursor): replace with
dump_disasm_list_with_cursor_dest. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--compile.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/compile.c b/compile.c
index ba4ca76..1c03bd1 100644
--- a/compile.c
+++ b/compile.c
@@ -428,8 +428,7 @@ freeze_hide_obj(VALUE obj)
#define gl_node_level ISEQ_COMPILE_DATA(iseq)->node_level
#endif
-static void dump_disasm_list_with_cursor_dest(const LINK_ELEMENT *link, const LINK_ELEMENT *curr, const LABEL *dest);
-static void dump_disasm_list_with_cursor(const LINK_ELEMENT *elem, const LINK_ELEMENT *curr);
+static void dump_disasm_list_with_cursor(const LINK_ELEMENT *link, const LINK_ELEMENT *curr, const LABEL *dest);
static void dump_disasm_list(const LINK_ELEMENT *elem);
static int insn_data_length(INSN *iobj);
@@ -1563,10 +1562,13 @@ get_ivar_ic_value(rb_iseq_t *iseq,ID id)
return val;
}
+#define BADINSN_DUMP(anchor, list, dest) \
+ dump_disasm_list_with_cursor(&anchor->anchor, list, dest)
+
#define BADINSN_ERROR \
(generated_iseq ? xfree(generated_iseq) : 0, \
line_info_table ? xfree(line_info_table) : 0, \
- dump_disasm_list_with_cursor(&anchor->anchor, list), \
+ BADINSN_DUMP(anchor, list, NULL), \
COMPILE_ERROR)
/**
@@ -2664,7 +2666,7 @@ insn_set_sc_state(rb_iseq_t *iseq, const LINK_ELEMENT *anchor, INSN *iobj, int s
if (lobj->sc_state != 0) {
if (lobj->sc_state != nstate) {
- dump_disasm_list_with_cursor_dest(anchor, &iobj->link, lobj);
+ BADINSN_DUMP(anchor, iobj, lobj);
COMPILE_ERROR(iseq, iobj->line_no,
"insn_set_sc_state error: %d at "LABEL_FORMAT
", %d expected\n",
@@ -6520,17 +6522,11 @@ insn_data_to_s_detail(INSN *iobj)
static void
dump_disasm_list(const LINK_ELEMENT *link)
{
- dump_disasm_list_with_cursor(link, NULL);
-}
-
-static void
-dump_disasm_list_with_cursor(const LINK_ELEMENT *link, const LINK_ELEMENT *curr)
-{
- dump_disasm_list_with_cursor_dest(link, curr, NULL);
+ dump_disasm_list_with_cursor(link, NULL, NULL);
}
static void
-dump_disasm_list_with_cursor_dest(const LINK_ELEMENT *link, const LINK_ELEMENT *curr, const LABEL *dest)
+dump_disasm_list_with_cursor(const LINK_ELEMENT *link, const LINK_ELEMENT *curr, const LABEL *dest)
{
int pos = 0;
INSN *iobj;