develooper Front page | perl.perl5.changes | Postings from September 2019

[perl.git] branch blead updated. v5.31.4-18-g9fb6174d08

From:
Dave Mitchell
Date:
September 23, 2019 15:37
Subject:
[perl.git] branch blead updated. v5.31.4-18-g9fb6174d08
Message ID:
E1iCQOi-0003S6-Ig@git.dc.perl.space
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/9fb6174d0878e31d3a34bc4d96336f405f349ff0?hp=67351791393b2c43b52afa23fc853d19c47a3da3>

- Log -----------------------------------------------------------------
commit 9fb6174d0878e31d3a34bc4d96336f405f349ff0
Merge: 6735179139 f27832e79a
Author: David Mitchell <davem@iabyn.com>
Date:   Mon Sep 23 16:20:37 2019 +0100

    [MERGE] assorted su signature tweaks
    
    Apply several small fixes to the subroutine signatures implementation,
    in preparation for major improvements to the syntax likely to happen
    soon.
    
    Nothing here changes the signatures syntax.

commit f27832e79a0b43f3b2bded8020491011faa617c7
Author: David Mitchell <davem@iabyn.com>
Date:   Mon Sep 23 15:22:11 2019 +0100

    sub foo($_) {...}  - change error message
    
    When using one of the globals like $_ or @_ in a subroutine signature,
    the error message was misleading:
    
        Can't use global $_ in "my"
    
    This commit changes it to:
    
        Can't use global $_ in subroutine signature

commit 4df857782a14d0973f58f6a629019d29259b2aad
Author: David Mitchell <davem@iabyn.com>
Date:   Fri Sep 20 14:43:01 2019 +0100

    put signature ops in their own subtree.
    
    The following code:
    
        sub f ($x,$y) {
            study;
        }
    
    used to compile as:
    
        a  <1> leavesub[1 ref] K/REFC,1 ->(end)
        -     <@> lineseq KP ->a
        1        <;> nextstate(main 5 p:5) v:%,fea=7 ->2
        2        <+> argcheck(2,0) v ->3
        3        <;> nextstate(main 3 p:5) v:%,fea=7 ->4
        4        <+> argelem(0)[$x:3,5] v/SV ->5
        5        <;> nextstate(main 4 p:5) v:%,fea=7 ->6
        6        <+> argelem(1)[$y:4,5] v/SV ->7
        -        <;> ex-nextstate(main 5 p:5) v:%,fea=7 ->7
        7        <;> nextstate(main 5 p:6) v:%,fea=7 ->8
        9        <1> study sK/1 ->a
        -           <1> ex-rv2sv sK/1 ->9
        8              <$> gvsv(*_) s ->9
    
    Following this commit, it compiles as:
    
        a  <1> leavesub[1 ref] K/REFC,1 ->(end)
        -     <@> lineseq KP ->a
        -        <1> ex-argcheck vK/1 ->7
        -           <@> lineseq vK ->-
        1              <;> nextstate(main 5 p:5) v:%,fea=7 ->2
        2              <+> argcheck(2,0) v ->3
        3              <;> nextstate(main 3 p:5) v:%,fea=7 ->4
        4              <+> argelem(0)[$x:3,5] v/SV ->5
        5              <;> nextstate(main 4 p:5) v:%,fea=7 ->6
        6              <+> argelem(1)[$y:4,5] v/SV ->7
        -              <;> ex-nextstate(main 5 p:5) v:%,fea=7 ->-
        7        <;> nextstate(main 5 p:6) v:%,fea=7 ->8
        9        <1> study sK/1 ->a
        -           <1> ex-rv2sv sK/1 ->9
        8              <#> gvsv[*_] s ->9
    
    All the ops associated with the signature have been put in their own
    subtree, with an extra NULL ex-argcheck op "on top". The op on top
    serves two purposes: first, it makes it easier for Deparse.pm etc to
    spot siganure code; secondly, it may at some point in the future be
    upgraded to OP_SIGNATURE when signatures get optimised. It's of type
    ex-argcheck only because when being created it needs to be an op type
    that's in class UNOP_AUX so that the created op will be suitable for
    later optimising, and making it an ex-type associated with signatures
    helps flag it as such.
    
    There should be no functional changes apart from the shape of the
    optree.

commit 64265ceb0b05ed7f7348ea0fa46d968aadb286a2
Author: David Mitchell <davem@iabyn.com>
Date:   Sat Sep 21 12:24:45 2019 +0100

    rpeep(): skip duplicate nextstates even with gaps
    
    rpeep() already optimises away consecutive nextstate ops. This commit
    makes it do this even if there are 'noop' ops between them like null,
    scope, lineseq.
    
    This has a specific utility for the next commit, which will reorganise
    the optree for subroutine signatures in a way which introduces a lineseq
    between two nextstates.

commit e615875676e357cae7ff37441ffc2d44f0daa94e
Author: David Mitchell <davem@iabyn.com>
Date:   Fri Sep 20 11:11:36 2019 +0100

    Signatures: change param count from IV to UV
    
    For some reason I was storing the counts of sub signature parameters and
    optional parameters as signed ints. Since these can never be negative,
    change them to UV instead.

commit f417cfa90670b17255b02c7dc1a88924c102479f
Author: David Mitchell <davem@iabyn.com>
Date:   Fri Sep 20 10:57:54 2019 +0100

    OP_ARGCHECK: use custom aux struct
    
    This op is of class OP_UNOP_AUX, Ops of this class have an op_aux pointer
    which typically points to a variable-length malloced array of IVs,
    UVs, etc. However in the specific case of OP_ARGCHECK the data stored
    in the aux struct is fixed. So this commit casts the aux pointer to a
    struct containing the relevant fields (number of parameters etc), rather
    than referring to them as aux[0], aux[1] etc. This makes the code more
    readable.
    
    Should be no functional changes.

commit 558b227c020be1ce3d21af4f57ae649d8a2229eb
Author: David Mitchell <davem@iabyn.com>
Date:   Thu Sep 19 11:39:30 2019 +0100

    signatures: add tests for multiline sig

commit 33d067022c9a5add1c2c21dc9b56fc279abe6290
Author: David Mitchell <davem@iabyn.com>
Date:   Thu Sep 19 11:25:53 2019 +0100

    signatures: add taint tests

-----------------------------------------------------------------------

Summary of changes:
 ext/B/B.pm                      |   2 +-
 ext/B/B.xs                      |  30 ++-
 ext/XS-APItest/APItest.pm       |   2 +-
 ext/XS-APItest/APItest.xs       |  13 +-
 ext/XS-APItest/t/subsignature.t |   1 +
 lib/B/Deparse.pm                | 118 +++++----
 op.c                            |  31 ++-
 op.h                            |   8 +
 parser.h                        |   4 +-
 perly.act                       | 540 ++++++++++++++++++++--------------------
 perly.h                         |  15 +-
 perly.tab                       |  46 ++--
 perly.y                         |  27 +-
 pod/perldiag.pod                |   2 +-
 pp.c                            |  10 +-
 t/op/signatures.t               |  40 ++-
 t/op/taint.t                    |  29 ++-
 17 files changed, 533 insertions(+), 385 deletions(-)

