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

ruby-changes:34730

From: normal <ko1@a...>
Date: Mon, 14 Jul 2014 16:09:08 +0900 (JST)
Subject: [ruby-changes:34730] normal:r46813 (trunk): iseq.h (struct iseq_catch_table_entry): shrink to 32 bytes on 64-bit

normal	2014-07-14 16:08:55 +0900 (Mon, 14 Jul 2014)

  New Revision: 46813

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

  Log:
    iseq.h (struct iseq_catch_table_entry): shrink to 32 bytes on 64-bit
    
    * iseq.h (struct iseq_catch_table_entry): shrink to 32 bytes on 64-bit
    
    This drops a few minor page faults on my system at startup.
    Using 64-bit start, end, cont, and sp fields are unnecessary as
    label_get_position and label_get_sp only return int values.
    label_get_position and label_get_sp should probably return
    unsigned, but that is a future change.

  Modified files:
    trunk/ChangeLog
    trunk/iseq.h
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46812)
+++ ChangeLog	(revision 46813)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jul 14 16:07:25 2014  Eric Wong  <e@8...>
+
+	* iseq.h (struct iseq_catch_table_entry): shrink to 32 bytes
+
 Mon Jul 14 16:04:41 2014  Eric Wong  <e@8...>
 
 	* iseq.h (struct iseq_catch_table): new flexible array struct
Index: iseq.h
===================================================================
--- iseq.h	(revision 46812)
+++ iseq.h	(revision 46813)
@@ -62,10 +62,10 @@ struct iseq_catch_table_entry { https://github.com/ruby/ruby/blob/trunk/iseq.h#L62
 	CATCH_TYPE_NEXT   = INT2FIX(6)
     } type;
     VALUE iseq;
-    unsigned long start;
-    unsigned long end;
-    unsigned long cont;
-    unsigned long sp;
+    unsigned int start;
+    unsigned int end;
+    unsigned int cont;
+    unsigned int sp;
 };
 
 PACKED_STRUCT_UNALIGNED(struct iseq_catch_table {

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

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