develooper Front page | perl.perl5.porters | Postings from September 2011

[perl #98182] [PATCH] Reassign op_private flags of OP_ENTERSUB such that bits 32 and 64 can be used by OPpDEREF

Thread Next
From:
Father Chrysostomos via RT
Date:
September 1, 2011 09:18
Subject:
[perl #98182] [PATCH] Reassign op_private flags of OP_ENTERSUB such that bits 32 and 64 can be used by OPpDEREF
Message ID:
rt-3.6.HEAD-31297-1314893882-195.98182-15-0@perl.org
On Wed Aug 31 10:52:46 2011, ggoossen wrote:
> 
> This is a bug report for perl from gerard@ggoossen.net,
> generated with the help of perlbug 1.39 running under perl 5.15.2.
> 
> From 1e9abfa7b76b2ece144fdd15200579359ab2e441 Mon Sep 17 00:00:00 2001
> From: Gerard Goossen <gerard@ggoossen.net>
> Date: Wed, 31 Aug 2011 15:30:00 +0200
> Subject: [PATCH] Reassign op_private flags of OP_ENTERSUB such that
bits 32
>  and 64 can be used by OPpDEREF
> 
> ---
>  ext/B/B/Concise.pm |    2 +-
>  op.h               |    6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm
> index 45e7ba9..0551667 100644
> --- a/ext/B/B/Concise.pm
> +++ b/ext/B/B/Concise.pm
> @@ -613,7 +613,7 @@ $priv{$_}{4} = "DREFed" for (qw(rv2sv rv2av rv2hv));
>    for (qw(rv2gv rv2sv padsv aelem helem));
>  $priv{$_}{16} = "STATE" for ("padav", "padhv", "padsv");
>  $priv{rv2gv}{4} = "NOINIT";
> -@{$priv{"entersub"}}{1,4,16,32,64} = qw( DREF INARGS DBG TARG );
> +@{$priv{"entersub"}}{1,4,16,32,64} = qw( INARGS TARG DBG DEREF );

That is not consistent with your re-numbering in op.h. (And the 64,
which I left by mistake, makes this even more confusing.)

>  @{$priv{rv2cv}}{1,8,128} = ("CONST","AMPER","NO()");
>  $priv{"gv"}{32} = "EARLYCV";
>  $priv{"aelem"}{16} = $priv{"helem"}{16} = "LVDEFER";
> diff --git a/op.h b/op.h
> index f23ff2d..70b6358 100644
> --- a/op.h
> +++ b/op.h
> @@ -204,9 +204,9 @@ Deprecated.  Use C<GIMME_V> instead.
>  
>    /* OP_ENTERSUB only */
>  #define OPpENTERSUB_DB		16	/* Debug subroutine. */
> -#define OPpENTERSUB_HASTARG	32	/* Called from OP tree. */
> -#define OPpENTERSUB_INARGS	4	/* Lval used as arg to a sub. */
> -#define OPpENTERSUB_DEREF	1	/* Lval call that autovivifies. */
> +#define OPpENTERSUB_HASTARG	4	/* Called from OP tree. */
> +#define OPpENTERSUB_INARGS	1	/* Lval used as arg to a sub. */
> +#define OPpENTERSUB_DEREF	32	/* Lval call that autovivifies. */
>  /* used by HINT_STRICT_SUBS     2          */
>    /* Mask for OP_ENTERSUB flags, the absence of which must be propagated
>       in dynamic context */




Thread Next


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