ruby-changes:34715
From: normal <ko1@a...>
Date: Sun, 13 Jul 2014 16:01:46 +0900 (JST)
Subject: [ruby-changes:34715] normal:r46798 (trunk): vm_core.h (struct rb_iseq_struct): stack_max is uint32_t
normal 2014-07-13 16:01:09 +0900 (Sun, 13 Jul 2014) New Revision: 46798 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46798 Log: vm_core.h (struct rb_iseq_struct): stack_max is uint32_t * vm_core.h (struct rb_iseq_struct): stack_max is uint32_t No program will ever need more than a few megabytes of stack, so there's no sense in using a 64-bit counter for stack accounting. Packing this with the 32-bit type enum reduces rb_iseq_struct from 312 to 304 bytes on 64-bit systems. Modified files: trunk/ChangeLog trunk/vm_core.h Index: ChangeLog =================================================================== --- ChangeLog (revision 46797) +++ ChangeLog (revision 46798) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Jul 13 15:53:25 2014 Eric Wong <e@8...> + + * vm_core.h (struct rb_iseq_struct): stack_max is uint32_t + Sun Jul 13 10:56:26 2014 Nobuyoshi Nakada <nobu@r...> * configure.in (rb_cv_broken_backtrace): exit with failure Index: vm_core.h =================================================================== --- vm_core.h (revision 46797) +++ vm_core.h (revision 46798) @@ -204,6 +204,7 @@ struct rb_iseq_struct { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L204 ISEQ_TYPE_MAIN, ISEQ_TYPE_DEFINED_GUARD } type; /* instruction sequence type */ + uint32_t stack_max; /* for stack overflow check */ rb_iseq_location_t location; @@ -271,8 +272,6 @@ struct rb_iseq_struct { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L272 int arg_keyword_required; ID *arg_keyword_table; - size_t stack_max; /* for stack overflow check */ - /* catch table */ struct iseq_catch_table_entry *catch_table; int catch_table_size; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/