GH-131798: Split CALL_LEN into several uops (GH-133180)

This commit is contained in:
Diego Russo 2025-05-05 22:31:48 +01:00 committed by GitHub
parent 893034cf93
commit 9cc77aaf9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 314 additions and 281 deletions

View file

@ -2147,7 +2147,7 @@ specialize_c_call(PyObject *callable, _Py_CODEUNIT *instr, int nargs)
}
/* len(o) */
PyInterpreterState *interp = _PyInterpreterState_GET();
if (callable == interp->callable_cache.len) {
if (callable == interp->callable_cache.len && instr->op.arg == 1) {
specialize(instr, CALL_LEN);
return 0;
}