This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regexp.h Remove unused bit placeholders
authorKarl Williamson <khw@cpan.org>
Fri, 12 Sep 2014 20:40:03 +0000 (14:40 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 29 Sep 2014 17:07:39 +0000 (11:07 -0600)
We do not need a placeholder for unused flag bits.  And removing them
makes the generated regnodes.h more accurate as to what bits are
available.

regexp.h
regnodes.h

index 5468f95..cf21c39 100644 (file)
--- a/regexp.h
+++ b/regexp.h
@@ -355,12 +355,7 @@ and check for NULL.
 #   error "RXf_SPLIT does not match RXf_PMf_SPLIT"
 #endif
 
-#define RXf_UNUSED0             (1<<(RXf_BASE_SHIFT+0))
-#define RXf_UNUSED1             (1<<(RXf_BASE_SHIFT+1))
-#define RXf_UNUSED2             (1<<(RXf_BASE_SHIFT+2))
-#define RXf_UNUSED3             (1<<(RXf_BASE_SHIFT+3))
-#define RXf_UNUSED4             (1<<(RXf_BASE_SHIFT+4))
-#define RXf_UNUSED5             (1<<(RXf_BASE_SHIFT+5))
+/* Unused +0 - +6 */
 
 /* What we have seen */
 #define RXf_NO_INPLACE_SUBST    (1<<(RXf_BASE_SHIFT+7))
index 79eb829..ccec4d6 100644 (file)
@@ -632,7 +632,7 @@ EXTCONST char * const PL_reg_name[] = {
 EXTCONST char * PL_reg_extflags_name[];
 #else
 EXTCONST char * const PL_reg_extflags_name[] = {
-       /* Bits in extflags defined: 11111111111111110111111111111111 */
+       /* Bits in extflags defined: 11111111111111110000000111111111 */
        "MULTILINE",        /* 0x00000001 */
        "SINGLELINE",       /* 0x00000002 */
        "FOLD",             /* 0x00000004 */
@@ -642,12 +642,12 @@ EXTCONST char * const PL_reg_extflags_name[] = {
        "CHARSET1",         /* 0x00000040 : "CHARSET" - 0x000000e0 */
        "CHARSET2",         /* 0x00000080 : "CHARSET" - 0x000000e0 */
        "SPLIT",            /* 0x00000100 */
-       "UNUSED0",          /* 0x00000200 */
-       "UNUSED1",          /* 0x00000400 */
-       "UNUSED2",          /* 0x00000800 */
-       "UNUSED3",          /* 0x00001000 */
-       "UNUSED4",          /* 0x00002000 */
-       "UNUSED5",          /* 0x00004000 */
+       "UNUSED_BIT_9",     /* 0x00000200 */
+       "UNUSED_BIT_10",    /* 0x00000400 */
+       "UNUSED_BIT_11",    /* 0x00000800 */
+       "UNUSED_BIT_12",    /* 0x00001000 */
+       "UNUSED_BIT_13",    /* 0x00002000 */
+       "UNUSED_BIT_14",    /* 0x00004000 */
        "UNUSED_BIT_15",    /* 0x00008000 */
        "NO_INPLACE_SUBST", /* 0x00010000 */
        "EVAL_SEEN",        /* 0x00020000 */