mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +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
|
@ -3261,10 +3261,9 @@ dummy_func(
|
|||
DEOPT_IF(tstate->interp->eval_frame);
|
||||
}
|
||||
|
||||
op(_CHECK_FUNCTION_EXACT_ARGS, (func_version/2, callable, self_or_null, unused[oparg] -- callable, self_or_null, unused[oparg])) {
|
||||
EXIT_IF(!PyFunction_Check(callable));
|
||||
op(_CHECK_FUNCTION_EXACT_ARGS, (callable, self_or_null, unused[oparg] -- callable, self_or_null, unused[oparg])) {
|
||||
assert(PyFunction_Check(callable));
|
||||
PyFunctionObject *func = (PyFunctionObject *)callable;
|
||||
EXIT_IF(func->func_version != func_version);
|
||||
PyCodeObject *code = (PyCodeObject *)func->func_code;
|
||||
EXIT_IF(code->co_argcount != oparg + (self_or_null != NULL));
|
||||
}
|
||||
|
@ -3308,6 +3307,7 @@ dummy_func(
|
|||
_CHECK_PEP_523 +
|
||||
_CHECK_CALL_BOUND_METHOD_EXACT_ARGS +
|
||||
_INIT_CALL_BOUND_METHOD_EXACT_ARGS +
|
||||
_CHECK_FUNCTION_VERSION +
|
||||
_CHECK_FUNCTION_EXACT_ARGS +
|
||||
_CHECK_STACK_SPACE +
|
||||
_INIT_CALL_PY_EXACT_ARGS +
|
||||
|
@ -3317,6 +3317,7 @@ dummy_func(
|
|||
macro(CALL_PY_EXACT_ARGS) =
|
||||
unused/1 + // Skip over the counter
|
||||
_CHECK_PEP_523 +
|
||||
_CHECK_FUNCTION_VERSION +
|
||||
_CHECK_FUNCTION_EXACT_ARGS +
|
||||
_CHECK_STACK_SPACE +
|
||||
_INIT_CALL_PY_EXACT_ARGS +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue