develooper Front page | perl.perl5.porters | Postings from October 2005

[perl #37573] dead OPs

Thread Next
From:
Nicholas Clark
Date:
October 31, 2005 08:46
Subject:
[perl #37573] dead OPs
Message ID:
rt-3.0.11-37573-123691.17.4586877196976@perl.org
# New Ticket Created by  Nicholas Clark 
# Please include the string:  [perl #37573]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37573 >



This is a bug report for perl from nick@ccl4.org,
generated with the help of perlbug 1.35 running under perl v5.9.3.


-----------------------------------------------------------------
[Please enter your report here]

gcov suggests that several OPS are never called. Can we remove them?

		
		PP(pp_scalar)
      ######    {
      ######        return NORMAL;
		}

		
		PP(pp_padany)
      ######    {
      ######        DIE(aTHX_ "NOT IMPL LINE %d",__LINE__);
		}

		
		PP(pp_regcmaybe)
      ######    {
      ######        return NORMAL;
		}

		
		PP(pp_mapstart)
      ######    {
      ######        DIE(aTHX_ "panic: mapstart");	/* uses grepstart */
		}


		PP(pp_lineseq)
      ######    {
      ######        return NORMAL;
		}

		
		PP(pp_threadsv)
      ######    {
      ######        DIE(aTHX_ "tried to access per-thread data in non-threaded perl");
		}

		
		PP(pp_setstate)
      ######    {
      ######        PL_curcop = (COP*)PL_op;
      ######        return NORMAL;
		}

Some of these never-used ops might be because my coverage report was for an
unthreaded perl.

I assume that pp_dump is not used merely because it's never tested:

		
		PP(pp_dump)
      ######    {
      ######        return pp_goto();
		    /*NOTREACHED*/
		}

Oh. Interesting:

		
		PP(pp_seekdir)
      ######    {
		#if defined(HAS_SEEKDIR) || defined(seekdir)
      ######        dSP;
      ######        long along = POPl;
      ######        GV *gv = (GV*)POPs;
      ######        register IO *io = GvIOn(gv);
		
      ######        if (!io || !IoDIRP(io))
      ######    	goto nope;
		
      ######        (void)PerlDir_seek(IoDIRP(io), along);
		
      ######        RETPUSHYES;
		nope:
      ######        if (!errno)
      ######    	SETERRNO(EBADF,RMS_ISI);
      ######        RETPUSHUNDEF;
		#else
		    DIE(aTHX_ PL_no_dir_func, "seekdir");
		#endif
		}

		
		PP(pp_gnbyaddr)
      ######    {
		#ifdef HAS_GETNETBYADDR
      ######        return pp_gnetent();
		#else
		    DIE(aTHX_ PL_no_sock_func, "getnetbyaddr");
		#endif
		}

		
		PP(pp_gsbyport)
      ######    {
		#ifdef HAS_GETSERVBYPORT
      ######        return pp_gservent();
		#else
		    DIE(aTHX_ PL_no_sock_func, "getservbyport");
		#endif
		}

		PP(pp_shostent)
      ######    {
		#ifdef HAS_SETHOSTENT
      ######        dSP;
      ######        PerlSock_sethostent(TOPi);
      ######        RETSETYES;
		#else
		    DIE(aTHX_ PL_no_sock_func, "sethostent");
		#endif
		}
		
		PP(pp_snetent)
      ######    {
		#ifdef HAS_SETNETENT
      ######        dSP;
      ######        PerlSock_setnetent(TOPi);
      ######        RETSETYES;
		#else
		    DIE(aTHX_ PL_no_sock_func, "setnetent");
		#endif
		}
		
		PP(pp_sprotoent)
      ######    {
		#ifdef HAS_SETPROTOENT
      ######        dSP;
      ######        PerlSock_setprotoent(TOPi);
      ######        RETSETYES;
		#else
		    DIE(aTHX_ PL_no_sock_func, "setprotoent");
		#endif
		}
		
		PP(pp_sservent)
      ######    {
		#ifdef HAS_SETSERVENT
      ######        dSP;
      ######        PerlSock_setservent(TOPi);
      ######        RETSETYES;
		#else
		    DIE(aTHX_ PL_no_sock_func, "setservent");
		#endif
		}
		
		PP(pp_ehostent)
      ######    {
		#ifdef HAS_ENDHOSTENT
      ######        dSP;
      ######        PerlSock_endhostent();
      ######        EXTEND(SP,1);
      ######        RETPUSHYES;
		#else
		    DIE(aTHX_ PL_no_sock_func, "endhostent");
		#endif
		}
		
		PP(pp_enetent)
      ######    {
		#ifdef HAS_ENDNETENT
      ######        dSP;
      ######        PerlSock_endnetent();
      ######        EXTEND(SP,1);
      ######        RETPUSHYES;
		#else
		    DIE(aTHX_ PL_no_sock_func, "endnetent");
		#endif
		}
		
		PP(pp_eprotoent)
      ######    {
		#ifdef HAS_ENDPROTOENT
      ######        dSP;
      ######        PerlSock_endprotoent();
      ######        EXTEND(SP,1);
      ######        RETPUSHYES;
		#else
		    DIE(aTHX_ PL_no_sock_func, "endprotoent");
		#endif
		}
		
		PP(pp_eservent)
      ######    {
		#ifdef HAS_ENDSERVENT
      ######        dSP;
      ######        PerlSock_endservent();
      ######        EXTEND(SP,1);
      ######        RETPUSHYES;
		#else
		    DIE(aTHX_ PL_no_sock_func, "endservent");
		#endif
		}

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=wishlist
---
Site configuration information for perl v5.9.3:

