This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
call_sv(), fold_const(): different CX pop test
Perl_call_sv() and S_fold_constants() both have similar code that:
pushes an EVAL context, does a JMPENV_PUSH() and CALLRUNOPS(), then
optionally pops the EVAL context.
The optionally part depends on whether what's doing the dying
has already popped the context before long-jumping. Currently the decision
on whether to pop is based on whether the scope stack has already been
popped.
This commit changes that to whether the context stack has already been
popped, since shortly we're going to change eval contexts so that the old
savestack_ix is stored in the CX struct rather than on the scope stack.
I ran this code with some asserts that the two conditions were identical,
and nothing failed.