diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-11-08 12:30:33 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-11-08 16:06:42 -0800 |
commit | 61aeaf969d4829d2801f5ecc331dbd94627b2b8f (patch) | |
tree | 4fe1ea6533e86825755dcd386b82e1cedf4b92e3 /regen/opcodes | |
parent | 15da1ccf5401cb5b69ab5ab40a17dd79ebcde211 (diff) | |
download | perl-61aeaf969d4829d2801f5ecc331dbd94627b2b8f.tar.gz |
Remove OA_DANGEROUS from sort
OA_DANGEROUS indicates that temporary copies may need to be made in
list assignment, to handle things like:
($a, $b) = ($b, $a);
In other words, an op type is flagged with OA_DANGEROUS if its return
values could occur elsewhere on the stack.
pp_sort returns its arguments. aassign_common_vars will check its kid
ops for danger as well, so it’s not necessary for sort itself to be
flagged this way. This will allow cases like ($a,$b) = sort($c,$d) to
forego the temp copy.
Diffstat (limited to 'regen/opcodes')
-rw-r--r-- | regen/opcodes | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/regen/opcodes b/regen/opcodes index 6d0e41729b..52e3ab1450 100644 --- a/regen/opcodes +++ b/regen/opcodes @@ -254,7 +254,7 @@ push push ck_fun imsT@ A L pop pop ck_shift s% A? shift shift ck_shift s% A? unshift unshift ck_fun imsT@ A L -sort sort ck_sort dm@ C? L +sort sort ck_sort m@ C? L reverse reverse ck_fun mt@ L grepstart grep ck_grep dm@ C L |