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 Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
September 1, 2011 12:45
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-1314906340-515.98182-15-0@perl.org
On Thu Sep 01 09:18:02 2011, sprout wrote:
> 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.

Ignore that.  I got myself confused somehow.  I’ve applied your patch as
6c5d4499.  Thank you.

> 
> >  @{$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 Previous | 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