aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-02 07:31:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-02 07:31:23 +0000
commite917af64014746de9658e1a9ddb3fd134520c0e6 (patch)
tree53818d023b4a70e1051cc2990a3fb0034b97ae53 /compile.c
parent2a66cc554db6263bc04c804ad62750497c26a772 (diff)
downloadruby-e917af64014746de9658e1a9ddb3fd134520c0e6.tar.gz
compile.c: fix the element
* compile.c (iseq_set_sequence): fix the element for line number to rb_compile_bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/compile.c b/compile.c
index d234c5c742..d84f487ba4 100644
--- a/compile.c
+++ b/compile.c
@@ -1486,8 +1486,6 @@ cdhash_set_label_i(VALUE key, VALUE val, void *ptr)
static int
iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
{
- LABEL *lobj;
- INSN *iobj;
struct iseq_line_info_entry *line_info_table;
unsigned int last_line = 0;
LINK_ELEMENT *list;
@@ -1502,7 +1500,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
switch (list->type) {
case ISEQ_ELEMENT_INSN:
{
- iobj = (INSN *)list;
+ INSN *iobj = (INSN *)list;
line = iobj->line_no;
code_index += insn_data_length(iobj);
insn_num++;
@@ -1510,7 +1508,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
}
case ISEQ_ELEMENT_LABEL:
{
- lobj = (LABEL *)list;
+ LABEL *lobj = (LABEL *)list;
lobj->position = code_index;
lobj->set = TRUE;
break;
@@ -1558,8 +1556,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
int j, len, insn;
const char *types;
VALUE *operands;
-
- iobj = (INSN *)list;
+ INSN *iobj = (INSN *)list;
/* update sp */
sp = calc_sp_depth(sp, iobj);
@@ -1593,7 +1590,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
case TS_OFFSET:
{
/* label(destination position) */
- lobj = (LABEL *)operands[j];
+ LABEL *lobj = (LABEL *)operands[j];
if (!lobj->set) {
COMPILE_ERROR((ruby_sourcefile, iobj->line_no,
"unknown label"));
@@ -1704,7 +1701,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
}
case ISEQ_ELEMENT_LABEL:
{
- lobj = (LABEL *)list;
+ LABEL *lobj = (LABEL *)list;
if (lobj->sp == -1) {
lobj->sp = sp;
}
@@ -1746,7 +1743,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
generated_iseq[code_index++] = BIN(nop);
}
else {
- rb_compile_bug(ruby_sourcefile, iobj->line_no,
+ rb_compile_bug(ruby_sourcefile, adjust->line_no,
"iseq_set_sequence: adjust bug %d < %d", orig_sp, sp);
}
}