summaryrefslogtreecommitdiffstats
path: root/Python/optimizer.c
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2024-07-26 16:40:15 (GMT)
committerGitHub <noreply@github.com>2024-07-26 16:40:15 (GMT)
commit64857d849f3079a73367525ce93fd7a463b83908 (patch)
tree97a3081807cf1697141db03a1fdd6976e2ffc407 /Python/optimizer.c
parentdb2d8b6db1b56c2bd3802b86f9b76da33e8898d7 (diff)
downloadcpython-64857d849f3079a73367525ce93fd7a463b83908.zip
cpython-64857d849f3079a73367525ce93fd7a463b83908.tar.gz
cpython-64857d849f3079a73367525ce93fd7a463b83908.tar.bz2
GH-122294: Burn in the addresses of side exits (GH-122295)
Diffstat (limited to 'Python/optimizer.c')
-rw-r--r--Python/optimizer.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/Python/optimizer.c b/Python/optimizer.c
index f0793b8..7b875af 100644
--- a/Python/optimizer.c
+++ b/Python/optimizer.c
@@ -1153,13 +1153,15 @@ make_executor_from_uops(_PyUOpInstruction *buffer, int length, const _PyBloomFil
*dest = buffer[i];
assert(opcode != _POP_JUMP_IF_FALSE && opcode != _POP_JUMP_IF_TRUE);
if (opcode == _EXIT_TRACE) {
- executor->exits[next_exit].target = buffer[i].target;
- dest->oparg = next_exit;
+ _PyExitData *exit = &executor->exits[next_exit];
+ exit->target = buffer[i].target;
+ dest->operand = (uint64_t)exit;
next_exit--;
}
if (opcode == _DYNAMIC_EXIT) {
- executor->exits[next_exit].target = 0;
- dest->oparg = next_exit;
+ _PyExitData *exit = &executor->exits[next_exit];
+ exit->target = 0;
+ dest->operand = (uint64_t)exit;
next_exit--;
}
}