Configured by nick at Mon Oct 31 16:06:24 GMT 2005.

Summary of my perl5 (revision 5 version 9 subversion 3) configuration:
  Platform:
    osname=freebsd, osvers=5.3-release-p2, archname=i386-freebsd
    uname='freebsd saigo.etla.org 5.3-release-p2 freebsd 5.3-release-p2 #1: wed dec 15 21:05:13 gmt 2004 root@saigo.etla.org:usrobjusrsrcsyssaigo i386 '
    config_args='-Dusedevel=y -Dcc=ccache gcc -Dld=gcc -Ubincompat5005 -Uinstallusrbinperl -Dcf_email=nick@ccl4.org -Dperladmin=nick@ccl4.org -Dinc_version_list=  -Dinc_version_list_init=0 -Doptimize=-Os -Uusethreads -Uuse64bitint -Uusemymalloc -Duseperlio -Dprefix=~/Sandpit/snap5.9.x-25928 -Dinstallman1dir=none -Dinstallman3dir=none -de'
    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='ccache gcc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include',
    optimize='-Os',
    cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include'
    ccversion='', gccversion='3.4.2 [FreeBSD] 20040728', 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='gcc', ldflags ='-Wl,-E  -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lm -lcrypt -lutil -lc
    perllibs=-lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.9.3:
    lib
    /home/nick/Sandpit/snap5.9.x-25928/lib/perl5/5.9.3/i386-freebsd
    /home/nick/Sandpit/snap5.9.x-25928/lib/perl5/5.9.3
    /home/nick/Sandpit/snap5.9.x-25928/lib/perl5/site_perl/5.9.3/i386-freebsd
    /home/nick/Sandpit/snap5.9.x-25928/lib/perl5/site_perl/5.9.3
    /home/nick/Sandpit/snap5.9.x-25928/lib/perl5/site_perl
    .

---
Environment for perl v5.9.3:
    HOME=/home/nick
    LANG (unset)
    LANGUAGE (unset)
    LC_ALL=en_GB.ISO8859-1
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/nick/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/nick/bin:/usr/local/sbin:/sbin:/usr/sbin
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/bash


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