summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/B/t/f_sort.t10
-rw-r--r--ext/B/t/optree_samples.t2
-rw-r--r--pad.c7
3 files changed, 13 insertions, 6 deletions
diff --git a/ext/B/t/f_sort.t b/ext/B/t/f_sort.t
index 7b3471339a..fa1ece3b0e 100644
--- a/ext/B/t/f_sort.t
+++ b/ext/B/t/f_sort.t
@@ -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
diff --git a/ext/B/t/optree_samples.t b/ext/B/t/optree_samples.t
index 442ae6adc4..4f0d782710 100644
--- a/ext/B/t/optree_samples.t
+++ b/ext/B/t/optree_samples.t
@@ -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 ed68c40662..e1f7b692c4 100644
--- a/pad.c
+++ b/pad.c
@@ -1055,10 +1055,17 @@ 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;
if ((I32)po < PL_padix)
PL_padix = po - 1;
+#endif
}