diff --git a/ext/B/B.pm b/ext/B/B.pm
index 2d9b2d064d..8ee5a12228 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -20,7 +20,7 @@ sub import {
 # walkoptree comes from B.xs
 
 BEGIN {
-    $B::VERSION = '1.76';
+    $B::VERSION = '1.77';
     @B::EXPORT_OK = ();
 
     # Our BOOT code needs $VERSION set, and will append to @EXPORT_OK.
diff --git a/ext/B/B.xs b/ext/B/B.xs
index d8fc22a1fa..d27eba33be 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -1177,11 +1177,15 @@ string(o, cv)
             break;
 
         case OP_ARGCHECK:
-            ret = Perl_newSVpvf(aTHX_ "%" IVdf ",%" IVdf, aux[0].iv, aux[1].iv);
-            if (aux[2].iv)
-                Perl_sv_catpvf(aTHX_ ret, ",%c", (char)aux[2].iv);
-            ret = sv_2mortal(ret);
-            break;
+            {
+                struct op_argcheck_aux *p = (struct op_argcheck_aux*)aux;
+                ret = Perl_newSVpvf(aTHX_ "%" IVdf ",%" IVdf,
+                                    p->params, p->opt_params);
+                if (p->slurpy)
+                    Perl_sv_catpvf(aTHX_ ret, ",%c", p->slurpy);
+                ret = sv_2mortal(ret);
+                break;
+            }
 
         default:
             ret = sv_2mortal(newSVpvn("", 0));
@@ -1215,12 +1219,16 @@ aux_list(o, cv)
             break;
 
         case OP_ARGCHECK:
-            EXTEND(SP, 3);
-            PUSHs(sv_2mortal(newSViv(aux[0].iv)));
-            PUSHs(sv_2mortal(newSViv(aux[1].iv)));
-            PUSHs(sv_2mortal(aux[2].iv ? Perl_newSVpvf(aTHX_ "%c",
-                                (char)aux[2].iv) : &PL_sv_no));
-            break;
+            {
+                struct op_argcheck_aux *p = (struct op_argcheck_aux*)aux;
+                EXTEND(SP, 3);
+                PUSHs(sv_2mortal(newSViv(p->params)));
+                PUSHs(sv_2mortal(newSViv(p->opt_params)));
+                PUSHs(sv_2mortal(p->slurpy
+                                ? Perl_newSVpvf(aTHX_ "%c", p->slurpy)
+                                : &PL_sv_no));
+                break;
+            }
 
         case OP_MULTICONCAT:
             {
diff --git a/ext/XS-APItest/APItest.pm b/ext/XS-APItest/APItest.pm
index 49ad7c5248..fdf5b85ae3 100644
--- a/ext/XS-APItest/APItest.pm
+++ b/ext/XS-APItest/APItest.pm
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 use Carp;
 
-our $VERSION = '1.03';
+our $VERSION = '1.04';
 
 require XSLoader;
 
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index d1ca8f94b3..cd58b526a6 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -1061,10 +1061,17 @@ static OP *THX_parse_keyword_subsignature(pTHX)
 
     /* We can't yield the optree as is to the caller because it won't be
      * executable outside of a called sub. We'll have to convert it into
-     * something safe for them to invoke
-     * sigop should be a OP_LINESEQ containing OP_NEXTSTATE-separated
-     * OP_ARGCHECK and OP_ARGELEMs
+     * something safe for them to invoke.
+     * sigop should be an OP_NULL above a OP_LINESEQ containing
+     * OP_NEXTSTATE-separated OP_ARGCHECK and OP_ARGELEMs
      */
+    if(sigop->op_type != OP_NULL)
+	croak("Expected parse_subsignature() to yield an OP_NULL");
+    
+    if(!(sigop->op_flags & OPf_KIDS))
+	croak("Expected parse_subsignature() to yield an OP_NULL with kids");
+    sigop = cUNOPx(sigop)->op_first;
+
     if(sigop->op_type != OP_LINESEQ)
 	croak("Expected parse_subsignature() to yield an OP_LINESEQ");
 
diff --git a/ext/XS-APItest/t/subsignature.t b/ext/XS-APItest/t/subsignature.t
index f7d0e25bce..396fb02291 100644
--- a/ext/XS-APItest/t/subsignature.t
+++ b/ext/XS-APItest/t/subsignature.t
@@ -18,6 +18,7 @@ eval q{
 	push @t, (subsignature $one = 1);
 };
 is $@, "";
+use Data::Dumper; print Dumper \@t;
 is_deeply \@t, [
 	['nextstate:4', 'argcheck:2:0:-', 'argelem:$x', 'argelem:$y'],
 	['nextstate:5', 'argcheck:2:0:-', 'argelem:$z',],
diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm
index d7dc060fc6..bf5f29ee00 100644
--- a/lib/B/Deparse.pm
+++ b/lib/B/Deparse.pm
@@ -52,7 +52,7 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring
         MDEREF_SHIFT
     );
 
-$VERSION = '1.49';
+$VERSION = '1.50';
 use strict;
 our $AUTOLOAD;
 use warnings ();
@@ -271,7 +271,7 @@ BEGIN {
 
 
 BEGIN { for (qw[ const stringify rv2sv list glob pushmark null aelem
-		 kvaslice kvhslice padsv
+		 kvaslice kvhslice padsv argcheck
                  nextstate dbstate rv2av rv2hv helem custom ]) {
     eval "sub OP_\U$_ () { " . opnumber($_) . "}"
 }}
@@ -1176,42 +1176,68 @@ sub pad_subs {
 # or altered. In this case we return "()" and fall back to general
 # deparsing of the individual sigelems as 'my $x = $_[N]' etc.
 #
-# We're only called if the first two ops are nextstate and argcheck.
+# We're only called if the top is an ex-argcheck, which is a placeholder
+# indicating a signature subtree.
+#
+# Return a signature string, or an empty list if no deparseable as a
+# signature
 
 sub deparse_argops {
-    my ($self, $firstop, $cv) = @_;
+    my ($self, $topop, $cv) = @_;
 
     my @sig;
-    my $o = $firstop;
-    return if $o->label; #first nextstate;
+
+
+    $topop = $topop->first;
+    return unless $$topop and $topop->name eq 'lineseq';
+
+
+    # last op should be nextstate
+    my $last = $topop->last;
+    return unless $$last
+                    and (   _op_is_or_was($last, OP_NEXTSTATE)
+                         or _op_is_or_was($last, OP_DBSTATE));
+
+    # first OP_NEXTSTATE
+
+    my $o = $topop->first;
+    return unless $$o;
+    return if $o->label;
 
     # OP_ARGCHECK
 
     $o = $o->sibling;
+    return unless $$o and $o->name eq 'argcheck';
+
     my ($params, $opt_params, $slurpy) = $o->aux_list($cv);
     my $mandatory = $params - $opt_params;
     my $seen_slurpy = 0;
     my $last_ix = -1;
 
-    # keep looking for valid nextstate + argelem pairs
+    # keep looking for valid nextstate + argelem pairs, terminated
+    # by a final nextstate
 
     while (1) {
-        # OP_NEXTSTATE
         $o = $o->sibling;
-        last unless $$o;
-        last unless $o->name =~ /^(next|db)state$/;
-        last if $o->label;
+        return unless $$o;
+
+        # skip trailing nextstate
+        last if $$o == $$last;
+
+        # OP_NEXTSTATE
+        return unless $o->name =~ /^(next|db)state$/;
+        return if $o->label;
 
         # OP_ARGELEM
-        my $o2 = $o->sibling;
-        last unless $$o2;
+        $o = $o->sibling;
+        last unless $$o;
 
-        if ($o2->name eq 'argelem') {
-            my $ix  = $o2->string($cv);
+        if ($o->name eq 'argelem') {
+            my $ix  = $o->string($cv);
             while (++$last_ix < $ix) {
                 push @sig, $last_ix <  $mandatory ? '$' : '$=';
             }
-            my $var = $self->padname($o2->targ);
+            my $var = $self->padname($o->targ);
             if ($var =~ /^[@%]/) {
                 return if $seen_slurpy;
                 $seen_slurpy = 1;
@@ -1221,8 +1247,8 @@ sub deparse_argops {
             else {
                 return if $ix >= $params;
             }
-            if ($o2->flags & OPf_KIDS) {
-                my $kid = $o2->first;
+            if ($o->flags & OPf_KIDS) {
+                my $kid = $o->first;
                 return unless $$kid and $kid->name eq 'argdefelem';
                 my $def = $self->deparse($kid->first, 7);
                 $def = "($def)" if $kid->first->flags & OPf_PARENS;
@@ -1230,13 +1256,13 @@ sub deparse_argops {
             }
             push @sig, $var;
         }
-        elsif ($o2->name eq 'null'
-               and ($o2->flags & OPf_KIDS)
-               and $o2->first->name eq 'argdefelem')
+        elsif ($o->name eq 'null'
+               and ($o->flags & OPf_KIDS)
+               and $o->first->name eq 'argdefelem')
         {
             # special case - a void context default expression: $ = expr
 
-            my $defop = $o2->first;
+            my $defop = $o->first;
             my $ix = $defop->targ;
             while (++$last_ix < $ix) {
                 push @sig, $last_ix <  $mandatory ? '$' : '$=';
@@ -1248,10 +1274,9 @@ sub deparse_argops {
             push @sig, '$ = ' . $def;
         }
         else {
-            last;
+            return;
         }
 
-        $o = $o2;
     }
 
     while (++$last_ix < $params) {
@@ -1259,9 +1284,10 @@ sub deparse_argops {
     }
     push @sig, $slurpy if $slurpy and !$seen_slurpy;
 
-    return ($o, join(', ', @sig));
+    return (join(', ', @sig));
 }
 
+
 # Deparse a sub. Returns everything except the 'sub foo',
 # e.g.  ($$) : method { ...; }
 # or    : prototype($$) lvalue ($a, $b) { ...; };
@@ -1304,27 +1330,26 @@ Carp::confess("SPECIAL in deparse_sub") if $cv->isa("B::SPECIAL");
 	$self->pad_subs($cv);
 	$self->pessimise($root, $cv->START);
 	my $lineseq = $root->first;
-	if ($lineseq->name eq "lineseq") {
-	    my $firstop = $lineseq->first;
-
-            if ($has_sig) {
-                my $o2;
-                # try to deparse first few ops as a signature if possible
-                if (     $$firstop
-                     and $firstop->name =~  /^(next|db)state$/
-                     and (($o2 = $firstop->sibling))
-                     and $$o2)
-                {
-                    if ($o2->name eq 'argcheck') {
-                        my ($nexto, $mysig) = $self->deparse_argops($firstop, $cv);
-                        if (defined $nexto) {
-                            $firstop = $nexto;
-                            $sig = $mysig;
-                        }
-                    }
-                }
+
+        # stub sub may have single op rather than list of ops
+        my $is_list = ($lineseq->name eq "lineseq");
+        my $firstop = $is_list ? $lineseq->first : $lineseq;
+
+        # Try to deparse first subtree as a signature if possible.
+        # Top of signature subtree has an ex-argcheck as a placeholder
+        if (    $has_sig
+            and $$firstop
+            and $firstop->name eq 'null'
+            and $firstop->targ == OP_ARGCHECK
+        ) {
+            my ($mysig) = $self->deparse_argops($firstop, $cv);
+            if (defined $mysig) {
+                $sig = $mysig;
+                $firstop = $is_list ? $firstop->sibling : undef;
             }
+        }
 
+        if ($is_list && $firstop) {
             my @ops;
 	    for (my $o = $firstop; $$o; $o=$o->sibling) {
 		push @ops, $o;
@@ -1341,9 +1366,12 @@ Carp::confess("SPECIAL in deparse_sub") if $cv->isa("B::SPECIAL");
 		$body .= ";\n$subs" if length($subs);
 	    }
 	}
-	else {
+	elsif ($firstop) {
 	    $body = $self->deparse($root->first, 0);
 	}
+        else {
+            $body = ';'; # stub sub
+        }
 
         my $l = '';
         if ($self->{'linenums'}) {
diff --git a/op.c b/op.c
index 29486a566c..e875a90433 100644
--- a/op.c
+++ b/op.c
@@ -700,16 +700,22 @@ Perl_allocmy(pTHX_ const char *const name, const STRLEN len, const U32 flags)
                 && isIDFIRST_utf8_safe((U8 *)name+1, name + len))
             || (name[1] == '_' && len > 2)))
     {
+        const char * const type =
+              PL_parser->in_my == KEY_sigvar ? "subroutine signature" :
+              PL_parser->in_my == KEY_state  ? "\"state\""     : "\"my\"";
+
 	if (!(flags & SVf_UTF8 && UTF8_IS_START(name[1]))
 	 && isASCII(name[1])
 	 && (!isPRINT(name[1]) || strchr("\t\n\r\f", name[1]))) {
-	    /* diag_listed_as: Can't use global %s in "%s" */
-	    yyerror(Perl_form(aTHX_ "Can't use global %c^%c%.*s in \"%s\"",
-			      name[0], toCTRL(name[1]), (int)(len - 2), name + 2,
-			      PL_parser->in_my == KEY_state ? "state" : "my"));
+	    /* diag_listed_as: Can't use global %s in %s */
+	    yyerror(Perl_form(aTHX_ "Can't use global %c^%c%.*s in %s",
+			      name[0], toCTRL(name[1]),
+                              (int)(len - 2), name + 2,
+			      type));
 	} else {
-	    yyerror_pv(Perl_form(aTHX_ "Can't use global %.*s in \"%s\"", (int) len, name,
-			      PL_parser->in_my == KEY_state ? "state" : "my"), flags & SVf_UTF8);
+	    yyerror_pv(Perl_form(aTHX_ "Can't use global %.*s in %s",
+                              (int) len, name,
+			      type), flags & SVf_UTF8);
 	}
     }
 
@@ -16087,8 +16093,17 @@ Perl_rpeep(pTHX_ OP *o)
 	       this optimisation if the first NEXTSTATE has a label.  */
 	    if (!CopLABEL((COP*)o) && !PERLDB_NOOPT) {
 		OP *nextop = o->op_next;
-		while (nextop && nextop->op_type == OP_NULL)
-		    nextop = nextop->op_next;
+		while (nextop) {
+                    switch (nextop->op_type) {
+                        case OP_NULL:
+                        case OP_SCALAR:
+                        case OP_LINESEQ:
+                        case OP_SCOPE:
+                            nextop = nextop->op_next;
+                            continue;
+                    }
+                    break;
+                }
 
 		if (nextop && (nextop->op_type == OP_NEXTSTATE)) {
 		    op_null(o);
diff --git a/op.h b/op.h
index 89440a2f41..80b1d9c59c 100644
--- a/op.h
+++ b/op.h
@@ -1113,6 +1113,14 @@ C<sib> is non-null. For a higher-level interface, see C<L</op_sibling_splice>>.
       "Perl 5.32"
 #endif
 
+/* stuff for OP_ARGCHECK */
+
+struct  op_argcheck_aux {
+    UV   params;     /* number of positional parameters */
+    UV   opt_params; /* number of optional positional parameters */
+    char slurpy;     /* presence of slurpy: may be '\0', '@' or '%' */
+};
+
 
 /*
  * ex: set ts=8 sts=4 sw=4 et:
diff --git a/parser.h b/parser.h
index 19c5c63ad3..4fa490a190 100644
--- a/parser.h
+++ b/parser.h
@@ -114,8 +114,8 @@ typedef struct yy_parser {
 
     bool        sig_seen;       /* the currently parsing sub has a signature */
     /* these are valid while parsing a subroutine signature */
-    IV          sig_elems;      /* number of signature elements seen so far */
-    IV          sig_optelems;   /* number of optional signature elems seen */
+    UV          sig_elems;      /* number of signature elements seen so far */
+    UV          sig_optelems;   /* number of optional signature elems seen */
     char        sig_slurpy;     /* the sigil of the slurpy var (or null) */
 
     bool        recheck_utf8_validity;
diff --git a/perly.act b/perly.act
index 649ab0c64d..1237b50bd7 100644
--- a/perly.act
+++ b/perly.act
@@ -5,7 +5,7 @@
  */
 
 case 2:
-#line 120 "perly.y"
+#line 120 "perly.y" /* yacc.c:1648  */
     {
 			  parser->expect = XSTATE;
                           (yyval.ival) = 0;
@@ -14,7 +14,7 @@ case 2:
     break;
 
   case 3:
-#line 125 "perly.y"
+#line 125 "perly.y" /* yacc.c:1648  */
     {
 			  newPROG(block_end((ps[-1].val.ival),(ps[0].val.opval)));
 			  PL_compiling.cop_seq = 0;
@@ -24,7 +24,7 @@ case 2:
     break;
 
   case 4:
-#line 131 "perly.y"
+#line 131 "perly.y" /* yacc.c:1648  */
     {
 			  parser->expect = XTERM;
                           (yyval.ival) = 0;
@@ -33,7 +33,7 @@ case 2:
     break;
 
   case 5:
-#line 136 "perly.y"
+#line 136 "perly.y" /* yacc.c:1648  */
     {
 			  PL_eval_root = (ps[0].val.opval);
 			  (yyval.ival) = 0;
@@ -42,7 +42,7 @@ case 2:
     break;
 
   case 6:
-#line 141 "perly.y"
+#line 141 "perly.y" /* yacc.c:1648  */
     {
 			  parser->expect = XBLOCK;
                           (yyval.ival) = 0;
@@ -51,7 +51,7 @@ case 2:
     break;
 
   case 7:
-#line 146 "perly.y"
+#line 146 "perly.y" /* yacc.c:1648  */
     {
 			  PL_pad_reset_pending = TRUE;
 			  PL_eval_root = (ps[0].val.opval);
@@ -63,7 +63,7 @@ case 2:
     break;
 
   case 8:
-#line 154 "perly.y"
+#line 154 "perly.y" /* yacc.c:1648  */
     {
 			  parser->expect = XSTATE;
                           (yyval.ival) = 0;
@@ -72,7 +72,7 @@ case 2:
     break;
 
   case 9:
-#line 159 "perly.y"
+#line 159 "perly.y" /* yacc.c:1648  */
     {
 			  PL_pad_reset_pending = TRUE;
 			  PL_eval_root = (ps[0].val.opval);
@@ -84,7 +84,7 @@ case 2:
     break;
 
   case 10:
-#line 167 "perly.y"
+#line 167 "perly.y" /* yacc.c:1648  */
     {
 			  parser->expect = XSTATE;
                           (yyval.ival) = 0;
@@ -93,7 +93,7 @@ case 2:
     break;
 
   case 11:
-#line 172 "perly.y"
+#line 172 "perly.y" /* yacc.c:1648  */
     {
 			  PL_pad_reset_pending = TRUE;
 			  PL_eval_root = (ps[0].val.opval);
@@ -105,7 +105,7 @@ case 2:
     break;
 
   case 12:
-#line 180 "perly.y"
+#line 180 "perly.y" /* yacc.c:1648  */
     {
 			  parser->expect = XSTATE;
                           (yyval.ival) = 0;
@@ -114,7 +114,7 @@ case 2:
     break;
 
   case 13:
-#line 185 "perly.y"
+#line 185 "perly.y" /* yacc.c:1648  */
     {
 			  PL_eval_root = (ps[0].val.opval);
 			  (yyval.ival) = 0;
@@ -123,7 +123,7 @@ case 2:
     break;
 
   case 14:
-#line 190 "perly.y"
+#line 190 "perly.y" /* yacc.c:1648  */
     {
 			  parser->expect = XSTATE;
 			  (yyval.ival) = 0;
@@ -132,7 +132,7 @@ case 2:
     break;
 
   case 15:
-#line 195 "perly.y"
+#line 195 "perly.y" /* yacc.c:1648  */
     {
 			  PL_eval_root = (ps[0].val.opval);
 			  (yyval.ival) = 0;
@@ -141,7 +141,7 @@ case 2:
     break;
 
   case 16:
-#line 203 "perly.y"
+#line 203 "perly.y" /* yacc.c:1648  */
     { if (parser->copline > (line_t)(ps[-3].val.ival))
 			      parser->copline = (line_t)(ps[-3].val.ival);
 			  (yyval.opval) = block_end((ps[-2].val.ival), (ps[-1].val.opval));
@@ -150,7 +150,7 @@ case 2:
     break;
 
   case 17:
-#line 211 "perly.y"
+#line 211 "perly.y" /* yacc.c:1648  */
     { if (parser->copline > (line_t)(ps[-6].val.ival))
 			      parser->copline = (line_t)(ps[-6].val.ival);
 			  (yyval.opval) = block_end((ps[-5].val.ival), (ps[-2].val.opval));
@@ -159,14 +159,14 @@ case 2:
     break;
 
   case 18:
-#line 218 "perly.y"
+#line 218 "perly.y" /* yacc.c:1648  */
     { (yyval.ival) = block_start(TRUE);
 			  parser->parsed_sub = 0; }
 
     break;
 
   case 19:
-#line 223 "perly.y"
+#line 223 "perly.y" /* yacc.c:1648  */
     { if (parser->copline > (line_t)(ps[-3].val.ival))
 			      parser->copline = (line_t)(ps[-3].val.ival);
 			  (yyval.opval) = block_end((ps[-2].val.ival), (ps[-1].val.opval));
@@ -175,20 +175,20 @@ case 2:
     break;
 
   case 20:
-#line 230 "perly.y"
+#line 230 "perly.y" /* yacc.c:1648  */
     { (yyval.ival) = block_start(FALSE);
 			  parser->parsed_sub = 0; }
 
     break;
 
   case 21:
-#line 236 "perly.y"
+#line 236 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 22:
-#line 238 "perly.y"
+#line 238 "perly.y" /* yacc.c:1648  */
     {   (yyval.opval) = op_append_list(OP_LINESEQ, (ps[-1].val.opval), (ps[0].val.opval));
 			    PL_pad_reset_pending = TRUE;
 			    if ((ps[-1].val.opval) && (ps[0].val.opval))
@@ -198,13 +198,13 @@ case 2:
     break;
 
   case 23:
-#line 247 "perly.y"
+#line 247 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 24:
-#line 249 "perly.y"
+#line 249 "perly.y" /* yacc.c:1648  */
     {   (yyval.opval) = op_append_list(OP_LINESEQ, (ps[-1].val.opval), (ps[0].val.opval));
 			    PL_pad_reset_pending = TRUE;
 			    if ((ps[-1].val.opval) && (ps[0].val.opval))
@@ -214,7 +214,7 @@ case 2:
     break;
 
   case 25:
-#line 258 "perly.y"
+#line 258 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = (ps[0].val.opval) ? newSTATEOP(0, NULL, (ps[0].val.opval)) : NULL;
 			}
@@ -222,13 +222,13 @@ case 2:
     break;
 
   case 26:
-#line 262 "perly.y"
+#line 262 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 27:
-#line 266 "perly.y"
+#line 266 "perly.y" /* yacc.c:1648  */
     {
                           SV *label = cSVOPx_sv((ps[-1].val.opval));
 			  (yyval.opval) = newSTATEOP(SvFLAGS(label) & SVf_UTF8,
@@ -239,7 +239,7 @@ case 2:
     break;
 
   case 28:
-#line 273 "perly.y"
+#line 273 "perly.y" /* yacc.c:1648  */
     {
                           SV *label = cSVOPx_sv((ps[-1].val.opval));
 			  (yyval.opval) = newSTATEOP(SvFLAGS(label) & SVf_UTF8,
@@ -250,13 +250,13 @@ case 2:
     break;
 
   case 29:
-#line 283 "perly.y"
+#line 283 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 30:
-#line 285 "perly.y"
+#line 285 "perly.y" /* yacc.c:1648  */
     {
 			  CV *fmtcv = PL_compcv;
 			  newFORM((ps[-2].val.ival), (ps[-1].val.opval), (ps[0].val.opval));
@@ -270,7 +270,7 @@ case 2:
     break;
 
   case 31:
-#line 297 "perly.y"
+#line 297 "perly.y" /* yacc.c:1648  */
     {
                           init_named_cv(PL_compcv, (ps[-1].val.opval));
 			  parser->in_my = 0;
@@ -280,7 +280,7 @@ case 2:
     break;
 
   case 32:
-#line 303 "perly.y"
+#line 303 "perly.y" /* yacc.c:1648  */
     {
 			  SvREFCNT_inc_simple_void(PL_compcv);
 			  (ps[-5].val.opval)->op_type == OP_CONST
@@ -295,7 +295,7 @@ case 2:
     break;
 
   case 33:
-#line 318 "perly.y"
+#line 318 "perly.y" /* yacc.c:1648  */
     {
                           init_named_cv(PL_compcv, (ps[-1].val.opval));
 			  parser->in_my = 0;
@@ -305,7 +305,7 @@ case 2:
     break;
 
   case 34:
-#line 324 "perly.y"
+#line 324 "perly.y" /* yacc.c:1648  */
     {
 			  SvREFCNT_inc_simple_void(PL_compcv);
 			  (ps[-4].val.opval)->op_type == OP_CONST
@@ -320,7 +320,7 @@ case 2:
     break;
 
   case 35:
-#line 335 "perly.y"
+#line 335 "perly.y" /* yacc.c:1648  */
     {
 			  package((ps[-1].val.opval));
 			  if ((ps[-2].val.opval))
@@ -331,13 +331,13 @@ case 2:
     break;
 
   case 36:
-#line 342 "perly.y"
+#line 342 "perly.y" /* yacc.c:1648  */
     { CvSPECIAL_on(PL_compcv); /* It's a BEGIN {} */ }
 
     break;
 
   case 37:
-#line 344 "perly.y"
+#line 344 "perly.y" /* yacc.c:1648  */
     {
 			  SvREFCNT_inc_simple_void(PL_compcv);
 			  utilize((ps[-6].val.ival), (ps[-5].val.ival), (ps[-3].val.opval), (ps[-2].val.opval), (ps[-1].val.opval));
@@ -348,7 +348,7 @@ case 2:
     break;
 
   case 38:
-#line 351 "perly.y"
+#line 351 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = block_end((ps[-4].val.ival),
 			      newCONDOP(0, (ps[-3].val.opval), op_scope((ps[-1].val.opval)), (ps[0].val.opval)));
@@ -358,7 +358,7 @@ case 2:
     break;
 
   case 39:
-#line 357 "perly.y"
+#line 357 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = block_end((ps[-4].val.ival),
                               newCONDOP(0, (ps[-3].val.opval), (ps[0].val.opval), op_scope((ps[-1].val.opval))));
@@ -368,7 +368,7 @@ case 2:
     break;
 
   case 40:
-#line 363 "perly.y"
+#line 363 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = block_end((ps[-3].val.ival), newGIVENOP((ps[-2].val.opval), op_scope((ps[0].val.opval)), 0));
 			  parser->copline = (line_t)(ps[-5].val.ival);
@@ -377,19 +377,19 @@ case 2:
     break;
 
   case 41:
-#line 368 "perly.y"
+#line 368 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = block_end((ps[-3].val.ival), newWHENOP((ps[-2].val.opval), op_scope((ps[0].val.opval)))); }
 
     break;
 
   case 42:
-#line 370 "perly.y"
+#line 370 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newWHENOP(0, op_scope((ps[0].val.opval))); }
 
     break;
 
   case 43:
-#line 372 "perly.y"
+#line 372 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = block_end((ps[-5].val.ival),
 				  newWHILEOP(0, 1, NULL,
@@ -400,7 +400,7 @@ case 2:
     break;
 
   case 44:
-#line 379 "perly.y"
+#line 379 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = block_end((ps[-5].val.ival),
 				  newWHILEOP(0, 1, NULL,
@@ -411,19 +411,19 @@ case 2:
     break;
 
   case 45:
-#line 386 "perly.y"
+#line 386 "perly.y" /* yacc.c:1648  */
     { parser->expect = XTERM; }
 
     break;
 
   case 46:
-#line 388 "perly.y"
+#line 388 "perly.y" /* yacc.c:1648  */
     { parser->expect = XTERM; }
 
     break;
 
   case 47:
-#line 391 "perly.y"
+#line 391 "perly.y" /* yacc.c:1648  */
     {
 			  OP *initop = (ps[-9].val.opval);
 			  OP *forop = newWHILEOP(0, 1, NULL,
@@ -442,7 +442,7 @@ case 2:
     break;
 
   case 48:
-#line 406 "perly.y"
+#line 406 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = block_end((ps[-6].val.ival), newFOROP(0, (ps[-5].val.opval), (ps[-3].val.opval), (ps[-1].val.opval), (ps[0].val.opval)));
 			  parser->copline = (line_t)(ps[-8].val.ival);
@@ -451,7 +451,7 @@ case 2:
     break;
 
   case 49:
-#line 411 "perly.y"
+#line 411 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = block_end((ps[-4].val.ival), newFOROP(0,
 				      op_lvalue((ps[-6].val.opval), OP_ENTERLOOP), (ps[-3].val.opval), (ps[-1].val.opval), (ps[0].val.opval)));
@@ -461,13 +461,13 @@ case 2:
     break;
 
   case 50:
-#line 417 "perly.y"
+#line 417 "perly.y" /* yacc.c:1648  */
     { parser->in_my = 0; (yyval.opval) = my((ps[0].val.opval)); }
 
     break;
 
   case 51:
-#line 419 "perly.y"
+#line 419 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = block_end(
 				(ps[-7].val.ival),
@@ -484,7 +484,7 @@ case 2:
     break;
 
   case 52:
-#line 432 "perly.y"
+#line 432 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = block_end((ps[-4].val.ival), newFOROP(
 				0, op_lvalue(newUNOP(OP_REFGEN, 0,
@@ -496,7 +496,7 @@ case 2:
     break;
 
   case 53:
-#line 440 "perly.y"
+#line 440 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = block_end((ps[-4].val.ival),
 				  newFOROP(0, NULL, (ps[-3].val.opval), (ps[-1].val.opval), (ps[0].val.opval)));
@@ -506,7 +506,7 @@ case 2:
     break;
 
   case 54:
-#line 446 "perly.y"
+#line 446 "perly.y" /* yacc.c:1648  */
     {
 			  /* a block is a loop that happens once */
 			  (yyval.opval) = newWHILEOP(0, 1, NULL,
@@ -516,7 +516,7 @@ case 2:
     break;
 
   case 55:
-#line 452 "perly.y"
+#line 452 "perly.y" /* yacc.c:1648  */
     {
 			  package((ps[-2].val.opval));
 			  if ((ps[-3].val.opval)) {
@@ -527,7 +527,7 @@ case 2:
     break;
 
   case 56:
-#line 459 "perly.y"
+#line 459 "perly.y" /* yacc.c:1648  */
     {
 			  /* a block is a loop that happens once */
 			  (yyval.opval) = newWHILEOP(0, 1, NULL,
@@ -539,7 +539,7 @@ case 2:
     break;
 
   case 57:
-#line 467 "perly.y"
+#line 467 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = (ps[-1].val.opval);
 			}
@@ -547,7 +547,7 @@ case 2:
     break;
 
   case 58:
-#line 471 "perly.y"
+#line 471 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = newLISTOP(OP_DIE, 0, newOP(OP_PUSHMARK, 0),
 				newSVOP(OP_CONST, 0, newSVpvs("Unimplemented")));
@@ -556,7 +556,7 @@ case 2:
     break;
 
   case 59:
-#line 476 "perly.y"
+#line 476 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = NULL;
 			  parser->copline = NOLINE;
@@ -565,7 +565,7 @@ case 2:
     break;
 
   case 60:
-#line 484 "perly.y"
+#line 484 "perly.y" /* yacc.c:1648  */
     { OP *list;
 			  if ((ps[0].val.opval)) {
 			      OP *term = (ps[0].val.opval);
@@ -584,74 +584,74 @@ case 2:
     break;
 
   case 61:
-#line 501 "perly.y"
+#line 501 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 62:
-#line 503 "perly.y"
+#line 503 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = op_unscope((ps[-1].val.opval)); }
 
     break;
 
   case 63:
-#line 508 "perly.y"
+#line 508 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 64:
-#line 510 "perly.y"
+#line 510 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 65:
-#line 512 "perly.y"
+#line 512 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[0].val.opval), (ps[-2].val.opval)); }
 
     break;
 
   case 66:
-#line 514 "perly.y"
+#line 514 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newLOGOP(OP_OR, 0, (ps[0].val.opval), (ps[-2].val.opval)); }
 
     break;
 
   case 67:
-#line 516 "perly.y"
+#line 516 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, scalar((ps[0].val.opval)), (ps[-2].val.opval)); }
 
     break;
 
   case 68:
-#line 518 "perly.y"
+#line 518 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newLOOPOP(OPf_PARENS, 1, (ps[0].val.opval), (ps[-2].val.opval)); }
 
     break;
 
   case 69:
-#line 520 "perly.y"
+#line 520 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newFOROP(0, NULL, (ps[0].val.opval), (ps[-2].val.opval), NULL);
 			  parser->copline = (line_t)(ps[-1].val.ival); }
 
     break;
 
   case 70:
-#line 523 "perly.y"
+#line 523 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newWHENOP((ps[0].val.opval), op_scope((ps[-2].val.opval))); }
 
     break;
 
   case 71:
-#line 528 "perly.y"
+#line 528 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 72:
-#line 530 "perly.y"
+#line 530 "perly.y" /* yacc.c:1648  */
     {
 			  ((ps[0].val.opval))->op_flags |= OPf_PARENS;
 			  (yyval.opval) = op_scope((ps[0].val.opval));
@@ -660,7 +660,7 @@ case 2:
     break;
 
   case 73:
-#line 535 "perly.y"
+#line 535 "perly.y" /* yacc.c:1648  */
     { parser->copline = (line_t)(ps[-5].val.ival);
 			    (yyval.opval) = newCONDOP(0,
 				newSTATEOP(OPf_SPECIAL,NULL,(ps[-3].val.opval)),
@@ -671,19 +671,19 @@ case 2:
     break;
 
   case 74:
-#line 545 "perly.y"
+#line 545 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 75:
-#line 547 "perly.y"
+#line 547 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = op_scope((ps[0].val.opval)); }
 
     break;
 
   case 76:
-#line 552 "perly.y"
+#line 552 "perly.y" /* yacc.c:1648  */
     { (yyval.ival) = (PL_min_intro_pending &&
 			    PL_max_intro_pending >=  PL_min_intro_pending);
 			  intro_my(); }
@@ -691,13 +691,13 @@ case 2:
     break;
 
   case 77:
-#line 558 "perly.y"
+#line 558 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 79:
-#line 564 "perly.y"
+#line 564 "perly.y" /* yacc.c:1648  */
     { YYSTYPE tmplval;
 			  (void)scan_num("1", &tmplval);
 			  (yyval.opval) = tmplval.opval; }
@@ -705,118 +705,118 @@ case 2:
     break;
 
   case 81:
-#line 572 "perly.y"
+#line 572 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = invert(scalar((ps[0].val.opval))); }
 
     break;
 
   case 82:
-#line 577 "perly.y"
+#line 577 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); intro_my(); }
 
     break;
 
   case 83:
-#line 581 "perly.y"
+#line 581 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); intro_my(); }
 
     break;
 
   case 84:
-#line 584 "perly.y"
+#line 584 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 85:
-#line 585 "perly.y"
+#line 585 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 86:
-#line 589 "perly.y"
+#line 589 "perly.y" /* yacc.c:1648  */
     { (yyval.ival) = start_subparse(FALSE, 0);
 			    SAVEFREESV(PL_compcv); }
 
     break;
 
   case 87:
-#line 595 "perly.y"
+#line 595 "perly.y" /* yacc.c:1648  */
     { (yyval.ival) = start_subparse(FALSE, CVf_ANON);
 			    SAVEFREESV(PL_compcv); }
 
     break;
 
   case 88:
-#line 600 "perly.y"
+#line 600 "perly.y" /* yacc.c:1648  */
     { (yyval.ival) = start_subparse(TRUE, 0);
 			    SAVEFREESV(PL_compcv); }
 
     break;
 
   case 91:
-#line 611 "perly.y"
+#line 611 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 93:
-#line 617 "perly.y"
+#line 617 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 94:
-#line 619 "perly.y"
+#line 619 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 95:
-#line 621 "perly.y"
+#line 621 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 96:
-#line 626 "perly.y"
+#line 626 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 97:
-#line 628 "perly.y"
+#line 628 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 98:
-#line 639 "perly.y"
+#line 639 "perly.y" /* yacc.c:1648  */
     { parser->in_my = 0; (yyval.opval) = NULL; }
 
     break;
 
   case 99:
-#line 641 "perly.y"
+#line 641 "perly.y" /* yacc.c:1648  */
     { parser->in_my = 0; (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 100:
-#line 646 "perly.y"
+#line 646 "perly.y" /* yacc.c:1648  */
     { (yyval.ival) = '@'; }
 
     break;
 
   case 101:
-#line 648 "perly.y"
+#line 648 "perly.y" /* yacc.c:1648  */
     { (yyval.ival) = '%'; }
 
     break;
 
   case 102:
-#line 652 "perly.y"
+#line 652 "perly.y" /* yacc.c:1648  */
     {
                             I32 sigil   = (ps[-2].val.ival);
                             OP *var     = (ps[-1].val.opval);
@@ -836,25 +836,25 @@ case 2:
     break;
 
   case 103:
-#line 671 "perly.y"
+#line 671 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 104:
-#line 673 "perly.y"
+#line 673 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newOP(OP_NULL, 0); }
 
     break;
 
   case 105:
-#line 675 "perly.y"
+#line 675 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 106:
-#line 681 "perly.y"
+#line 681 "perly.y" /* yacc.c:1648  */
     {
                             OP *var     = (ps[-1].val.opval);
                             OP *defexpr = (ps[0].val.opval);
@@ -919,25 +919,25 @@ case 2:
     break;
 
   case 107:
-#line 746 "perly.y"
+#line 746 "perly.y" /* yacc.c:1648  */
     { parser->in_my = KEY_sigvar; (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 108:
-#line 748 "perly.y"
+#line 748 "perly.y" /* yacc.c:1648  */
     { parser->in_my = KEY_sigvar; (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 109:
-#line 754 "perly.y"
+#line 754 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[-1].val.opval); }
 
     break;
 
   case 110:
-#line 756 "perly.y"
+#line 756 "perly.y" /* yacc.c:1648  */
     {
 			  (yyval.opval) = op_append_list(OP_LINESEQ, (ps[-2].val.opval), (ps[0].val.opval));
 			}
@@ -945,43 +945,43 @@ case 2:
     break;
 
   case 111:
-#line 760 "perly.y"
+#line 760 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 112:
-#line 765 "perly.y"
+#line 765 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 113:
-#line 767 "perly.y"
+#line 767 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 114:
-#line 771 "perly.y"
+#line 771 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 115:
-#line 773 "perly.y"
+#line 773 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 116:
-#line 777 "perly.y"
+#line 777 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[-1].val.opval); }
 
     break;
 
   case 117:
-#line 780 "perly.y"
+#line 780 "perly.y" /* yacc.c:1648  */
     {
                             ENTER;
                             SAVEIV(parser->sig_elems);
@@ -996,10 +996,10 @@ case 2:
     break;
 
   case 118:
-#line 791 "perly.y"
+#line 791 "perly.y" /* yacc.c:1648  */
     {
                             OP            *sigops = (ps[0].val.opval);
-                            UNOP_AUX_item *aux;
+                            struct op_argcheck_aux *aux;
                             OP            *check;
 
 			    if (!FEATURE_SIGNATURES_IS_ENABLED)
@@ -1011,21 +1011,32 @@ case 2:
                                 packWARN(WARN_EXPERIMENTAL__SIGNATURES),
                                 "The signatures feature is experimental");
 
-                            aux = (UNOP_AUX_item*)PerlMemShared_malloc(
-                                sizeof(UNOP_AUX_item) * 3);
-                            aux[0].iv = parser->sig_elems;
-                            aux[1].iv = parser->sig_optelems;
-                            aux[2].iv = parser->sig_slurpy;
-                            check = newUNOP_AUX(OP_ARGCHECK, 0, NULL, aux);
+                            aux = (struct op_argcheck_aux*)
+                                    PerlMemShared_malloc(
+                                        sizeof(struct op_argcheck_aux));
+                            aux->params     = parser->sig_elems;
+                            aux->opt_params = parser->sig_optelems;
+                            aux->slurpy     = parser->sig_slurpy;
+                            check = newUNOP_AUX(OP_ARGCHECK, 0, NULL,
+                                            (UNOP_AUX_item *)aux);
                             sigops = op_prepend_elem(OP_LINESEQ, check, sigops);
                             sigops = op_prepend_elem(OP_LINESEQ,
                                                 newSTATEOP(0, NULL, NULL),
                                                 sigops);
                             /* a nextstate at the end handles context
                              * correctly for an empty sub body */
-                            (yyval.opval) = op_append_elem(OP_LINESEQ,
+                            sigops = op_append_elem(OP_LINESEQ,
                                                 sigops,
                                                 newSTATEOP(0, NULL, NULL));
+                            /* wrap the list of arg ops in a NULL aux op.
+                              This serves two purposes. First, it makes
+                              the arg list a separate subtree from the
+                              body of the sub, and secondly the null op
+                              may in future be upgraded to an OP_SIGNATURE
+                              when implemented. For now leave it as
+                              ex-argcheck */
+                            (yyval.opval) = newUNOP_AUX(OP_ARGCHECK, 0, sigops, NULL);
+                            op_null((yyval.opval));
 
                             parser->in_my = 0;
                             /* tell the toker that attrributes can follow
@@ -1044,19 +1055,19 @@ case 2:
     break;
 
   case 119:
-#line 837 "perly.y"
+#line 848 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 120:
-#line 838 "perly.y"
+#line 849 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 121:
-#line 844 "perly.y"
+#line 855 "perly.y" /* yacc.c:1648  */
     {
 			  if (parser->copline > (line_t)(ps[-2].val.ival))
 			      parser->copline = (line_t)(ps[-2].val.ival);
@@ -1066,19 +1077,19 @@ case 2:
     break;
 
   case 122:
-#line 854 "perly.y"
+#line 865 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 123:
-#line 855 "perly.y"
+#line 866 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = NULL; }
 
     break;
 
   case 124:
-#line 859 "perly.y"
+#line 870 "perly.y" /* yacc.c:1648  */
     {
 			  if (parser->copline > (line_t)(ps[-2].val.ival))
 			      parser->copline = (line_t)(ps[-2].val.ival);
@@ -1089,31 +1100,31 @@ case 2:
     break;
 
   case 125:
-#line 870 "perly.y"
+#line 881 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[-2].val.opval), (ps[0].val.opval)); }
 
     break;
 
   case 126:
-#line 872 "perly.y"
+#line 883 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newLOGOP((ps[-1].val.ival), 0, (ps[-2].val.opval), (ps[0].val.opval)); }
 
     break;
 
   case 127:
-#line 874 "perly.y"
+#line 885 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newLOGOP(OP_DOR, 0, (ps[-2].val.opval), (ps[0].val.opval)); }
 
     break;
 
   case 129:
-#line 880 "perly.y"
+#line 891 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[-1].val.opval); }
 
     break;
 
   case 130:
-#line 882 "perly.y"
+#line 893 "perly.y" /* yacc.c:1648  */
     {
 			  OP* term = (ps[0].val.opval);
 			  (yyval.opval) = op_append_elem(OP_LIST, (ps[-2].val.opval), term);
@@ -1122,7 +1133,7 @@ case 2:
     break;
 
   case 132:
-#line 891 "perly.y"
+#line 902 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = op_convert_list((ps[-2].val.ival), OPf_STACKED,
 				op_prepend_elem(OP_LIST, newGVREF((ps[-2].val.ival),(ps[-1].val.opval)), (ps[0].val.opval)) );
 			}
@@ -1130,7 +1141,7 @@ case 2:
     break;
 
   case 133:
-#line 895 "perly.y"
+#line 906 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = op_convert_list((ps[-4].val.ival), OPf_STACKED,
 				op_prepend_elem(OP_LIST, newGVREF((ps[-4].val.ival),(ps[-2].val.opval)), (ps[-1].val.opval)) );
 			}
@@ -1138,7 +1149,7 @@ case 2:
     break;
 
   case 134:
-#line 899 "perly.y"
+#line 910 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = op_convert_list(OP_ENTERSUB, OPf_STACKED,
 				op_append_elem(OP_LIST,
 				    op_prepend_elem(OP_LIST, scalar((ps[-5].val.opval)), (ps[-1].val.opval)),
@@ -1148,7 +1159,7 @@ case 2:
     break;
 
   case 135:
-#line 905 "perly.y"
+#line 916 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = op_convert_list(OP_ENTERSUB, OPf_STACKED,
 				op_append_elem(OP_LIST, scalar((ps[-2].val.opval)),
 				    newMETHOP(OP_METHOD, 0, (ps[0].val.opval))));
@@ -1157,7 +1168,7 @@ case 2:
     break;
 
   case 136:
-#line 910 "perly.y"
+#line 921 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = op_convert_list(OP_ENTERSUB, OPf_STACKED,
 				op_append_elem(OP_LIST,
 				    op_prepend_elem(OP_LIST, (ps[-1].val.opval), (ps[0].val.opval)),
@@ -1167,7 +1178,7 @@ case 2:
     break;
 
   case 137:
-#line 916 "perly.y"
+#line 927 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = op_convert_list(OP_ENTERSUB, OPf_STACKED,
 				op_append_elem(OP_LIST,
 				    op_prepend_elem(OP_LIST, (ps[-3].val.opval), (ps[-1].val.opval)),
@@ -1177,32 +1188,32 @@ case 2:
     break;
 
   case 138:
-#line 922 "perly.y"
+#line 933 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = op_convert_list((ps[-1].val.ival), 0, (ps[0].val.opval)); }
 
     break;
 
   case 139:
-#line 924 "perly.y"
+#line 935 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = op_convert_list((ps[-3].val.ival), 0, (ps[-1].val.opval)); }
 
     break;
 
   case 140:
-#line 926 "perly.y"
+#line 937 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = op_convert_list((ps[-3].val.ival), 0, (ps[-1].val.opval)); }
 
     break;
 
   case 141:
-#line 928 "perly.y"
+#line 939 "perly.y" /* yacc.c:1648  */
     { SvREFCNT_inc_simple_void(PL_compcv);
 			  (yyval.opval) = newANONATTRSUB((ps[-1].val.ival), 0, NULL, (ps[0].val.opval)); }
 
     break;
 
   case 142:
-#line 931 "perly.y"
+#line 942 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
 				 op_append_elem(OP_LIST,
 				   op_prepend_elem(OP_LIST, (ps[-1].val.opval), (ps[0].val.opval)), (ps[-4].val.opval)));
@@ -1211,20 +1222,20 @@ case 2:
     break;
 
   case 145:
-#line 946 "perly.y"
+#line 957 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newBINOP(OP_GELEM, 0, (ps[-4].val.opval), scalar((ps[-2].val.opval))); }
 
     break;
 
   case 146:
-#line 948 "perly.y"
+#line 959 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newBINOP(OP_AELEM, 0, oopsAV((ps[-3].val.opval)), scalar((ps[-1].val.opval)));
 			}
 
     break;
 
   case 147:
-#line 951 "perly.y"
+#line 962 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newBINOP(OP_AELEM, 0,
 					ref(newAVREF((ps[-4].val.opval)),OP_RV2AV),
 					scalar((ps[-1].val.opval)));
@@ -1233,7 +1244,7 @@ case 2:
     break;
 
   case 148:
-#line 956 "perly.y"
+#line 967 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newBINOP(OP_AELEM, 0,
 					ref(newAVREF((ps[-3].val.opval)),OP_RV2AV),
 					scalar((ps[-1].val.opval)));
@@ -1242,14 +1253,14 @@ case 2:
     break;
 
   case 149:
-#line 961 "perly.y"
+#line 972 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newBINOP(OP_HELEM, 0, oopsHV((ps[-4].val.opval)), jmaybe((ps[-2].val.opval)));
 			}
 
     break;
 
   case 150:
-#line 964 "perly.y"
+#line 975 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newBINOP(OP_HELEM, 0,
 					ref(newHVREF((ps[-5].val.opval)),OP_RV2HV),
 					jmaybe((ps[-2].val.opval))); }
@@ -1257,7 +1268,7 @@ case 2:
     break;
 
   case 151:
-#line 968 "perly.y"
+#line 979 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newBINOP(OP_HELEM, 0,
 					ref(newHVREF((ps[-4].val.opval)),OP_RV2HV),
 					jmaybe((ps[-2].val.opval))); }
@@ -1265,7 +1276,7 @@ case 2:
     break;
 
   case 152:
-#line 972 "perly.y"
+#line 983 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
 				   newCVREF(0, scalar((ps[-3].val.opval))));
 			  if (parser->expect == XBLOCK)
@@ -1275,7 +1286,7 @@ case 2:
     break;
 
   case 153:
-#line 978 "perly.y"
+#line 989 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
 				   op_append_elem(OP_LIST, (ps[-1].val.opval),
 				       newCVREF(0, scalar((ps[-4].val.opval)))));
@@ -1286,7 +1297,7 @@ case 2:
     break;
 
   case 154:
-#line 986 "perly.y"
+#line 997 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
 				   op_append_elem(OP_LIST, (ps[-1].val.opval),
 					       newCVREF(0, scalar((ps[-3].val.opval)))));
@@ -1297,7 +1308,7 @@ case 2:
     break;
 
   case 155:
-#line 993 "perly.y"
+#line 1004 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newUNOP(OP_ENTERSUB, OPf_STACKED,
 				   newCVREF(0, scalar((ps[-2].val.opval))));
 			  if (parser->expect == XBLOCK)
@@ -1307,37 +1318,37 @@ case 2:
     break;
 
   case 156:
-#line 999 "perly.y"
+#line 1010 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), (ps[-4].val.opval)); }
 
     break;
 
   case 157:
-#line 1001 "perly.y"
+#line 1012 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), (ps[-3].val.opval)); }
 
     break;
 
   case 158:
-#line 1003 "perly.y"
+#line 1014 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newSLICEOP(0, (ps[-1].val.opval), NULL); }
 
     break;
 
   case 159:
-#line 1008 "perly.y"
+#line 1019 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newASSIGNOP(OPf_STACKED, (ps[-2].val.opval), (ps[-1].val.ival), (ps[0].val.opval)); }
 
     break;
 
   case 160:
-#line 1010 "perly.y"
+#line 1021 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
 
     break;
 
   case 161:
-#line 1012 "perly.y"
+#line 1023 "perly.y" /* yacc.c:1648  */
     {   if ((ps[-1].val.ival) != OP_REPEAT)
 				scalar((ps[-2].val.opval));
 			    (yyval.opval) = newBINOP((ps[-1].val.ival), 0, (ps[-2].val.opval), scalar((ps[0].val.opval)));
@@ -1346,111 +1357,111 @@ case 2:
     break;
 
   case 162:
-#line 1017 "perly.y"
+#line 1028 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
 
     break;
 
   case 163:
-#line 1019 "perly.y"
+#line 1030 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
 
     break;
 
   case 164:
-#line 1021 "perly.y"
+#line 1032 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
 
     break;
 
   case 165:
-#line 1023 "perly.y"
+#line 1034 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
 
     break;
 
   case 166:
-#line 1025 "perly.y"
+#line 1036 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
 
     break;
 
   case 167:
-#line 1027 "perly.y"
+#line 1038 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newBINOP((ps[-1].val.ival), 0, scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
 
     break;
 
   case 168:
-#line 1029 "perly.y"
+#line 1040 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newRANGE((ps[-1].val.ival), scalar((ps[-2].val.opval)), scalar((ps[0].val.opval))); }
 
     break;
 
   case 169:
-#line 1031 "perly.y"
+#line 1042 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newLOGOP(OP_AND, 0, (ps[-2].val.opval), (ps[0].val.opval)); }
 
     break;
 
   case 170:
-#line 1033 "perly.y"
+#line 1044 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newLOGOP(OP_OR, 0, (ps[-2].val.opval), (ps[0].val.opval)); }
 
     break;
 
   case 171:
-#line 1035 "perly.y"
+#line 1046 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newLOGOP(OP_DOR, 0, (ps[-2].val.opval), (ps[0].val.opval)); }
 
     break;
 
   case 172:
-#line 1037 "perly.y"
+#line 1048 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = bind_match((ps[-1].val.ival), (ps[-2].val.opval), (ps[0].val.opval)); }
 
     break;
 
   case 173:
-#line 1042 "perly.y"
+#line 1053 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newUNOP(OP_NEGATE, 0, scalar((ps[0].val.opval))); }
 
     break;
 
   case 174:
-#line 1044 "perly.y"
+#line 1055 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = (ps[0].val.opval); }
 
     break;
 
   case 175:
-#line 1047 "perly.y"
+#line 1058 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newUNOP(OP_NOT, 0, scalar((ps[0].val.opval))); }
 
     break;
 
   case 176:
-#line 1049 "perly.y"
+#line 1060 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newUNOP((ps[-1].val.ival), 0, scalar((ps[0].val.opval))); }
 
     break;
 
   case 177:
-#line 1051 "perly.y"
+#line 1062 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newUNOP(OP_POSTINC, 0,
 					op_lvalue(scalar((ps[-1].val.opval)), OP_POSTINC)); }
 
     break;
 
   case 178:
-#line 1054 "perly.y"
+#line 1065 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newUNOP(OP_POSTDEC, 0,
 					op_lvalue(scalar((ps[-1].val.opval)), OP_POSTDEC));}
 
     break;
 
   case 179:
-#line 1057 "perly.y"
+#line 1068 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = op_convert_list(OP_JOIN, 0,
 				       op_append_elem(
 					OP_LIST,
@@ -1465,155 +1476,155 @@ case 2:
     break;
 
   case 180:
-#line 1068 "perly.y"
+#line 1079 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newUNOP(OP_PREINC, 0,
 					op_lvalue(scalar((ps[0].val.opval)), OP_PREINC)); }
 
     break;
 
   case 181:
-#line 1071 "perly.y"
+#line 1082 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newUNOP(OP_PREDEC, 0,
 					op_lvalue(scalar((ps[0].val.opval)), OP_PREDEC)); }
 
     break;
 
   case 182:
-#line 1078 "perly.y"
+#line 1089 "perly.y" /* yacc.c:1648  */
     { (yyval.opval) = newANONLIST((ps[-1].val.opval)); }
 
     break;
 
   case 183:
-#line 1080 "perly.y"
... 952 lines suppressed ...

-- 
Perl5 Master Repository



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About