GH-99298: Clean up attribute specializations (GH-99398)

This commit is contained in:
Brandt Bucher 2022-11-17 15:09:18 -08:00 committed by GitHub
parent 8555dee5ae
commit b629fdd88a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 57 deletions

View file

@ -1136,11 +1136,7 @@
PyObject *owner = TOP();
PyObject *name = GETITEM(names, oparg);
next_instr--;
if (_Py_Specialize_StoreAttr(owner, next_instr, name)) {
// "undo" the rewind so end up in the correct handler:
next_instr++;
goto error;
}
_Py_Specialize_StoreAttr(owner, next_instr, name);
DISPATCH_SAME_OPARG();
}
STAT_INC(STORE_ATTR, deferred);
@ -1718,11 +1714,7 @@
PyObject *owner = TOP();
PyObject *name = GETITEM(names, oparg>>1);
next_instr--;
if (_Py_Specialize_LoadAttr(owner, next_instr, name)) {
// "undo" the rewind so end up in the correct handler:
next_instr++;
goto error;
}
_Py_Specialize_LoadAttr(owner, next_instr, name);
DISPATCH_SAME_OPARG();
}
STAT_INC(LOAD_ATTR, deferred);