mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
eb0777e865
commit
be1d07ca37
1 changed files with 8 additions and 12 deletions
20
compile.c
20
compile.c
|
@ -428,8 +428,7 @@ freeze_hide_obj(VALUE obj)
|
||||||
#define gl_node_level ISEQ_COMPILE_DATA(iseq)->node_level
|
#define gl_node_level ISEQ_COMPILE_DATA(iseq)->node_level
|
||||||
#endif
|
#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 *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(const LINK_ELEMENT *elem);
|
static void dump_disasm_list(const LINK_ELEMENT *elem);
|
||||||
|
|
||||||
static int insn_data_length(INSN *iobj);
|
static int insn_data_length(INSN *iobj);
|
||||||
|
@ -1563,10 +1562,13 @@ get_ivar_ic_value(rb_iseq_t *iseq,ID id)
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define BADINSN_DUMP(anchor, list, dest) \
|
||||||
|
dump_disasm_list_with_cursor(&anchor->anchor, list, dest)
|
||||||
|
|
||||||
#define BADINSN_ERROR \
|
#define BADINSN_ERROR \
|
||||||
(generated_iseq ? xfree(generated_iseq) : 0, \
|
(generated_iseq ? xfree(generated_iseq) : 0, \
|
||||||
line_info_table ? xfree(line_info_table) : 0, \
|
line_info_table ? xfree(line_info_table) : 0, \
|
||||||
dump_disasm_list_with_cursor(&anchor->anchor, list), \
|
BADINSN_DUMP(anchor, list, NULL), \
|
||||||
COMPILE_ERROR)
|
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 != 0) {
|
||||||
if (lobj->sc_state != nstate) {
|
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,
|
COMPILE_ERROR(iseq, iobj->line_no,
|
||||||
"insn_set_sc_state error: %d at "LABEL_FORMAT
|
"insn_set_sc_state error: %d at "LABEL_FORMAT
|
||||||
", %d expected\n",
|
", %d expected\n",
|
||||||
|
@ -6520,17 +6522,11 @@ insn_data_to_s_detail(INSN *iobj)
|
||||||
static void
|
static void
|
||||||
dump_disasm_list(const LINK_ELEMENT *link)
|
dump_disasm_list(const LINK_ELEMENT *link)
|
||||||
{
|
{
|
||||||
dump_disasm_list_with_cursor(link, NULL);
|
dump_disasm_list_with_cursor(link, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dump_disasm_list_with_cursor(const LINK_ELEMENT *link, const LINK_ELEMENT *curr)
|
dump_disasm_list_with_cursor(const LINK_ELEMENT *link, const LINK_ELEMENT *curr, const LABEL *dest)
|
||||||
{
|
|
||||||
dump_disasm_list_with_cursor_dest(link, curr, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
dump_disasm_list_with_cursor_dest(const LINK_ELEMENT *link, const LINK_ELEMENT *curr, const LABEL *dest)
|
|
||||||
{
|
{
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
INSN *iobj;
|
INSN *iobj;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue