This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
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.