gh-87729: improve hit rate of LOAD_SUPER_ATTR specialization (#104270)

This commit is contained in:
Carl Meyer 2023-05-11 08:08:13 -06:00 committed by GitHub
parent ddc0e70a32
commit 77262458fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 374 additions and 352 deletions

View file

@ -226,11 +226,13 @@ def pretty(defname):
def kind_to_text(kind, defines, opname):
if kind <= 8:
return pretty(defines[kind][0])
if opname.endswith("ATTR"):
if opname == "LOAD_SUPER_ATTR":
opname = "SUPER"
elif opname.endswith("ATTR"):
opname = "ATTR"
if opname in ("FOR_ITER", "SEND"):
elif opname in ("FOR_ITER", "SEND"):
opname = "ITER"
if opname.endswith("SUBSCR"):
elif opname.endswith("SUBSCR"):
opname = "SUBSCR"
for name in defines[kind]:
if name.startswith(opname):