Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pp_return(): tail call pp_leavetry()
When 'return'ing from an eval { BLOCK }, rather than handling it ourselves, fall through to pp_leavetry(). pp_return() is now only responsible for popping any extra contexts and junk from the stack. This helps avoid two different blocks of code doing roughly the same thing. The functional changes caused by this commit signify the divergence over time between pp_leavetry and the try-ish parts of pp_return. After this commit, a return will: * now do an PERL_ASYNC_CHECK(); * be smarter about not unnecessarily creating mortal copies of returned args; * restore PL_curpm *before* the LEAVE() rather than after. The first two are probably good things; I'm not sure about the latter; it may well be a regression, but nothing tests for it. At least it's consistent now.
- Loading branch information