[前][次][番号順一覧][スレッド一覧]

ruby-changes:46964

From: nobu <ko1@a...>
Date: Wed, 14 Jun 2017 14:10:34 +0900 (JST)
Subject: [ruby-changes:46964] nobu:r59079 (trunk): compile.c: dump and error before allocation

nobu	2017-06-14 14:10:30 +0900 (Wed, 14 Jun 2017)

  New Revision: 59079

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59079

  Log:
    compile.c: dump and error before allocation
    
    * compile.c (iseq_set_sequence): separate instruction dump and
      error, before allocation of sequence.

  Modified files:
    trunk/compile.c
Index: compile.c
===================================================================
--- compile.c	(revision 59078)
+++ compile.c	(revision 59079)
@@ -1577,10 +1577,10 @@ get_ivar_ic_value(rb_iseq_t *iseq,ID id) https://github.com/ruby/ruby/blob/trunk/compile.c#L1577
 static int
 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;
     LINK_ELEMENT *list;
-    VALUE *generated_iseq = NULL;
+    VALUE *generated_iseq;
 
     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_ https://github.com/ruby/ruby/blob/trunk/compile.c#L1619
 		break;
 	    }
 	  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;
 	}
 	list = list->next;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]