summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2018-02-25 21:31:26 -0500
committerKarl Williamson <khw@cpan.org>2018-02-27 12:16:00 -0700
commitf1bfbdda19c74059bee234561325e09c9d0a9708 (patch)
treee55cca31125e7115ff51ba1f707d622a0e79c4ea /handy.h
parenta0da1e165c011c775b9f39a37ab6d3dd6a1c0969 (diff)
downloadperl-f1bfbdda19c74059bee234561325e09c9d0a9708.tar.gz
remove unreferenced copies of char * swash_property_names[]
Due to some MSVC bug or perl's not using MS specific CC options that I've never figured out, MSVC does not remove unreferenced by a single .obj or combine identical, static const data vars. MSVC funcs get removed & combined correctly. Since for var swash_property_names removing it from .objs that dont need it is very easy, do it. It saves some memory space. Perhaps some other platforms/OSes/CCs have similar problems removing unreferenced symbols from final binaries so this patch would help on those CCs too. regexec.c stopped using swash_property_names in commit 2a16ac9277 in 5.19.8 "regexec.c: Use compiled-in POSIX definitions" regcomp.c stopped using swash_property_names in commit bcb875216f in 5.19.8 "regcomp.c: Rmv code for delayed 'til runtime POSIX defns" with MSVC 2008 64, before miniperl.exe disk file size 1761KB .rdata virtual size 0xBC354 bytes perl527.dll disk file size 2040KB .rdata virtual size 0xC9421 bytes after this commit miniperl.exe disk file size 1761KB .rdata virtual size 0xBC2C4 bytes perl527.dll disk file size 2040KB .rdata virtual size 0xC9381 bytes ~144 bytes saved by removing unused copies of swash_property_names array. There are other cases of large duplicate static const data vars still in the perl527.dll binary but this patch covers a very simple case.
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/handy.h b/handy.h
index 12d73b9087..7fe1cf6caa 100644
--- a/handy.h
+++ b/handy.h
@@ -1216,9 +1216,7 @@ typedef enum {
#define POSIX_SWASH_COUNT _FIRST_NON_SWASH_CC
#define POSIX_CC_COUNT (_HIGHEST_REGCOMP_DOT_H_SYNC + 1)
-#if defined(PERL_IN_UTF8_C) \
- || defined(PERL_IN_REGCOMP_C) \
- || defined(PERL_IN_REGEXEC_C)
+#if defined(PERL_IN_UTF8_C)
# if _CC_WORDCHAR != 0 || _CC_DIGIT != 1 || _CC_ALPHA != 2 || _CC_LOWER != 3 \
|| _CC_UPPER != 4 || _CC_PUNCT != 5 || _CC_PRINT != 6 \
|| _CC_ALPHANUMERIC != 7 || _CC_GRAPH != 8 || _CC_CASED != 9