Skip to content

Commit 710f609

Browse files
remove unused types
1 parent 9a9033f commit 710f609

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

Python/optimizer_analysis.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,11 @@
6464
* `PYFLOAT_TYPE`: `Py_TYPE(val) == &PyFloat_Type`
6565
* `PYUNICODE_TYPE`: `Py_TYPE(val) == &PYUNICODE_TYPE`
6666
* `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`
7067
* `PYMETHOD_TYPE`: `Py_TYPE(val) == &PyMethod_Type`
7168
* `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)`
7370
*/
7471
typedef enum {
75-
// Types with refinement info
76-
GUARD_KEYS_VERSION_TYPE = 0,
77-
GUARD_TYPE_VERSION_TYPE = 1,
7872
// You might think this actually needs to encode oparg
7973
// info as well, see _CHECK_FUNCTION_EXACT_ARGS.
8074
// However, since oparg is tied to code object is tied to function version,
@@ -87,7 +81,6 @@ typedef enum {
8781
PYUNICODE_TYPE = 5,
8882
NULL_TYPE = 6,
8983
PYMETHOD_TYPE = 7,
90-
GUARD_DORV_VALUES_TYPE = 8,
9184
NOT_NULL = 9,
9285

9386
// Represents something from LOAD_CONST which is truly constant.
@@ -342,9 +335,6 @@ sym_set_type_from_const(_Py_UOpsSymType *sym, PyObject *obj)
342335
{
343336
PyTypeObject *tp = Py_TYPE(obj);
344337

345-
if (tp->tp_version_tag != 0) {
346-
sym_set_type(sym, GUARD_TYPE_VERSION_TYPE);
347-
}
348338
if (tp == &PyFunction_Type) {
349339
sym_set_type(sym, PYFUNCTION_TYPE_VERSION_TYPE);
350340
}

0 commit comments

Comments
 (0)