The last element in the proto is never stale.
authorPeter Martini <PeterCMartini@GMail.com>
Thu, 18 Oct 2012 00:13:19 +0000 (20:13 -0400)
committerPeter Martini <PeterCMartini@GMail.com>
Thu, 18 Oct 2012 00:13:19 +0000 (20:13 -0400)
Moved the code to turn it off to an unconditional location.
Prior to this move, an unused greedy parameter would still
be stale, and scope would fail an assertion.

pp_hot.c

index 67f442c..4578454 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2726,8 +2726,8 @@ try_autoload:
                SV ** source = AvARRAY(av);
                UV saveclearval = SAVEt_CLEARSV;
                SSCHECK(max + (I32)greedy);
+               SvPADSTALE_off(PAD_SVl(namecnt));
                if (items >= namecnt) {
-                   SvPADSTALE_off(PAD_SVl(namecnt));
                    if (SvTYPE(PAD_SVl(namecnt)) < SVt_PVAV) {
                        sv_setsv(PAD_SVl(namecnt), source[namecnt-1]);
                        --max;