@@ -2944,27 +2944,20 @@ dummy_func(
2944
2944
GO_TO_INSTRUCTION (CALL_PY_EXACT_ARGS );
2945
2945
}
2946
2946
2947
- op (_CHECK_CALL_PY_EXACT_ARGS , (func_version /2 , callable , self_or_null , unused [oparg ] -- method , callable , unused [oparg ])) {
2947
+ op (_CHECK_CALL_PY_EXACT_ARGS , (func_version /2 , callable , self_or_null , unused [oparg ] -- callable , self_or_null , unused [oparg ])) {
2948
2948
ASSERT_KWNAMES_IS_NULL ();
2949
2949
DEOPT_IF (tstate -> interp -> eval_frame , CALL );
2950
- int argcount = oparg ;
2951
- if (self_or_null != NULL ) {
2952
- args -- ;
2953
- argcount ++ ;
2954
- }
2955
2950
DEOPT_IF (!PyFunction_Check (callable ), CALL );
2956
2951
PyFunctionObject * func = (PyFunctionObject * )callable ;
2957
2952
DEOPT_IF (func -> func_version != func_version , CALL );
2958
2953
PyCodeObject * code = (PyCodeObject * )func -> func_code ;
2959
- DEOPT_IF (code -> co_argcount != argcount , CALL );
2954
+ DEOPT_IF (code -> co_argcount != oparg + ( self_or_null != NULL ) , CALL );
2960
2955
DEOPT_IF (!_PyThreadState_HasStackSpace (tstate , code -> co_framesize ), CALL );
2961
2956
}
2962
2957
2963
- op (_INIT_CALL_PY_EXACT_ARGS , (method , callable , args [oparg ] -- new_frame : _PyInterpreterFrame * )) {
2964
- int is_meth = method != NULL ;
2958
+ op (_INIT_CALL_PY_EXACT_ARGS , (callable , self_or_null , args [oparg ] -- new_frame : _PyInterpreterFrame * )) {
2965
2959
int argcount = oparg ;
2966
- if (is_meth ) {
2967
- callable = method ;
2960
+ if (self_or_null != NULL ) {
2968
2961
args -- ;
2969
2962
argcount ++ ;
2970
2963
}
@@ -2987,7 +2980,7 @@ dummy_func(
2987
2980
_INIT_CALL_PY_EXACT_ARGS +
2988
2981
_PUSH_FRAME ;
2989
2982
2990
- inst (CALL_PY_WITH_DEFAULTS , (unused /1 , func_version /2 , method , callable , args [oparg ] -- unused )) {
2983
+ inst (CALL_PY_WITH_DEFAULTS , (unused /1 , func_version /2 , callable , self_or_null , args [oparg ] -- unused )) {
2991
2984
ASSERT_KWNAMES_IS_NULL ();
2992
2985
DEOPT_IF (tstate -> interp -> eval_frame , CALL );
2993
2986
int argcount = oparg ;
0 commit comments