This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove OA_DANGEROUS from cond_expr
authorFather Chrysostomos <sprout@cpan.org>
Sat, 8 Nov 2014 20:37:43 +0000 (12:37 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 9 Nov 2014 00:06:43 +0000 (16:06 -0800)
commitaafd37e70de747bdeaa820466cb60c553c54882e
treebb777c8c9047ba60da67f59bb4e8ad282e17b41c
parentf39944c15e410735fc6ec1ad2f9dfa84ea4e409d
Remove OA_DANGEROUS from cond_expr

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.

?: always returns one of its arguments.  Since aassign_common_vars,
which does the danger check, also checks the kids of the cond_expr op,
it is not necessary for cond_expr to be flagged this way.
opcode.h
regen/opcodes