ruby-changes:36462
From: normal <ko1@a...>
Date: Sun, 23 Nov 2014 10:50:10 +0900 (JST)
Subject: [ruby-changes:36462] normal:r48543 (trunk): trivial packing of rb_execarg, load_file_arg, args_info
normal 2014-11-23 10:49:57 +0900 (Sun, 23 Nov 2014) New Revision: 48543 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48543 Log: trivial packing of rb_execarg, load_file_arg, args_info * internal.h (struct rb_execarg): 160 => 144 bytes on x86-64 * ruby.c (struct load_file_arg): 48 => 40 bytes on x86-64 * vm_args.c (struct args_info): ditto Modified files: trunk/ChangeLog trunk/internal.h trunk/ruby.c trunk/vm_args.c Index: ChangeLog =================================================================== --- ChangeLog (revision 48542) +++ ChangeLog (revision 48543) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Nov 23 10:46:23 2014 Eric Wong <e@8...> + + * internal.h (struct rb_execarg): 160 => 144 bytes on x86-64 + * ruby.c (struct load_file_arg): 48 => 40 bytes on x86-64 + * vm_args.c (struct args_info): ditto + Sun Nov 23 07:46:54 2014 Andy Maloney <asmaloney@g...> * io.c (rb_io_sysread): Remove redundant assignment of 'n'. Index: internal.h =================================================================== --- internal.h (revision 48542) +++ internal.h (revision 48543) @@ -884,7 +884,6 @@ VALUE rb_block_clear_env_self(VALUE proc https://github.com/ruby/ruby/blob/trunk/internal.h#L884 #define RB_MAX_GROUPS (65536) struct rb_execarg { - int use_shell; union { struct { VALUE shell_script; @@ -900,6 +899,7 @@ struct rb_execarg { https://github.com/ruby/ruby/blob/trunk/internal.h#L899 VALUE envp_str; VALUE envp_buf; VALUE dup2_tmpbuf; + unsigned use_shell : 1; unsigned pgroup_given : 1; unsigned umask_given : 1; unsigned unsetenv_others_given : 1; @@ -916,11 +916,11 @@ struct rb_execarg { https://github.com/ruby/ruby/blob/trunk/internal.h#L916 mode_t umask_mask; rb_uid_t uid; rb_gid_t gid; + int close_others_maxhint; VALUE fd_dup2; VALUE fd_close; VALUE fd_open; VALUE fd_dup2_child; - int close_others_maxhint; VALUE env_modification; /* Qfalse or [[k1,v1], ...] */ VALUE chdir_dir; }; Index: ruby.c =================================================================== --- ruby.c (revision 48542) +++ ruby.c (revision 48543) @@ -1510,9 +1510,9 @@ struct load_file_arg { https://github.com/ruby/ruby/blob/trunk/ruby.c#L1510 VALUE parser; VALUE fname; int script; + int xflag; struct cmdline_options *opt; VALUE f; - int xflag; }; static VALUE Index: vm_args.c =================================================================== --- vm_args.c (revision 48542) +++ vm_args.c (revision 48543) @@ -11,12 +11,12 @@ https://github.com/ruby/ruby/blob/trunk/vm_args.c#L11 struct args_info { /* basic args info */ rb_call_info_t *ci; - int argc; VALUE *argv; + int argc; /* additional args info */ - VALUE *kw_argv; int rest_index; + VALUE *kw_argv; VALUE rest; }; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/