]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
remove CALL_LIST_APPEND fix
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Tue, 11 Nov 2025 15:12:12 +0000 (15:12 +0000)
committerKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Tue, 11 Nov 2025 15:12:12 +0000 (15:12 +0000)
Python/specialize.c

index 5b44432b8b7258c3ba3f63a64f2c79a64e32dccf..a1c5dedd61563bea2a046897ea4a3085f2c82dc6 100644 (file)
@@ -2041,12 +2041,8 @@ specialize_method_descriptor(PyMethodDescrObject *descr, _Py_CODEUNIT *instr,
             bool pop = (next.op.code == POP_TOP);
             int oparg = instr->op.arg;
             if ((PyObject *)descr == list_append && oparg == 1 && pop) {
-                PyThreadState *tstate = PyThreadState_GET();
-                PyObject *self = PyStackRef_AsPyObjectBorrow(tstate->current_frame->stackpointer[-2]);
-                if (PyList_CheckExact(self)) {
-                    specialize(instr, CALL_LIST_APPEND);
-                    return 0;
-                }
+                specialize(instr, CALL_LIST_APPEND);
+                return 0;
             }
             specialize(instr, CALL_METHOD_DESCRIPTOR_O);
             return 0;