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

[perl #96944] [PATCH] Remove OPpENTERSUB_NOMOD.

Thread Previous
From:
Gerard Goossen
Date:
August 14, 2011 03:46
Subject:
[perl #96944] [PATCH] Remove OPpENTERSUB_NOMOD.
Message ID:
rt-3.6.HEAD-31297-1313318787-1264.96944-75-0@perl.org
# New Ticket Created by  Gerard Goossen 
# Please include the string:  [perl #96944]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=96944 >



This is a bug report for perl from gerard@ggoossen.net,
generated with the help of perlbug 1.39 running under perl 5.15.1.

>From 356357dc27170017b6a150b9cdc1e4507ca7d870 Mon Sep 17 00:00:00 2001
From: Gerard Goossen <gerard@ggoossen.net>
Date: Sat, 13 Aug 2011 18:51:48 +0200
Subject: [PATCH] Remove OPpENTERSUB_NOMOD.

OPpENTERSUB_NOMOD was always set in combination with OPf_WANT_VOID
which is now used to not propagate the lvalue context, making
OPpENTERSUB_NOMOD redundant.
---
 dump.c |    3 ---
 op.c   |    3 ---
 op.h   |    1 -
 3 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/dump.c b/dump.c
index c32807c..c19cb8e 100644
--- a/dump.c
+++ b/dump.c
@@ -811,7 +811,6 @@ const struct flag_to_name op_trans_names[] = {
 const struct flag_to_name op_entersub_names[] = {
     {OPpENTERSUB_DB, ",DB"},
     {OPpENTERSUB_HASTARG, ",HASTARG"},
-    {OPpENTERSUB_NOMOD, ",NOMOD"},
     {OPpENTERSUB_AMPER, ",AMPER"},
     {OPpENTERSUB_NOPAREN, ",NOPAREN"},
     {OPpENTERSUB_INARGS, ",INARGS"}
@@ -2962,8 +2961,6 @@ Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o)
 		    sv_catpv(tmpsv, ",NOPAREN");
 		if (o->op_private & OPpENTERSUB_INARGS)
 		    sv_catpv(tmpsv, ",INARGS");
-		if (o->op_private & OPpENTERSUB_NOMOD)
-		    sv_catpv(tmpsv, ",NOMOD");
 	    }
 	    else {
 		switch (o->op_private & OPpDEREF) {
diff --git a/op.c b/op.c
index 3f5313d..1aebf91 100644
--- a/op.c
+++ b/op.c
@@ -1759,8 +1759,6 @@ Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags)
 	    op_null(((LISTOP*)cUNOPo->op_first)->op_first);/* disable pushmark */
 	    break;
 	}
-	else if (o->op_private & OPpENTERSUB_NOMOD)
-	    return o;
 	else {				/* lvalue subroutine call */
 	    o->op_private |= OPpLVAL_INTRO
 	                   |(OPpENTERSUB_INARGS * (type == OP_LEAVESUBLV));
@@ -2356,7 +2354,6 @@ S_apply_attrs_my(pTHX_ HV *stash, OP *target, OP *attrs, OP **imopsp)
 		   op_append_elem(OP_LIST,
 			       op_prepend_elem(OP_LIST, pack, list(arg)),
 			       newSVOP(OP_METHOD_NAMED, 0, meth)));
-    imop->op_private |= OPpENTERSUB_NOMOD;
 
     /* Combine the ops. */
     *imopsp = op_append_elem(OP_LIST, *imopsp, imop);
diff --git a/op.h b/op.h
index 873dc49..f01e0bf 100644
--- a/op.h
+++ b/op.h
@@ -207,7 +207,6 @@ 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_NOMOD	64	/* Immune to op_lvalue() for :attrlist. */
 #define OPpENTERSUB_INARGS	4	/* Lval used as arg to a sub. */
 #define OPpENTERSUB_DEREF	1	/* Lval call that autovivifies. */
 /* used by HINT_STRICT_SUBS     2          */
-- 
1.7.5.4

---
Flags:
    category=core
    severity=low
---
Site configuration information for perl 5.15.1:

Configured by gerard at Sun Aug 14 12:21:38 CEST 2011.

Summary of my perl5 (revision 5 version 15 subversion 1) configuration:
  Commit id: 699e6d637d01cb2033f3acfaf1d8ad76daf1227b
  Platform:
    osname=linux, osvers=2.6.39-2-686-pae, archname=i686-linux
    uname='linux zeus 2.6.39-2-686-pae #1 smp tue jul 5 03:48:49 utc 2011 i686 gnulinux '
    config_args='-des -DDEBUGGING -Doptimize=-O3 -g3 -Dusedevel -Dprefix=/home/gerard/perl/inst/blead-codegen'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O3 -g3',
    cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.6.1', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/lib/i386-linux-gnu /usr/lib64
    libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.13'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O3 -g3 -L/usr/local/lib -fstack-protector'

Locally applied patches:
    

---
@INC for perl 5.15.1:
    lib
    /home/gerard/perl/inst/blead-codegen/lib/site_perl/5.15.1/i686-linux
    /home/gerard/perl/inst/blead-codegen/lib/site_perl/5.15.1
    /home/gerard/perl/inst/blead-codegen/lib/5.15.1/i686-linux
    /home/gerard/perl/inst/blead-codegen/lib/5.15.1
    /home/gerard/perl/inst/blead-codegen/lib/site_perl
    .

---
Environment for perl 5.15.1:
    HOME=/home/gerard
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/gerard/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Thread Previous


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