Revert "gh-133395: add option for extension modules to specialize BINARY_OP/SUBSCR, apply to arrays (#133396)" (#133498)

This commit is contained in:
Irit Katriel 2025-05-06 11:12:26 +01:00 committed by GitHub
parent 3c73cf51df
commit 296cd128bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 44 additions and 171 deletions

View file

@ -143,11 +143,6 @@ typedef struct {
* backwards-compatibility */
typedef Py_ssize_t printfunc;
/* Specialize a binary op by setting the descriptor pointer */
struct _PyBinopSpecializationDescr;
typedef int (*binop_specialize_func)(PyObject *v, PyObject *w, int oparg,
struct _PyBinopSpecializationDescr **descr);
// If this structure is modified, Doc/includes/typestruct.h should be updated
// as well.
struct _typeobject {
@ -238,13 +233,6 @@ struct _typeobject {
/* bitset of which type-watchers care about this type */
unsigned char tp_watched;
/* callback that may specialize BINARY_OP
* this is an experimental API based on the ideas in the paper
* Cross Module Quickening - The Curious Case of C Extensions
* by Felix Berlakovich and Stefan Brunthaler.
*/
binop_specialize_func tp_binop_specialize;
/* Number of tp_version_tag values used.
* Set to _Py_ATTR_CACHE_UNUSED if the attribute cache is
* disabled for this type (e.g. due to custom MRO entries).