This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_return: optimise a couple of conditions
Change:
if (cxix < 0) {
A; return;
}
if (cxix < cxstack_ix)
B;
to
if (cxix < cxstack_ix) {
if (cxix < 0) {
A; return;
}
B;
}
This is functionally the same, since cxstack_ix is always positive at
this point, and makes for a quicker code path (one less test and branch)
in the reasonably common case of a return from a sub which doesn't
have any extra nested contexts to pop.