summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-13 07:01:09 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-13 07:01:09 +0000
commit499f6d62c7f0039e4c047b2fce605bb17f52f453 (patch)
treecbe2afa23196f63a2d7c6d5b10e48354159bbb47 /vm_core.h
parentda16701b45350cd9b68bc7a4f9463ad27e99cb83 (diff)
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/vm_core.h b/vm_core.h
index 63e53a5d11..c71b83c70d 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -204,6 +204,7 @@ struct rb_iseq_struct {
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 {
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;