This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_list(): re-order a few switch cases
authorDavid Mitchell <davem@iabyn.com>
Tue, 28 May 2019 09:08:45 +0000 (10:08 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 24 Jun 2019 10:40:06 +0000 (11:40 +0100)
Just a cosmetic change.

op.c

diff --git a/op.c b/op.c
index 8bc7cd9..823e48b 100644 (file)
--- a/op.c
+++ b/op.c
@@ -2365,6 +2365,13 @@ Perl_list(pTHX_ OP *o)
        listkids(o);
        break;
 
+    /* the children of these ops are usually a list of statements,
+     * except the leaves, whose first child is is corresponding enter
+     */
+    case OP_SCOPE:
+    case OP_LINESEQ:
+       kid = cLISTOPo->op_first;
+       goto do_kids;
     case OP_LEAVE:
     case OP_LEAVETRY:
        kid = cLISTOPo->op_first;
@@ -2382,10 +2389,6 @@ Perl_list(pTHX_ OP *o)
        PL_curcop = &PL_compiling;
        break;
 
-    case OP_SCOPE:
-    case OP_LINESEQ:
-       kid = cLISTOPo->op_first;
-       goto do_kids;
     }
 
     return o;