ruby-changes:46822
From: nobu <ko1@a...>
Date: Sun, 28 May 2017 18:49:35 +0900 (JST)
Subject: [ruby-changes:46822] nobu:r58937 (trunk): ruby.c: shrink ruby_cmdline_options_t
nobu 2017-05-28 18:49:29 +0900 (Sun, 28 May 2017) New Revision: 58937 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58937 Log: ruby.c: shrink ruby_cmdline_options_t * ruby.c (ruby_cmdline_options_t): reordered members and turned simple flags into bit fields to reduce the size (136->104 on LP64). Modified files: trunk/ruby.c Index: ruby.c =================================================================== --- ruby.c (revision 58936) +++ ruby.c (revision 58937) @@ -122,15 +122,6 @@ enum dump_flag_bits { https://github.com/ruby/ruby/blob/trunk/ruby.c#L122 typedef struct ruby_cmdline_options ruby_cmdline_options_t; struct ruby_cmdline_options { - int sflag, xflag; - int do_loop, do_print; - int do_line, do_split; - int do_search; - unsigned int features; - int verbose; - int safe_level; - unsigned int setids; - unsigned int dump; const char *script; VALUE script_name; VALUE e_script; @@ -141,7 +132,18 @@ struct ruby_cmdline_options { https://github.com/ruby/ruby/blob/trunk/ruby.c#L132 } enc; } src, ext, intern; VALUE req_list; + unsigned int features; + unsigned int dump; + int safe_level; + int sflag, xflag; unsigned int warning: 1; + unsigned int verbose: 1; + unsigned int do_loop: 1; + unsigned int do_print: 1; + unsigned int do_line: 1; + unsigned int do_split: 1; + unsigned int do_search: 1; + unsigned int setids: 2; }; static void init_ids(ruby_cmdline_options_t *); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/