Save one NULL assignment per TMP
[perl.git] / scope.c
diff --git a/scope.c b/scope.c
index e3b4c79..42e3af8 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -160,8 +160,13 @@ Perl_free_tmps(pTHX)
     /* XXX should tmps_floor live in cxstack? */
     const I32 myfloor = PL_tmps_floor;
     while (PL_tmps_ix > myfloor) {      /* clean up after last statement */
-       SV* const sv = PL_tmps_stack[PL_tmps_ix];
-       PL_tmps_stack[PL_tmps_ix--] = NULL;
+#ifdef PERL_POISON
+        SV* const sv = PL_tmps_stack[PL_tmps_ix];
+        PoisonWith(sv, 1, sizeof(SV *), 0xAB);
+        PL_tmps_ix--;
+#else
+       SV* const sv = PL_tmps_stack[PL_tmps_ix--];
+#endif
        if (sv && sv != &PL_sv_undef) {
            SvTEMP_off(sv);
            SvREFCNT_dec(sv);           /* note, can modify tmps_ix!!! */