mirror of
https://github.com/python/cpython.git
synced 2026-01-05 06:52:26 +00:00
gh-143092: Make CALL_LIST_APPEND and BINARY_OP_INPLACE_ADD_UNICODE normal instructions (GH-143124)
These super instructions need many special cases in the interpreter, specializer, and JIT. It's best we convert them to normal instructions.
This commit is contained in:
parent
594a4631c3
commit
cf6758ff9e
14 changed files with 167 additions and 205 deletions
|
|
@ -1623,10 +1623,8 @@ specialize_method_descriptor(PyMethodDescrObject *descr, PyObject *self_or_null,
|
|||
}
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET();
|
||||
PyObject *list_append = interp->callable_cache.list_append;
|
||||
_Py_CODEUNIT next = instr[INLINE_CACHE_ENTRIES_CALL + 1];
|
||||
bool pop = (next.op.code == POP_TOP);
|
||||
int oparg = instr->op.arg;
|
||||
if ((PyObject *)descr == list_append && oparg == 1 && pop) {
|
||||
if ((PyObject *)descr == list_append && oparg == 1) {
|
||||
assert(self_or_null != NULL);
|
||||
if (PyList_CheckExact(self_or_null)) {
|
||||
specialize(instr, CALL_LIST_APPEND);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue