GH-129715: Remove _DYNAMIC_EXIT (GH-129716)

This commit is contained in:
Brandt Bucher 2025-02-07 11:41:17 -08:00 committed by GitHub
parent e4a00f70b1
commit 5fa7e1b7fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 138 additions and 226 deletions

View file

@ -757,9 +757,8 @@ translate_bytecode_to_trace(
opcode == SEND_GEN)
{
DPRINTF(2, "Bailing due to dynamic target\n");
ADD_TO_TRACE(uop, oparg, 0, target);
ADD_TO_TRACE(_DYNAMIC_EXIT, 0, 0, 0);
goto done;
OPT_STAT_INC(unknown_callee);
return 0;
}
assert(_PyOpcode_Deopt[opcode] == CALL || _PyOpcode_Deopt[opcode] == CALL_KW);
int func_version_offset =
@ -825,9 +824,8 @@ translate_bytecode_to_trace(
goto top;
}
DPRINTF(2, "Bail, new_code == NULL\n");
ADD_TO_TRACE(uop, oparg, 0, target);
ADD_TO_TRACE(_DYNAMIC_EXIT, 0, 0, 0);
goto done;
OPT_STAT_INC(unknown_callee);
return 0;
}
if (uop == _BINARY_OP_INPLACE_ADD_UNICODE) {
@ -914,7 +912,7 @@ count_exits(_PyUOpInstruction *buffer, int length)
int exit_count = 0;
for (int i = 0; i < length; i++) {
int opcode = buffer[i].opcode;
if (opcode == _EXIT_TRACE || opcode == _DYNAMIC_EXIT) {
if (opcode == _EXIT_TRACE) {
exit_count++;
}
}
@ -1119,12 +1117,6 @@ make_executor_from_uops(_PyUOpInstruction *buffer, int length, const _PyBloomFil
dest->operand0 = (uint64_t)exit;
next_exit--;
}
if (opcode == _DYNAMIC_EXIT) {
_PyExitData *exit = &executor->exits[next_exit];
exit->target = 0;
dest->operand0 = (uint64_t)exit;
next_exit--;
}
}
assert(next_exit == -1);
assert(dest == executor->trace);