GH-119476: Split _CHECK_FUNCTION_VERSION out of _CHECK_FUNCTION_EXACT_ARGS (GH-119510)

This commit is contained in:
Brandt Bucher 2024-05-28 12:45:11 -07:00 committed by GitHub
parent d87b015106
commit cfcc054dee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 24 additions and 24 deletions

View file

@ -3240,16 +3240,8 @@
oparg = CURRENT_OPARG();
self_or_null = stack_pointer[-1 - oparg];
callable = stack_pointer[-2 - oparg];
uint32_t func_version = (uint32_t)CURRENT_OPERAND();
if (!PyFunction_Check(callable)) {
UOP_STAT_INC(uopcode, miss);
JUMP_TO_JUMP_TARGET();
}
assert(PyFunction_Check(callable));
PyFunctionObject *func = (PyFunctionObject *)callable;
if (func->func_version != func_version) {
UOP_STAT_INC(uopcode, miss);
JUMP_TO_JUMP_TARGET();
}
PyCodeObject *code = (PyCodeObject *)func->func_code;
if (code->co_argcount != oparg + (self_or_null != NULL)) {
UOP_STAT_INC(uopcode, miss);