summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-04-19 08:25:07 (GMT)
committerGitHub <noreply@github.com>2024-04-19 08:25:07 (GMT)
commitd3bd6b5f3f48731715e21fe132b8e65a4e5f6ce8 (patch)
treebdf065fa2eb1e8a8795ee9650ff0d633c6c802e9 /Python
parentfefd5d97111364afa027ae580c3244f427dda59d (diff)
downloadcpython-d3bd6b5f3f48731715e21fe132b8e65a4e5f6ce8.zip
cpython-d3bd6b5f3f48731715e21fe132b8e65a4e5f6ce8.tar.gz
cpython-d3bd6b5f3f48731715e21fe132b8e65a4e5f6ce8.tar.bz2
GH-115419: Improve list of escaping functions (GH-118054)
Diffstat (limited to 'Python')
-rw-r--r--Python/optimizer_analysis.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/optimizer_analysis.c b/Python/optimizer_analysis.c
index 90444e3..efc5b3c 100644
--- a/Python/optimizer_analysis.c
+++ b/Python/optimizer_analysis.c
@@ -543,7 +543,9 @@ remove_unneeded_uops(_PyUOpInstruction *buffer, int buffer_size)
return pc + 1;
default:
{
- bool needs_ip = false;
+ /* _PUSH_FRAME doesn't escape or error, but it
+ * does need the IP for the return address */
+ bool needs_ip = opcode == _PUSH_FRAME;
if (_PyUop_Flags[opcode] & HAS_ESCAPES_FLAG) {
needs_ip = true;
may_have_escaped = true;