]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-118093: Specialize calls to non-vectorcall classes as `CALL_NON_PY_GENERAL` (GH...
authorBrandt Bucher <brandtbucher@microsoft.com>
Thu, 22 Aug 2024 10:50:55 +0000 (03:50 -0700)
committerGitHub <noreply@github.com>
Thu, 22 Aug 2024 10:50:55 +0000 (11:50 +0100)
Specialize classes without vectorcall as CALL_NON_PY_GENERAL

Python/specialize.c

index db794bea0bee2936026cda6b71c444be5122e578..26965fe2e136f9749aa86e844f2c334d05b5ef03 100644 (file)
@@ -562,8 +562,6 @@ _PyCode_Quicken(PyCodeObject *code)
 #define SPEC_FAIL_CALL_INIT_NOT_PYTHON 21
 #define SPEC_FAIL_CALL_PEP_523 22
 #define SPEC_FAIL_CALL_BOUND_METHOD 23
-#define SPEC_FAIL_CALL_STR 24
-#define SPEC_FAIL_CALL_CLASS_NO_VECTORCALL 25
 #define SPEC_FAIL_CALL_CLASS_MUTABLE 26
 #define SPEC_FAIL_CALL_METHOD_WRAPPER 28
 #define SPEC_FAIL_CALL_OPERATOR_WRAPPER 29
@@ -1800,9 +1798,7 @@ specialize_class_call(PyObject *callable, _Py_CODEUNIT *instr, int nargs)
             instr->op.code = CALL_BUILTIN_CLASS;
             return 0;
         }
-        SPECIALIZATION_FAIL(CALL, tp == &PyUnicode_Type ?
-            SPEC_FAIL_CALL_STR : SPEC_FAIL_CALL_CLASS_NO_VECTORCALL);
-        return -1;
+        goto generic;
     }
     if (Py_TYPE(tp) != &PyType_Type) {
         goto generic;