This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Merge the direct structure lookup for B::IV:: and B::NV:: into 1 routine.
authorNicholas Clark <nick@ccl4.org>
Sat, 30 Oct 2010 12:43:34 +0000 (13:43 +0100)
committerNicholas Clark <nick@ccl4.org>
Sat, 30 Oct 2010 12:43:34 +0000 (13:43 +0100)
commite4da9d6afe9a3ddc32f2fc43dcdd6b3b4038ce4e
tree6ee4506e45018ecb5aff052b13608a08dfcd8590
parent6829f5e2f12086d827b73097d3d0c7a306c68f16
Merge the direct structure lookup for B::IV:: and B::NV:: into 1 routine.

As for OPs and GPs, encode the type and offset in the XS alias integer.
Use different names for the type macros, to give them different constant
values, to allow the 3 accessor routines to have no gaps in the values used
for the set of types that they deal with. Otherwise, at least 1 switch
statement would compile to a jump table with "holes".

On this platform, this refactoring reduces the object code size by 4.5K.
ext/B/B.xs