64
64
* `PYFLOAT_TYPE`: `Py_TYPE(val) == &PyFloat_Type`
65
65
* `PYUNICODE_TYPE`: `Py_TYPE(val) == &PYUNICODE_TYPE`
66
66
* `NULL_TYPE`: `val == NULL`
67
- * `GUARD_TYPE_VERSION_TYPE`: `type->tp_version_tag == auxillary`
68
- * `GUARD_DORV_VALUES_TYPE`: `_PyDictOrValues_IsValues(obj)`
69
- * `GUARD_KEYS_VERSION_TYPE`: `owner_heap_type->ht_cached_keys->dk_version == auxillary`
70
67
* `PYMETHOD_TYPE`: `Py_TYPE(val) == &PyMethod_Type`
71
68
* `PYFUNCTION_TYPE_VERSION_TYPE`:
72
- `PyFunction_Check(callable) && func->func_version == auxillary && code->co_argcount == oparg + (self_or_null != NULL)`
69
+ `PyFunction_Check(callable) && code->co_argcount == oparg + (self_or_null != NULL)`
73
70
*/
74
71
typedef enum {
75
- // Types with refinement info
76
- GUARD_KEYS_VERSION_TYPE = 0 ,
77
- GUARD_TYPE_VERSION_TYPE = 1 ,
78
72
// You might think this actually needs to encode oparg
79
73
// info as well, see _CHECK_FUNCTION_EXACT_ARGS.
80
74
// However, since oparg is tied to code object is tied to function version,
@@ -87,7 +81,6 @@ typedef enum {
87
81
PYUNICODE_TYPE = 5 ,
88
82
NULL_TYPE = 6 ,
89
83
PYMETHOD_TYPE = 7 ,
90
- GUARD_DORV_VALUES_TYPE = 8 ,
91
84
NOT_NULL = 9 ,
92
85
93
86
// Represents something from LOAD_CONST which is truly constant.
@@ -342,9 +335,6 @@ sym_set_type_from_const(_Py_UOpsSymType *sym, PyObject *obj)
342
335
{
343
336
PyTypeObject * tp = Py_TYPE (obj );
344
337
345
- if (tp -> tp_version_tag != 0 ) {
346
- sym_set_type (sym , GUARD_TYPE_VERSION_TYPE );
347
- }
348
338
if (tp == & PyFunction_Type ) {
349
339
sym_set_type (sym , PYFUNCTION_TYPE_VERSION_TYPE );
350
340
}
0 commit comments