mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
GH-99298: Clean up attribute specializations (GH-99398)
This commit is contained in:
parent
8555dee5ae
commit
b629fdd88a
5 changed files with 39 additions and 57 deletions
|
@ -1137,11 +1137,7 @@ dummy_func(
|
|||
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);
|
||||
|
@ -1713,11 +1709,7 @@ dummy_func(
|
|||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue