aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/optimizer.c
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2025-04-01 16:55:05 -0700
committerGitHub <noreply@github.com>2025-04-01 16:55:05 -0700
commit3a8cefba0b60bd25c6b13a32cab4eb8d1dbf94ce (patch)
treef30e2b51ec12b18e0bc26d27bd95fa3283b4cf64 /Python/optimizer.c
parent1a9d4a1fb3d4beda7c7e8483af7c6bc7ac477e9f (diff)
downloadcpython-3a8cefba0b60bd25c6b13a32cab4eb8d1dbf94ce.tar.gz
cpython-3a8cefba0b60bd25c6b13a32cab4eb8d1dbf94ce.zip
GH-131726: Split up _CHECK_VALIDITY_AND_SET_IP (GH-131810)
Diffstat (limited to 'Python/optimizer.c')
-rw-r--r--Python/optimizer.c12
1 files changed, 5 insertions, 7 deletions
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,