GH-116202: Incorporate invalidation check into _START_EXECUTOR. (GH-118044)

This commit is contained in:
Mark Shannon 2024-04-19 09:26:42 +01:00 committed by GitHub
parent d3bd6b5f3f
commit 7e6fa5fced
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 4 deletions

View file

@ -1109,8 +1109,6 @@ make_executor_from_uops(_PyUOpInstruction *buffer, int length, const _PyBloomFil
assert(next_exit == -1);
assert(dest == executor->trace);
assert(dest->opcode == _START_EXECUTOR);
dest->oparg = 0;
dest->target = 0;
_Py_ExecutorInit(executor, dependencies);
#ifdef Py_DEBUG
char *python_lltrace = Py_GETENV("PYTHON_LLTRACE");
@ -1314,7 +1312,7 @@ counter_optimize(
}
_Py_CODEUNIT *target = instr + 1 + _PyOpcode_Caches[JUMP_BACKWARD] - oparg;
_PyUOpInstruction buffer[5] = {
{ .opcode = _START_EXECUTOR },
{ .opcode = _START_EXECUTOR, .jump_target = 4, .format=UOP_FORMAT_JUMP },
{ .opcode = _LOAD_CONST_INLINE_BORROW, .operand = (uintptr_t)self },
{ .opcode = _INTERNAL_INCREMENT_OPT_COUNTER },
{ .opcode = _EXIT_TRACE, .jump_target = 4, .format=UOP_FORMAT_JUMP },