summaryrefslogtreecommitdiffstats
path: root/Python/executor_cases.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r--Python/executor_cases.c.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 2c2dbf4..805ea06 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -1425,6 +1425,24 @@
break;
}
+ case _GUARD_TYPE_VERSION: {
+ PyObject *owner = stack_pointer[-1];
+ uint32_t type_version = (uint32_t)operand;
+ PyTypeObject *tp = Py_TYPE(owner);
+ assert(type_version != 0);
+ DEOPT_IF(tp->tp_version_tag != type_version, LOAD_ATTR);
+ break;
+ }
+
+ case _CHECK_MANAGED_OBJECT_HAS_VALUES: {
+ PyObject *owner = stack_pointer[-1];
+ assert(Py_TYPE(owner)->tp_dictoffset < 0);
+ assert(Py_TYPE(owner)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
+ PyDictOrValues dorv = *_PyObject_DictOrValuesPointer(owner);
+ DEOPT_IF(!_PyDictOrValues_IsValues(dorv), LOAD_ATTR);
+ break;
+ }
+
case COMPARE_OP: {
static_assert(INLINE_CACHE_ENTRIES_COMPARE_OP == 1, "incorrect cache size");
PyObject *right = stack_pointer[-1];