summaryrefslogtreecommitdiff
path: root/pp_sort.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-09-17 22:10:47 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-09-17 23:39:30 -0700
commit9bad585fd42ac7b91e4ae2831711c9148fe9fed1 (patch)
tree3bdf92ca688954863d3a1783176cf7d76163b0e2 /pp_sort.c
parent3b6e69b1b32e689d76dc3c485f17606b4a8d5a93 (diff)
downloadperl-9bad585fd42ac7b91e4ae2831711c9148fe9fed1.tar.gz
Remove !IS_PADGV assertions
Commit 60779a30f stopped setting PADTMP on GVs in pads, and changed many instances of if(SvPADTMP && !IS_PADGV) to if(SvPADTMP){assert(!IS_PADGV)...}. This PADTMP was leftover from the original ithreads implementation that marked these as PADTMP under the assumption that anything in a pad had to be marked PADMY or PADTMP. Since we don’t want these GVs copied the way operator targets are (PADTMP indicates the latter), we needed this !IS_PADGV check all over the place. 60779a30f was actually right in removing the flag and the !IS_PADGV check, because it should be possible for XS modules to create ops that return copiable GVs. But the assertions prevent that from working. More importantly (to me at least), this IS_PADGV doesn’t quite make sense and I am trying to eliminate it. BTW, you have to be doubly naughty, but it is possible to fail these assertions: $ ./perl -Ilib -e 'BEGIN { sub { $::{foo} = \@_; constant::_make_const(@_) }->(*bar) } \ foo' Assertion failed: (!IS_PADGV(sv)), function S_refto, file pp.c, line 576. Abort trap: 6
Diffstat (limited to 'pp_sort.c')
-rw-r--r--pp_sort.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/pp_sort.c b/pp_sort.c
index f75ecd9f03..9213621abc 100644
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1604,7 +1604,6 @@ PP(pp_sort)
for (i=max; i > 0 ; i--) {
if ((*p1 = *p2++)) { /* Weed out nulls. */
if (copytmps && SvPADTMP(*p1)) {
- assert(!IS_PADGV(*p1));
*p1 = sv_mortalcopy(*p1);
}
SvTEMP_off(*p1);