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

ruby-changes:39260

From: ko1 <ko1@a...>
Date: Wed, 22 Jul 2015 20:21:39 +0900 (JST)
Subject: [ruby-changes:39260] ko1:r51341 (trunk): * vm_core.h: modify layout of rb_iseq_constant_body.

ko1	2015-07-22 20:21:21 +0900 (Wed, 22 Jul 2015)

  New Revision: 51341

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

  Log:
    * vm_core.h: modify layout of rb_iseq_constant_body.
      Move frequent accesssing fields to upper part.

  Modified files:
    trunk/ChangeLog
    trunk/vm_core.h
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51340)
+++ ChangeLog	(revision 51341)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jul 22 20:17:51 2015  Koichi Sasada  <ko1@a...>
+
+	* vm_core.h: modify layout of rb_iseq_constant_body.
+
+	  Move frequent accesssing fields to upper part.
+
 Wed Jul 22 19:57:47 2015  Koichi Sasada  <ko1@a...>
 
 	* vm_core.h: remove unused declaration of
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 51340)
+++ vm_core.h	(revision 51341)
@@ -251,29 +251,11 @@ struct rb_iseq_constant_body { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L251
     } type;              /* instruction sequence type */
 
     int stack_max; /* for stack overflow check */
-
-    rb_iseq_location_t location;
-
-    VALUE *iseq_encoded; /* encoded iseq (insn addr and operands) */
-    unsigned int iseq_size;
-    unsigned int line_info_size;
-
-    const VALUE mark_ary;     /* Array: includes operands which should be GC marked */
-
-    /* insn info, must be freed */
-    struct iseq_line_info_entry *line_info_table;
-
-    ID *local_table;		/* must free */
-    int local_table_size;
-
     /* sizeof(vars) + 1 */
     int local_size;
 
-    union iseq_inline_storage_entry *is_entries;
-    int is_size;
-
-    int callinfo_size;
-    rb_call_info_t *callinfo_entries;
+    unsigned int iseq_size;
+    VALUE *iseq_encoded; /* encoded iseq (insn addr and operands) */
 
     /**
      * parameter information
@@ -345,12 +327,28 @@ struct rb_iseq_constant_body { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L327
 	} *keyword;
     } param;
 
+    rb_iseq_location_t location;
+
+    /* insn info, must be freed */
+    struct iseq_line_info_entry *line_info_table;
+
+    ID *local_table;		/* must free */
+
     /* catch table */
     struct iseq_catch_table *catch_table;
 
     /* for child iseq */
     const struct rb_iseq_struct *parent_iseq;
     struct rb_iseq_struct *local_iseq; /* local_iseq->flip_cnt can be modified */
+
+    union iseq_inline_storage_entry *is_entries;
+    rb_call_info_t *callinfo_entries;
+    const VALUE mark_ary;     /* Array: includes operands which should be GC marked */
+
+    int local_table_size;
+    int is_size;
+    int callinfo_size;
+    unsigned int line_info_size;
 };
 
 struct rb_iseq_variable_body {

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

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