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

ruby-changes:4602

From: ko1@a...
Date: Sun, 20 Apr 2008 15:01:43 +0900 (JST)
Subject: [ruby-changes:4602] nobu - Ruby:r16096 (trunk): * vm_core.h (struct iseq_compile_data): moved label_no from

nobu	2008-04-20 15:01:28 +0900 (Sun, 20 Apr 2008)

  New Revision: 16096

  Modified files:
    trunk/ChangeLog
    trunk/compile.c
    trunk/vm_core.h

  Log:
    * vm_core.h (struct iseq_compile_data): moved label_no from
      new_label_body().


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/compile.c?r1=16096&r2=16095&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16096&r2=16095&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/vm_core.h?r1=16096&r2=16095&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 16095)
+++ ChangeLog	(revision 16096)
@@ -1,5 +1,8 @@
-Sun Apr 20 15:00:48 2008  Nobuyoshi Nakada  <nobu@r...>
+Sun Apr 20 15:01:25 2008  Nobuyoshi Nakada  <nobu@r...>
 
+	* vm_core.h (struct iseq_compile_data): moved label_no from
+	  new_label_body().
+
 	* compile.c (iseq_set_exception_table): allocates catch_table only
 	  when entries exist.
 
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 16095)
+++ vm_core.h	(revision 16096)
@@ -162,6 +162,7 @@
     struct iseq_compile_data_storage *storage_current;
     int last_line;
     int flip_cnt;
+    int label_no;
     int node_level;
     const rb_compile_option_t *option;
 };
Index: compile.c
===================================================================
--- compile.c	(revision 16095)
+++ compile.c	(revision 16096)
@@ -625,12 +625,11 @@
 new_label_body(rb_iseq_t *iseq, int line)
 {
     LABEL *labelobj = compile_data_alloc_label(iseq);
-    static int label_no = 0;
 
     labelobj->link.type = ISEQ_ELEMENT_LABEL;
     labelobj->link.next = 0;
 
-    labelobj->label_no = label_no++;
+    labelobj->label_no = iseq->compile_data->label_no++;
     labelobj->sc_state = 0;
     labelobj->sp = -1;
     return labelobj;

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

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