Skip to content

Commit 0658f1b

Browse files
remove CALL_LIST_APPEND fix
1 parent ae1d6fe commit 0658f1b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Python/specialize.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,12 +2041,8 @@ specialize_method_descriptor(PyMethodDescrObject *descr, _Py_CODEUNIT *instr,
20412041
bool pop = (next.op.code == POP_TOP);
20422042
int oparg = instr->op.arg;
20432043
if ((PyObject *)descr == list_append && oparg == 1 && pop) {
2044-
PyThreadState *tstate = PyThreadState_GET();
2045-
PyObject *self = PyStackRef_AsPyObjectBorrow(tstate->current_frame->stackpointer[-2]);
2046-
if (PyList_CheckExact(self)) {
2047-
specialize(instr, CALL_LIST_APPEND);
2048-
return 0;
2049-
}
2044+
specialize(instr, CALL_LIST_APPEND);
2045+
return 0;
20502046
}
20512047
specialize(instr, CALL_METHOD_DESCRIPTOR_O);
20522048
return 0;

0 commit comments

Comments
 (0)