This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_hot.c: pp_rv2av: Squash repetitive code
authorFather Chrysostomos <sprout@cpan.org>
Sun, 26 Aug 2012 18:59:19 +0000 (11:59 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 26 Aug 2012 20:16:54 +0000 (13:16 -0700)
commit9f527363e9a5fddbef57d6741c431af8b53b5470
tree1f6ccc3fd00b64d075c3cd11b7331ee503e17fac
parent3da9985538c5eae2dd2de1309b320bc77f757687
pp_hot.c: pp_rv2av: Squash repetitive code

The LVRET that I removed (in the if(SvTYPE(sv) == type) block) actu-
ally never evaluates to true, because that block is only entered for
%hash->{elem} or @array->[elem], in which the parent op is helem or
aelem, not leavesublv or return.  LVRET only returns true if the cur-
rent op is the last op in an lvalue sub.  Likewise, the OPpMAYBE_LVSUB
flag is never set in that case, so checking it now is harmless (the
cases that used to enter the if(SvTyPE(sv)==type) block now fall
through to the OPpMAYBE_LVSUB check).

(Using LVRET in pp_rv2av is actually incorrect, and I corrected most instances in 40c94d11, but this one remained.)
pp_hot.c