This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
authorNicholas Clark <nick@ccl4.org>
Fri, 11 Nov 2005 11:08:12 +0000 (11:08 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 11 Nov 2005 11:08:12 +0000 (11:08 +0000)
[ 24967]
don't repopulate PADTMP slots with null SVs when freeing ops

[ 24968]
change 24967 got the #endif in the wrong place
p4raw-link: @24968 on //depot/perl: 97bf4a8db0735eddad0b5c21db0179b51615ee65
p4raw-link: @24967 on //depot/perl: 9ad9869ce96041d364276ea3274adb7f55af5eff

p4raw-id: //depot/maint-5.8/perl@26084
p4raw-integrated: from //depot/perl@26083 'copy in'
ext/B/t/optree_samples.t (@23891..)
p4raw-integrated: from //depot/perl@24967 'copy in' ext/B/t/f_sort.t
(@23891..) 'edit in' pad.c (@24966..)

ext/B/t/f_sort.t
ext/B/t/optree_samples.t
pad.c

index 7b34713..fa1ece3 100644 (file)
@@ -104,7 +104,7 @@ checkOptree(note   => q{},
 # 7  <0> pushmark s
 # 8  <#> gv[*articles] s
 # 9  <1> rv2av[t2] lKRM*/1
-# a  <2> aassign[t5] KS
+# a  <2> aassign[t3] KS
 # b  <1> leavesub[1 ref] K/REFC,1
 EOT_EOT
 # 1  <;> nextstate(main 546 (eval 15):1) v
@@ -178,7 +178,7 @@ checkOptree(note   => q{},
 # 7  <0> pushmark s
 # 8  <#> gv[*articles] s
 # 9  <1> rv2av[t2] lKRM*/1
-# a  <2> aassign[t5] KS
+# a  <2> aassign[t3] KS
 # b  <1> leavesub[1 ref] K/REFC,1
 EOT_EOT
 # 1  <;> nextstate(main 546 (eval 15):1) v
@@ -215,7 +215,7 @@ checkOptree(note   => q{},
 # 7  <0> pushmark s
 # 8  <#> gv[*articles] s
 # 9  <1> rv2av[t2] lKRM*/1
-# a  <2> aassign[t5] KS
+# a  <2> aassign[t3] KS
 # b  <1> leavesub[1 ref] K/REFC,1
 EOT_EOT
 # 1  <;> nextstate(main 546 (eval 15):1) v
@@ -252,7 +252,7 @@ checkOptree(note   => q{},
 # 7  <0> pushmark s
 # 8  <#> gv[*articles] s
 # 9  <1> rv2av[t2] lKRM*/1
-# a  <2> aassign[t5] KS
+# a  <2> aassign[t3] KS
 # b  <1> leavesub[1 ref] K/REFC,1
 EOT_EOT
 # 1  <;> nextstate(main 546 (eval 15):1) v
@@ -799,7 +799,7 @@ checkOptree(note   => q{},
 # d  <0> pushmark s
 # e  <#> gv[*result] s
 # f  <1> rv2av[t2] lKRM*/1
-# g  <2> aassign[t5] KS/COMMON
+# g  <2> aassign[t3] KS/COMMON
 # h  <1> leavesub[1 ref] K/REFC,1
 EOT_EOT
 # 1  <;> nextstate(main 547 (eval 15):1) v
index 442ae6a..4f0d782 100644 (file)
@@ -607,7 +607,7 @@ checkOptree ( name  => 'map $_+42, 10..20',
 # 3  <$> const[AV ] s
 # 4  <1> rv2av lKPM/1
 # 5  <@> mapstart K
-# 6  <|> mapwhile(other->7)[t7] K
+# 6  <|> mapwhile(other->7)[t5] K
 # 7      <#> gvsv[*_] s
 # 8      <$> const[IV 42] s
 # 9      <2> add[t2] sK/2
diff --git a/pad.c b/pad.c
index acdefff..0eee23b 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -1018,8 +1018,15 @@ Perl_pad_swipe(pTHX_ PADOFFSET po, bool refadjust)
     if (refadjust)
        SvREFCNT_dec(PL_curpad[po]);
 
+
+    /* if pad tmps aren't shared between ops, then there's no need to
+     * create a new tmp when an existing op is freed */
+#ifdef USE_BROKEN_PAD_RESET
     PL_curpad[po] = NEWSV(1107,0);
     SvPADTMP_on(PL_curpad[po]);
+#else
+    PL_curpad[po] = &PL_sv_undef;
+#endif
     if ((I32)po < PL_padix)
        PL_padix = po - 1;
 }