From 3a8cefba0b60bd25c6b13a32cab4eb8d1dbf94ce Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Tue, 1 Apr 2025 16:55:05 -0700 Subject: GH-131726: Split up _CHECK_VALIDITY_AND_SET_IP (GH-131810) --- Python/optimizer.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Python/optimizer.c') diff --git a/Python/optimizer.c b/Python/optimizer.c index ace16faa70f..f8d0aa04b9e 100644 --- a/Python/optimizer.c +++ b/Python/optimizer.c @@ -569,13 +569,11 @@ translate_bytecode_to_trace( goto done; } assert(opcode != ENTER_EXECUTOR && opcode != EXTENDED_ARG); - if (OPCODE_HAS_NO_SAVE_IP(opcode)) { - RESERVE_RAW(2, "_CHECK_VALIDITY"); - ADD_TO_TRACE(_CHECK_VALIDITY, 0, 0, target); - } - else { - RESERVE_RAW(2, "_CHECK_VALIDITY_AND_SET_IP"); - ADD_TO_TRACE(_CHECK_VALIDITY_AND_SET_IP, 0, (uintptr_t)instr, target); + RESERVE_RAW(2, "_CHECK_VALIDITY"); + ADD_TO_TRACE(_CHECK_VALIDITY, 0, 0, target); + if (!OPCODE_HAS_NO_SAVE_IP(opcode)) { + RESERVE_RAW(2, "_SET_IP"); + ADD_TO_TRACE(_SET_IP, 0, (uintptr_t)instr, target); } /* Special case the first instruction, -- cgit v1.2.3