compile.c: dump and error before allocation
* compile.c (iseq_set_sequence): separate instruction dump and error, before allocation of sequence. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
70d6d8ac81
commit
e6d9e4c8c6
@ -1577,10 +1577,10 @@ get_ivar_ic_value(rb_iseq_t *iseq,ID id)
|
|||||||
static int
|
static int
|
||||||
iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
|
iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
|
||||||
{
|
{
|
||||||
struct iseq_line_info_entry *line_info_table = NULL;
|
struct iseq_line_info_entry *line_info_table;
|
||||||
unsigned int last_line = 0;
|
unsigned int last_line = 0;
|
||||||
LINK_ELEMENT *list;
|
LINK_ELEMENT *list;
|
||||||
VALUE *generated_iseq = NULL;
|
VALUE *generated_iseq;
|
||||||
|
|
||||||
int insn_num, code_index, line_info_index, sp, stack_max = 0, line = 0;
|
int insn_num, code_index, line_info_index, sp, stack_max = 0, line = 0;
|
||||||
|
|
||||||
@ -1619,7 +1619,8 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *const anchor)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
BADINSN_ERROR(iseq, line, "unknown list type: %d", list->type);
|
BADINSN_DUMP(anchor, list, NULL);
|
||||||
|
COMPILE_ERROR(iseq, line, "unknown list type: %d", list->type);
|
||||||
return COMPILE_NG;
|
return COMPILE_NG;
|
||||||
}
|
}
|
||||||
list = list->next;
|
list = list->next;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user