have Win32CORE use ALIAS/XSANY
authorDaniel Dragan <bulk88@hotmail.com>
Tue, 9 Oct 2012 01:00:06 +0000 (21:00 -0400)
committerSteve Hay <steve.m.hay@googlemail.com>
Mon, 15 Oct 2012 07:24:52 +0000 (08:24 +0100)
commit35f601d964ee4d1402116250f95cdafa9dfc4a29
treee49ae3aba49b9519b692d36f6b7438aa61670743
parentae6bdd37b100ecaba3f858c0375997681062d5b6
have Win32CORE use ALIAS/XSANY

Using XSANY in addition to a struct of strings, saved 650 bytes (.rdata
and .text combined, 32bit/MS VC2K3/O1) from the previous implementation of
Win32CORE. Instead of encoding pointers or relative pointer sized offsets
to string literals, use unsigned chars. Instead of creating new XSUB C
function stubs, one per forwarded sub, use the ALIAS/XSANY feature and
have only 1 XSUB which has many names. If a length aware version of newXS
is ever added to perl, the sub names's lengths already are available. See
also commit eff5b9d539e for something similar to this commit.
ext/Win32CORE/Win32CORE.c