From d3bd6b5f3f48731715e21fe132b8e65a4e5f6ce8 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Fri, 19 Apr 2024 09:25:07 +0100 Subject: GH-115419: Improve list of escaping functions (GH-118054) --- Python/optimizer_analysis.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Python/optimizer_analysis.c') diff --git a/Python/optimizer_analysis.c b/Python/optimizer_analysis.c index 90444e33568..efc5b3c39b6 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; -- cgit v1.2.3