This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pad.c:pad_alloc: Remove redundant IS_PADGV
authorFather Chrysostomos <sprout@cpan.org>
Thu, 18 Sep 2014 03:20:53 +0000 (20:20 -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 by the time this
check is reached, IS_PADGV can never be true.

pad.c

diff --git a/pad.c b/pad.c
index a342349..6320afb 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -773,8 +773,7 @@ Perl_pad_alloc(pTHX_ I32 optype, U32 tmptype)
 #else
                    (SVs_PADMY|SVs_PADTMP)
 #endif
-                ) &&
-               !IS_PADGV(sv))
+                ))
                break;
        }
        if (konst) {