summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2021-02-10 11:18:45 +1100
committerPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2021-02-14 13:40:50 +0000
commit6b729d2440b795f848f610a8cc410a3f6be6388b (patch)
tree68143844990d5b45cbe0ceccf9b3fef2458a505a /proto.h
parent683e0651b057a7be4b2765ceb3d9f6617cd4c464 (diff)
downloadperl-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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index 3d2e6b58c1..faca6d1366 100644
--- a/proto.h
+++ b/proto.h
@@ -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)