summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-08-26 15:34:25 -0600
committerKarl Williamson <khw@cpan.org>2014-09-06 21:12:05 -0600
commit8e35b0561082715dcfa5b85db6cfb4fd650e72f1 (patch)
treefa89f495b9ee94ad55a0ad41ab723330973a169b /handy.h
parent549b4e78e20d6b000653c2b3d043c46bf7ba0d57 (diff)
downloadperl-8e35b0561082715dcfa5b85db6cfb4fd650e72f1.tar.gz
regcomp.c: Make macro a lookup
The recently introduced macro isMNEMONIC_CNTRL has a look-up and several tests in it, which occupy time and space. Since it was only used for debugging, that did not matter much, but future commits will use it in more mainline code. This commit changes it to be a single look-up, using up one of the spare bits available for that purpose in PL_charclass. There are enough available bits that we aren't likely to run out, really ever. (We can always add a 2nd word of bits if necessary.)
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/handy.h b/handy.h
index 0ee6774ca7..511bba373a 100644
--- a/handy.h
+++ b/handy.h
@@ -963,7 +963,8 @@ patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc
# define _CC_QUOTEMETA 21
# define _CC_NON_FINAL_FOLD 22
# define _CC_IS_IN_SOME_FOLD 23
-/* Unused: 24-31
+# define _CC_MNEMONIC_CNTRL 24
+/* Unused: 25-31
* If more bits are needed, one could add a second word for non-64bit
* QUAD_IS_INT systems, using some #ifdefs to distinguish between having a 2nd
* word or not. The IS_IN_SOME_FOLD bit is the most easily expendable, as it
@@ -1096,6 +1097,8 @@ EXTCONST U32 PL_charclass[];
_generic_isCC(c, _CC_NON_FINAL_FOLD)
# define _IS_IN_SOME_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C(c) \
_generic_isCC(c, _CC_IS_IN_SOME_FOLD)
+# define _IS_MNEMONIC_CNTRL_ONLY_FOR_USE_BY_REGCOMP_DOT_C(c) \
+ _generic_isCC(c, _CC_MNEMONIC_CNTRL)
#else /* else we don't have perl.h */
/* If we don't have perl.h, we are compiling a utility program. Below we