@@ -2944,27 +2944,20 @@ dummy_func(
29442944 GO_TO_INSTRUCTION (CALL_PY_EXACT_ARGS );
29452945 }
29462946
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 ])) {
29482948 ASSERT_KWNAMES_IS_NULL ();
29492949 DEOPT_IF (tstate -> interp -> eval_frame , CALL );
2950- int argcount = oparg ;
2951- if (self_or_null != NULL ) {
2952- args -- ;
2953- argcount ++ ;
2954- }
29552950 DEOPT_IF (!PyFunction_Check (callable ), CALL );
29562951 PyFunctionObject * func = (PyFunctionObject * )callable ;
29572952 DEOPT_IF (func -> func_version != func_version , CALL );
29582953 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 );
29602955 DEOPT_IF (!_PyThreadState_HasStackSpace (tstate , code -> co_framesize ), CALL );
29612956 }
29622957
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 * )) {
29652959 int argcount = oparg ;
2966- if (is_meth ) {
2967- callable = method ;
2960+ if (self_or_null != NULL ) {
29682961 args -- ;
29692962 argcount ++ ;
29702963 }
@@ -2987,7 +2980,7 @@ dummy_func(
29872980 _INIT_CALL_PY_EXACT_ARGS +
29882981 _PUSH_FRAME ;
29892982
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 )) {
29912984 ASSERT_KWNAMES_IS_NULL ();
29922985 DEOPT_IF (tstate -> interp -> eval_frame , CALL );
29932986 int argcount = oparg ;
0 commit comments