This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Revert to using regcomp.sym order
authorKarl Williamson <public@khwilliamson.com>
Sun, 5 Dec 2010 20:07:13 +0000 (13:07 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 8 Dec 2010 02:52:41 +0000 (18:52 -0800)
Now that the new nodes are grouped properly, we can use the fact that
the named backreferences all come after all the numbered backreferences,
as had been there before.

regcomp.c

index 60fef55..6f3bfe8 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -9607,7 +9607,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o)
     else if (k == REF || k == OPEN || k == CLOSE || k == GROUPP || OP(o)==ACCEPT) {
        Perl_sv_catpvf(aTHX_ sv, "%d", (int)ARG(o));    /* Parenth number */
        if ( RXp_PAREN_NAMES(prog) ) {
-            if ( k != REF || (OP(o) != NREF && OP(o) != NREFF && OP(o) != NREFFL && OP(o) != NREFFU)) {
+            if ( k != REF || (OP(o) < NREF)) {
                AV *list= MUTABLE_AV(progi->data->data[progi->name_list_idx]);
                SV **name= av_fetch(list, ARG(o), 0 );
                if (name)