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

ruby-changes:34871

From: normal <ko1@a...>
Date: Sat, 26 Jul 2014 06:47:30 +0900 (JST)
Subject: [ruby-changes:34871] normal:r46954 (trunk): struct parse_params: trivial packing

normal	2014-07-26 06:47:20 +0900 (Sat, 26 Jul 2014)

  New Revision: 46954

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

  Log:
    struct parse_params: trivial packing
    
    * parse.y (struct parse_params): shrink to 320 to 304 bytes on 64-bit
    
    Some elements may be removed/resized as well, but not as important
    as reducing more-frequently allocated structures.

  Modified files:
    trunk/ChangeLog
    trunk/parse.y
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46953)
+++ ChangeLog	(revision 46954)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Jul 26 06:44:43 2014  Eric Wong  <e@8...>
+
+	* parse.y (struct parse_params): shrink to 320 to 304 bytes on 64-bit
+
 Sat Jul 26 05:58:35 2014  Eric Wong  <e@8...>
 
 	* include/ruby/ruby.h (ZALLOC, ZALLOC_N): implement
Index: parse.y
===================================================================
--- parse.y	(revision 46953)
+++ parse.y	(revision 46954)
@@ -216,10 +216,9 @@ struct parser_params { https://github.com/ruby/ruby/blob/trunk/parse.y#L216
     VALUE eofp;
 
     NODE *parser_lex_strterm;
-    enum lex_state_e parser_lex_state;
     stack_type parser_cond_stack;
     stack_type parser_cmdarg_stack;
-    int is_ripper;
+    enum lex_state_e parser_lex_state;
     int parser_class_nest;
     int parser_paren_nest;
     int parser_lpar_beg;
@@ -234,6 +233,7 @@ struct parser_params { https://github.com/ruby/ruby/blob/trunk/parse.y#L233
     int parser_tokidx;
     int parser_toksiz;
     int parser_tokline;
+    int is_ripper; /* bool, seems unused */
     VALUE parser_lex_input;
     VALUE parser_lex_lastline;
     VALUE parser_lex_nextline;
@@ -249,8 +249,8 @@ struct parser_params { https://github.com/ruby/ruby/blob/trunk/parse.y#L249
     int parser_ruby__end__seen;
     int line_count;
     int has_shebang;
-    char *parser_ruby_sourcefile; /* current source file */
     int parser_ruby_sourceline;	/* current line no. */
+    char *parser_ruby_sourcefile; /* current source file */
     VALUE parser_ruby_sourcefile_string;
     rb_encoding *enc;
 

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

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