This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pad.c:pad_tidy: Remove redundant IS_PADGV
authorFather Chrysostomos <sprout@cpan.org>
Thu, 18 Sep 2014 03:23:29 +0000 (20:23 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 18 Sep 2014 06:39:28 +0000 (23:39 -0700)
GVs are stored in the pads in two code paths, newPADOP when called by
newGVOP, and ck_rvconst.  Both of those now set the pad name to
&PL_sv_no, as of c9859fbde1 and c2bad63bb3.  So GVs are now excluded
from the check a few lines below, just like constants.

pad.c

diff --git a/pad.c b/pad.c
index 6320afb..2f62504 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -1778,8 +1778,7 @@ Perl_pad_tidy(pTHX_ padtidy_type type)
             * pad are anonymous subs, constants and GVs.
             * The rest are created anew during cloning.
             */
-           if (!PL_curpad[ix] || SvIMMORTAL(PL_curpad[ix])
-                || IS_PADGV(PL_curpad[ix]))
+           if (!PL_curpad[ix] || SvIMMORTAL(PL_curpad[ix]))
                continue;
            namesv = namep[ix];
            if (!(PadnamePV(namesv) &&