mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
GH-119476: Split _CHECK_FUNCTION_VERSION out of _CHECK_FUNCTION_EXACT_ARGS (GH-119510)
This commit is contained in:
parent
d87b015106
commit
cfcc054dee
6 changed files with 24 additions and 24 deletions
10
Python/executor_cases.c.h
generated
10
Python/executor_cases.c.h
generated
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue