Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-116381: Remove bad specializations, add fail stats #116464

Merged
merged 3 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading