diff options
author | Tony Cook <tony@develop-help.com> | 2021-02-10 11:18:45 +1100 |
---|---|---|
committer | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2021-02-14 13:40:50 +0000 |
commit | 6b729d2440b795f848f610a8cc410a3f6be6388b (patch) | |
tree | 68143844990d5b45cbe0ceccf9b3fef2458a505a /proto.h | |
parent | 683e0651b057a7be4b2765ceb3d9f6617cd4c464 (diff) | |
download | perl-6b729d2440b795f848f610a8cc410a3f6be6388b.tar.gz |
try isn't treated as a sub call like eval is
The try change added code to pp_return to skip past try contexts
when looking for the sub/sort/eval context to return from.
This was only needed because cx_pusheval() sets si_cxsubix to the
current frame and try uses that function to push it's context, that
value is then used by the dopopto_cursub() macro to shortcut
walking the context stack.
Since we don't need to treat try as a sub for return, list vs array
checks or lvalue sub checks, don't set si_cxsubix on try.
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4479,6 +4479,11 @@ PERL_STATIC_INLINE void Perl_cx_pushsub(pTHX_ PERL_CONTEXT *cx, CV *cv, OP *reto assert(cx); assert(cv) #endif #ifndef PERL_NO_INLINE_FUNCTIONS +PERL_STATIC_INLINE void Perl_cx_pushtry(pTHX_ PERL_CONTEXT *cx, OP *retop); +#define PERL_ARGS_ASSERT_CX_PUSHTRY \ + assert(cx) +#endif +#ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE void Perl_cx_pushwhen(pTHX_ PERL_CONTEXT *cx); #define PERL_ARGS_ASSERT_CX_PUSHWHEN \ assert(cx) |