diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | iseq.c | 20 |
2 files changed, 12 insertions, 13 deletions
@@ -1,3 +1,8 @@ +Fri Jan 8 09:33:59 2016 Shugo Maeda <shugo@ruby-lang.org> + + * iseq.c (rb_iseq_compile_with_option): move variable initialization + code to avoid maybe-uninitialized warnings by gcc 4.8. + Fri Jan 8 00:03:22 2016 Shugo Maeda <shugo@ruby-lang.org> * enum.c (enum_min, enum_max): do the same optimization as r53454. @@ -605,28 +605,22 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE absolute_path, VALUE li rb_iseq_t *iseq = NULL; const rb_iseq_t *const parent = base_block ? base_block->iseq : NULL; rb_compile_option_t option; - VALUE label; const enum iseq_type type = parent ? ISEQ_TYPE_EVAL : ISEQ_TYPE_TOP; - int ln = NUM2INT(line); - NODE *(*parse)(VALUE vparser, VALUE fname, VALUE file, int start) = - (RB_TYPE_P(src, T_FILE) ? - rb_parser_compile_file_path : - (StringValue(src), rb_parser_compile_string_path)); StringValueCStr(file); make_compile_option(&option, opt); - if (parent) { - label = parent->body->location.label; - } - else { - label = rb_fstring_cstr("<compiled>"); - } - th->base_block = base_block; TH_PUSH_TAG(th); if ((state = EXEC_TAG()) == 0) { + VALUE label = parent ? parent->body->location.label : + rb_fstring_cstr("<compiled>"); + int ln = NUM2INT(line); + NODE *(*parse)(VALUE vparser, VALUE fname, VALUE file, int start) = + (RB_TYPE_P(src, T_FILE) ? + rb_parser_compile_file_path : + (StringValue(src), rb_parser_compile_string_path)); NODE *node = (*parse)(rb_parser_new(), file, src, ln); if (node) { /* TODO: check err */ iseq = rb_iseq_new_with_opt(node, label, file, absolute_path, line, |