summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2022-09-07 22:02:08 (GMT)
committerGitHub <noreply@github.com>2022-09-07 22:02:08 (GMT)
commit4e4bfffe2ded7339663945ad4c494db0e88ec96c (patch)
treefd0af2d3464ae3de99304faad2e5baaedec0f6f9 /Tools/scripts
parentb65686c50563c5f64b4eb6e684807c6ab6089523 (diff)
downloadcpython-4e4bfffe2ded7339663945ad4c494db0e88ec96c.zip
cpython-4e4bfffe2ded7339663945ad4c494db0e88ec96c.tar.gz
cpython-4e4bfffe2ded7339663945ad4c494db0e88ec96c.tar.bz2
GH-90699: use statically allocated interned strings in typeobject's slotdefs (GH-94706)
Diffstat (limited to 'Tools/scripts')
-rw-r--r--Tools/scripts/generate_global_objects.py36
1 files changed, 34 insertions, 2 deletions
diff --git a/Tools/scripts/generate_global_objects.py b/Tools/scripts/generate_global_objects.py
index a50f3ba..0432bf5 100644
--- a/Tools/scripts/generate_global_objects.py
+++ b/Tools/scripts/generate_global_objects.py
@@ -14,6 +14,7 @@ IGNORED = {
'DUNDER', # Objects/typeobject.c
'RDUNDER', # Objects/typeobject.c
'SPECIAL', # Objects/weakrefobject.c
+ 'NAME', # Objects/typeobject.c
}
IDENTIFIERS = [
# from ADD() Python/_warnings.c
@@ -42,11 +43,27 @@ IDENTIFIERS = [
# from SLOT* in Objects/typeobject.c
'__abs__',
'__add__',
+ '__aiter__',
'__and__',
- '__divmod__',
+ '__anext__',
+ '__await__',
+ '__bool__',
+ '__call__',
+ '__contains__',
+ '__del__',
+ '__delattr__',
+ '__delete__',
+ '__delitem__',
+ '__eq__',
'__float__',
'__floordiv__',
+ '__ge__',
+ '__get__',
+ '__getattr__',
+ '__getattribute__',
'__getitem__',
+ '__gt__',
+ '__hash__',
'__iadd__',
'__iand__',
'__ifloordiv__',
@@ -54,24 +71,34 @@ IDENTIFIERS = [
'__imatmul__',
'__imod__',
'__imul__',
+ '__index__',
+ '__init__',
'__int__',
'__invert__',
'__ior__',
+ '__ipow__',
'__irshift__',
'__isub__',
+ '__iter__',
'__itruediv__',
'__ixor__',
+ '__le__',
+ '__len__',
'__lshift__',
+ '__lt__',
'__matmul__',
'__mod__',
'__mul__',
+ '__ne__',
'__neg__',
+ '__new__',
+ '__next__',
'__or__',
'__pos__',
'__pow__',
'__radd__',
'__rand__',
- '__rdivmod__',
+ '__repr__',
'__rfloordiv__',
'__rlshift__',
'__rmatmul__',
@@ -84,10 +111,15 @@ IDENTIFIERS = [
'__rsub__',
'__rtruediv__',
'__rxor__',
+ '__set__',
+ '__setattr__',
+ '__setitem__',
'__str__',
'__sub__',
'__truediv__',
'__xor__',
+ '__divmod__',
+ '__rdivmod__',
]