Skip to content

Commit 427b106

Browse files
authored
GH-118093: Specialize calls to non-vectorcall classes as CALL_NON_PY_GENERAL (GH-123212)
Specialize classes without vectorcall as CALL_NON_PY_GENERAL
1 parent 79ddf75 commit 427b106

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Python/specialize.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,6 @@ _PyCode_Quicken(PyCodeObject *code)
562562
#define SPEC_FAIL_CALL_INIT_NOT_PYTHON 21
563563
#define SPEC_FAIL_CALL_PEP_523 22
564564
#define SPEC_FAIL_CALL_BOUND_METHOD 23
565-
#define SPEC_FAIL_CALL_STR 24
566-
#define SPEC_FAIL_CALL_CLASS_NO_VECTORCALL 25
567565
#define SPEC_FAIL_CALL_CLASS_MUTABLE 26
568566
#define SPEC_FAIL_CALL_METHOD_WRAPPER 28
569567
#define SPEC_FAIL_CALL_OPERATOR_WRAPPER 29
@@ -1800,9 +1798,7 @@ specialize_class_call(PyObject *callable, _Py_CODEUNIT *instr, int nargs)
18001798
instr->op.code = CALL_BUILTIN_CLASS;
18011799
return 0;
18021800
}
1803-
SPECIALIZATION_FAIL(CALL, tp == &PyUnicode_Type ?
1804-
SPEC_FAIL_CALL_STR : SPEC_FAIL_CALL_CLASS_NO_VECTORCALL);
1805-
return -1;
1801+
goto generic;
18061802
}
18071803
if (Py_TYPE(tp) != &PyType_Type) {
18081804
goto generic;

0 commit comments

Comments
 (0)