gh-108487: Move assert(self != NULL) down beyond DEOPT_IF() (#108510)

This commit is contained in:
Guido van Rossum 2023-08-28 10:17:00 -07:00 committed by GitHub
parent 4116592b6f
commit 47d7eba889
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View file

@ -4412,9 +4412,9 @@
callable = stack_pointer[-2 - oparg];
ASSERT_KWNAMES_IS_NULL();
assert(oparg == 1);
assert(self != NULL);
PyInterpreterState *interp = tstate->interp;
DEOPT_IF(callable != interp->callable_cache.list_append, CALL);
assert(self != NULL);
DEOPT_IF(!PyList_Check(self), CALL);
STAT_INC(CALL, hit);
if (_PyList_AppendTakeRef((PyListObject *)self, args[0]) < 0) {