@@ -1789,8 +1789,7 @@ specialize_class_call(PyObject *callable, _Py_CODEUNIT *instr, int nargs)
1789
1789
return -1 ;
1790
1790
}
1791
1791
if (Py_TYPE (tp ) != & PyType_Type ) {
1792
- SPECIALIZATION_FAIL (CALL , SPEC_FAIL_CALL_METACLASS );
1793
- return -1 ;
1792
+ goto generic ;
1794
1793
}
1795
1794
if (tp -> tp_new == PyBaseObject_Type .tp_new ) {
1796
1795
PyFunctionObject * init = get_init_for_simple_managed_python_class (tp );
@@ -1807,10 +1806,10 @@ specialize_class_call(PyObject *callable, _Py_CODEUNIT *instr, int nargs)
1807
1806
_Py_SET_OPCODE (* instr , CALL_ALLOC_AND_ENTER_INIT );
1808
1807
return 0 ;
1809
1808
}
1810
- return -1 ;
1811
1809
}
1812
- SPECIALIZATION_FAIL (CALL , SPEC_FAIL_CALL_CLASS_MUTABLE );
1813
- return -1 ;
1810
+ generic :
1811
+ instr -> op .code = CALL_NON_PY_GENERAL ;
1812
+ return 0 ;
1814
1813
}
1815
1814
1816
1815
#ifdef Py_STATS
@@ -1901,8 +1900,8 @@ specialize_method_descriptor(PyMethodDescrObject *descr, _Py_CODEUNIT *instr,
1901
1900
return 0 ;
1902
1901
}
1903
1902
}
1904
- SPECIALIZATION_FAIL ( CALL , meth_descr_call_fail_kind ( descr -> d_method -> ml_flags )) ;
1905
- return -1 ;
1903
+ instr -> op . code = CALL_NON_PY_GENERAL ;
1904
+ return 0 ;
1906
1905
}
1907
1906
1908
1907
static int
@@ -1936,7 +1935,6 @@ specialize_py_call(PyFunctionObject *func, _Py_CODEUNIT *instr, int nargs,
1936
1935
}
1937
1936
else {
1938
1937
instr -> op .code = bound_method ? CALL_BOUND_METHOD_GENERAL : CALL_PY_GENERAL ;
1939
- return 0 ;
1940
1938
}
1941
1939
return 0 ;
1942
1940
}
@@ -1945,6 +1943,7 @@ static int
1945
1943
specialize_c_call (PyObject * callable , _Py_CODEUNIT * instr , int nargs )
1946
1944
{
1947
1945
if (PyCFunction_GET_FUNCTION (callable ) == NULL ) {
1946
+ SPECIALIZATION_FAIL (CALL , SPEC_FAIL_OTHER );
1948
1947
return 1 ;
1949
1948
}
1950
1949
switch (PyCFunction_GET_FLAGS (callable ) &
0 commit comments