1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

iseq.h (struct iseq_catch_table_entry): shrink to 32 bytes on 64-bit

* iseq.h (struct iseq_catch_table_entry): shrink to 32 bytes on 64-bit

This drops a few minor page faults on my system at startup.
Using 64-bit start, end, cont, and sp fields are unnecessary as
label_get_position and label_get_sp only return int values.
label_get_position and label_get_sp should probably return
unsigned, but that is a future change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2014-07-14 07:08:55 +00:00
parent b811194e57
commit 34f7e9086f
2 changed files with 8 additions and 4 deletions

View file

@ -1,3 +1,7 @@
Mon Jul 14 16:07:25 2014 Eric Wong <e@80x24.org>
* iseq.h (struct iseq_catch_table_entry): shrink to 32 bytes
Mon Jul 14 16:04:41 2014 Eric Wong <e@80x24.org> Mon Jul 14 16:04:41 2014 Eric Wong <e@80x24.org>
* iseq.h (struct iseq_catch_table): new flexible array struct * iseq.h (struct iseq_catch_table): new flexible array struct

8
iseq.h
View file

@ -62,10 +62,10 @@ struct iseq_catch_table_entry {
CATCH_TYPE_NEXT = INT2FIX(6) CATCH_TYPE_NEXT = INT2FIX(6)
} type; } type;
VALUE iseq; VALUE iseq;
unsigned long start; unsigned int start;
unsigned long end; unsigned int end;
unsigned long cont; unsigned int cont;
unsigned long sp; unsigned int sp;
}; };
PACKED_STRUCT_UNALIGNED(struct iseq_catch_table { PACKED_STRUCT_UNALIGNED(struct iseq_catch_table {