This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.sym: Make adjacent opcodes for 2 similar regnodes
authorKarl Williamson <khw@cpan.org>
Sat, 28 Mar 2020 02:59:38 +0000 (20:59 -0600)
committerKarl Williamson <khw@cpan.org>
Fri, 16 Oct 2020 13:01:40 +0000 (07:01 -0600)
These are often tested together.  By making them adjacent we can use
inRANGE.

pod/perldebguts.pod
regcomp.sym
regnodes.h

index 20a3ea4..2a3152a 100644 (file)
@@ -689,6 +689,9 @@ will be lost.
                              (string folded except MICRO in non-UTF8
                              patterns; doesn't contain SHARP S unless
                              UTF-8; folded length <= unfolded)
+ EXACTFAA_NO_TRIE str        Like EXACTFAA, (string not UTF-8, folded
+                             except: MICRO, SHARP S; folded length <=
+                             unfolded, not currently trie-able)
 
  EXACTFUP         str        Like EXACT, but match using /iu rules;
                              (string not UTF-8, folded except MICRO:
@@ -697,9 +700,6 @@ will be lost.
  EXACTFLU8        str        Like EXACTFU, but use /il, UTF-8, (string
                              is folded, and everything in it is above
                              255
- EXACTFAA_NO_TRIE str        Like EXACTFAA, (string not UTF-8, folded
-                             except: MICRO, SHARP S; folded length <=
-                             unfolded, not currently trie-able)
 
  EXACT_REQ8       str        Like EXACT, but only UTF-8 encoded targets
                              can match
index 8ef8684..1105173 100644 (file)
@@ -145,6 +145,8 @@ EXACTFU     EXACT,      str   ; Like EXACT, but match using /iu rules; (string f
 # fold to 'ss', but because of /aa, it instead folds to a pair of LATIN SMALL
 # LETTER LONG S characters (U+017F)
 EXACTFAA    EXACT,      str      ; Like EXACT, but match using /iaa rules; (string folded except MICRO in non-UTF8 patterns; doesn't contain SHARP S unless UTF-8; folded length <= unfolded)
+# must immediately follow EXACTFAA
+EXACTFAA_NO_TRIE  EXACT, str     ; Like EXACTFAA, (string not UTF-8, folded except: MICRO, SHARP S; folded length <= unfolded, not currently trie-able)
 
 # End of important relative ordering.
 
@@ -156,7 +158,6 @@ EXACTFUP    EXACT,      str   ; Like EXACT, but match using /iu rules; (string n
 # representable in the UTF-8 target string.
 
 EXACTFLU8   EXACT,      str      ; Like EXACTFU, but use /il, UTF-8, (string is folded, and everything in it is above 255
-EXACTFAA_NO_TRIE  EXACT, str     ; Like EXACTFAA, (string not UTF-8, folded except: MICRO, SHARP S; folded length <= unfolded, not currently trie-able)
 
 
 EXACT_REQ8   EXACT,      str      ; Like EXACT, but only UTF-8 encoded targets can match
index 91cb10e..3e5723d 100644 (file)
 #define EXACTFAA_t8_pb                 186  /*      0x0ba */
 #define EXACTFAA_t8_p8                 187  /*      0x0bb */
 
-#define EXACTFUP                     47     /* 0x2f Like EXACT, but match using
+#define EXACTFAA_NO_TRIE             47     /* 0x2f Like EXACTFAA, (string not
+                                               UTF-8, folded except: MICRO,
+                                               SHARP S; folded length <=
+                                               unfolded, not currently
+                                               trie-able) */
+#define EXACTFAA_NO_TRIE_tb_pb         188  /*      0x0bc */
+#define EXACTFAA_NO_TRIE_tb_p8         189  /*      0x0bd */
+#define EXACTFAA_NO_TRIE_t8_pb         190  /*      0x0be */
+#define EXACTFAA_NO_TRIE_t8_p8         191  /*      0x0bf */
+
+#define EXACTFUP                     48     /* 0x30 Like EXACT, but match using
                                                /iu rules; (string not UTF-8,
                                                folded except MICRO: hence
                                                Problematic) */
-#define EXACTFUP_tb_pb                 188  /*      0x0bc */
-#define EXACTFUP_tb_p8                 189  /*      0x0bd */
-#define EXACTFUP_t8_pb                 190  /*      0x0be */
-#define EXACTFUP_t8_p8                 191  /*      0x0bf */
+#define EXACTFUP_tb_pb                 192  /*      0x0c0 */
+#define EXACTFUP_tb_p8                 193  /*      0x0c1 */
+#define EXACTFUP_t8_pb                 194  /*      0x0c2 */
+#define EXACTFUP_t8_p8                 195  /*      0x0c3 */
 
-#define EXACTFLU8                    48     /* 0x30 Like EXACTFU, but use /il,
+#define EXACTFLU8                    49     /* 0x31 Like EXACTFU, but use /il,
                                                UTF-8, (string is folded, and
                                                everything in it is above 255 */
-#define EXACTFLU8_tb_pb                192  /*      0x0c0 */
-#define EXACTFLU8_tb_p8                193  /*      0x0c1 */
-#define EXACTFLU8_t8_pb                194  /*      0x0c2 */
-#define EXACTFLU8_t8_p8                195  /*      0x0c3 */
-
-#define EXACTFAA_NO_TRIE             49     /* 0x31 Like EXACTFAA, (string not
-                                               UTF-8, folded except: MICRO,
-                                               SHARP S; folded length <=
-                                               unfolded, not currently
-                                               trie-able) */
-#define EXACTFAA_NO_TRIE_tb_pb         196  /*      0x0c4 */
-#define EXACTFAA_NO_TRIE_tb_p8         197  /*      0x0c5 */
-#define EXACTFAA_NO_TRIE_t8_pb         198  /*      0x0c6 */
-#define EXACTFAA_NO_TRIE_t8_p8         199  /*      0x0c7 */
+#define EXACTFLU8_tb_pb                196  /*      0x0c4 */
+#define EXACTFLU8_tb_p8                197  /*      0x0c5 */
+#define EXACTFLU8_t8_pb                198  /*      0x0c6 */
+#define EXACTFLU8_t8_p8                199  /*      0x0c7 */
 
 #define EXACT_REQ8                   50     /* 0x32 Like EXACT, but only UTF-8
                                                encoded targets can match */
@@ -1134,9 +1134,9 @@ EXTCONST U8 PL_regkind[] = {
        EXACT,          /* EXACTFL                */
        EXACT,          /* EXACTFU                */
        EXACT,          /* EXACTFAA               */
+       EXACT,          /* EXACTFAA_NO_TRIE       */
        EXACT,          /* EXACTFUP               */
        EXACT,          /* EXACTFLU8              */
-       EXACT,          /* EXACTFAA_NO_TRIE       */
        EXACT,          /* EXACT_REQ8             */
        EXACT,          /* LEXACT_REQ8            */
        EXACT,          /* EXACTFU_REQ8           */
@@ -1293,9 +1293,9 @@ static const U8 regarglen[] = {
        0,                                      /* EXACTFL      */
        0,                                      /* EXACTFU      */
        0,                                      /* EXACTFAA     */
+       0,                                      /* EXACTFAA_NO_TRIE */
        0,                                      /* EXACTFUP     */
        0,                                      /* EXACTFLU8    */
-       0,                                      /* EXACTFAA_NO_TRIE */
        0,                                      /* EXACT_REQ8   */
        EXTRA_SIZE(struct regnode_1),           /* LEXACT_REQ8  */
        0,                                      /* EXACTFU_REQ8 */
@@ -1408,9 +1408,9 @@ static const char reg_off_by_arg[] = {
        0,      /* EXACTFL      */
        0,      /* EXACTFU      */
        0,      /* EXACTFAA     */
+       0,      /* EXACTFAA_NO_TRIE */
        0,      /* EXACTFUP     */
        0,      /* EXACTFLU8    */
-       0,      /* EXACTFAA_NO_TRIE */
        0,      /* EXACT_REQ8   */
        0,      /* LEXACT_REQ8  */
        0,      /* EXACTFU_REQ8 */
@@ -1529,9 +1529,9 @@ EXTCONST char * const PL_reg_name[] = {
        "EXACTFL",                      /* 0x2c */
        "EXACTFU",                      /* 0x2d */
        "EXACTFAA",                     /* 0x2e */
-       "EXACTFUP",                     /* 0x2f */
-       "EXACTFLU8",                    /* 0x30 */
-       "EXACTFAA_NO_TRIE",             /* 0x31 */
+       "EXACTFAA_NO_TRIE",             /* 0x2f */
+       "EXACTFUP",                     /* 0x30 */
+       "EXACTFLU8",                    /* 0x31 */
        "EXACT_REQ8",                   /* 0x32 */
        "LEXACT_REQ8",                  /* 0x33 */
        "EXACTFU_REQ8",                 /* 0x34 */