-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Closed
Description
Currently _GUARD_TYPE_VERSION looks like this in Python/bytecodes.c:
op(_GUARD_TYPE_VERSION, (type_version/2, owner -- owner)) {
PyTypeObject *tp = Py_TYPE(owner);
assert(type_version != 0);
DEOPT_IF(tp->tp_version_tag != type_version);
}
My question is about that assert. As I split more opcodes into uops, I find some variations of this -- a few opcodes didn't have such an assert, a few others have it after the DEOPT_IF call. Are there really places where the cache can contain a type_version field that is zero? And if so, should those match a zero tp_version_tag in the type?
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels