This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Remove another sizing pass relict
authorKarl Williamson <khw@cpan.org>
Wed, 21 Nov 2018 04:18:51 +0000 (21:18 -0700)
committerKarl Williamson <khw@cpan.org>
Tue, 27 Nov 2018 04:30:20 +0000 (21:30 -0700)
We no longer play with the emit ptr in this function, so no need to save
and restore it.

regcomp.c

index ddd2752..1d9ff63 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -16475,8 +16475,6 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
 
     bool warn_super = ALWAYS_WARN_SUPER;
 
 
     bool warn_super = ALWAYS_WARN_SUPER;
 
-    const regnode_offset orig_emit = RExC_emit; /* Save the original RExC_emit in
-        case we need to change the emitted regop to an EXACT. */
     const char * orig_parse = RExC_parse;
     bool posixl_matches_all = FALSE; /* Does /l class have both e.g. \W,\w ? */
 
     const char * orig_parse = RExC_parse;
     bool posixl_matches_all = FALSE; /* Does /l class have both e.g. \W,\w ? */
 
@@ -18367,7 +18365,6 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
 
         if (op != END) {
             RExC_parse = (char *)orig_parse;
 
         if (op != END) {
             RExC_parse = (char *)orig_parse;
-            RExC_emit = orig_emit;
 
             if (regarglen[op]) {
                 ret = reganode(pRExC_state, op, anode_arg);
 
             if (regarglen[op]) {
                 ret = reganode(pRExC_state, op, anode_arg);