GH-122294: Burn in the addresses of side exits (GH-122295)

This commit is contained in:
Brandt Bucher 2024-07-26 09:40:15 -07:00 committed by GitHub
parent db2d8b6db1
commit 64857d849f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 24 additions and 19 deletions

View file

@ -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--;
}
}