Skip to content

Commit

Permalink
gh-116381: Remove bad specializations, add fail stats (GH-116464)
Browse files Browse the repository at this point in the history
* Remove bad specializations, add fail stats
  • Loading branch information
Fidget-Spinner authored Mar 7, 2024
1 parent 4298d69 commit 41457c7
Show file tree
Hide file tree
Showing 16 changed files with 125 additions and 320 deletions.
2 changes: 0 additions & 2 deletions Include/internal/pycore_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ typedef struct {

PyAPI_FUNC(PyObject *)_PyList_FromArraySteal(PyObject *const *src, Py_ssize_t n);

PyAPI_FUNC(int) _PyList_Contains(PyObject *aa, PyObject *el);

#ifdef __cplusplus
}
#endif
Expand Down
27 changes: 3 additions & 24 deletions Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Include/internal/pycore_tuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ typedef struct {
PyTupleObject *it_seq; /* Set to NULL when iterator is exhausted */
} _PyTupleIterObject;

PyAPI_FUNC(int) _PyTuple_Contains(PyTupleObject *a, PyObject *el);

#ifdef __cplusplus
}
#endif
Expand Down
3 changes: 0 additions & 3 deletions Include/internal/pycore_uop_ids.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions Include/internal/pycore_uop_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 37 additions & 40 deletions Include/opcode_ids.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 37 additions & 43 deletions Lib/_opcode_metadata.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Objects/listobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,8 @@ list_length(PyObject *a)
return PyList_GET_SIZE(a);
}

int
_PyList_Contains(PyObject *aa, PyObject *el)
static int
list_contains(PyObject *aa, PyObject *el)
{

for (Py_ssize_t i = 0; ; i++) {
Expand Down Expand Up @@ -3147,7 +3147,7 @@ static PySequenceMethods list_as_sequence = {
0, /* sq_slice */
list_ass_item, /* sq_ass_item */
0, /* sq_ass_slice */
_PyList_Contains, /* sq_contains */
list_contains, /* sq_contains */
list_inplace_concat, /* sq_inplace_concat */
list_inplace_repeat, /* sq_inplace_repeat */
};
Expand Down
6 changes: 3 additions & 3 deletions Objects/tupleobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ tuplelength(PyTupleObject *a)
return Py_SIZE(a);
}

int
_PyTuple_Contains(PyTupleObject *a, PyObject *el)
static int
tuplecontains(PyTupleObject *a, PyObject *el)
{
Py_ssize_t i;
int cmp;
Expand Down Expand Up @@ -758,7 +758,7 @@ static PySequenceMethods tuple_as_sequence = {
0, /* sq_slice */
0, /* sq_ass_item */
0, /* sq_ass_slice */
(objobjproc)_PyTuple_Contains, /* sq_contains */
(objobjproc)tuplecontains, /* sq_contains */
};

static PyObject*
Expand Down
Loading

0 comments on commit 41457c7

Please sign in to comment.