@@ -783,6 +783,7 @@ _Py_uop_sym_get_type(JitOptRef ref)
783783 case JIT_SYM_NON_NULL_TAG :
784784 case JIT_SYM_UNKNOWN_TAG :
785785 case JIT_SYM_RECORDED_TYPE_TAG :
786+ case JIT_SYM_RECORDED_GEN_FUNC_TAG :
786787 return NULL ;
787788 case JIT_SYM_RECORDED_VALUE_TAG :
788789 if (sym -> recorded_value .known_type ) {
@@ -804,8 +805,6 @@ _Py_uop_sym_get_type(JitOptRef ref)
804805 return & PyBool_Type ;
805806 case JIT_SYM_COMPACT_INT :
806807 return & PyLong_Type ;
807- case JIT_SYM_RECORDED_GEN_FUNC_TAG :
808- return & PyGen_Type ;
809808 }
810809 Py_UNREACHABLE ();
811810}
@@ -2211,7 +2210,8 @@ _Py_uop_symbols_test(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
22112210 /* Test that recorded type aren't treated as known values*/
22122211 JitOptRef rg1 = _Py_uop_sym_new_unknown (ctx );
22132212 _Py_uop_sym_set_recorded_gen_func (ctx , rg1 , func );
2214- TEST_PREDICATE (_Py_uop_sym_matches_type (rg1 , & PyGen_Type ), "recorded gen func not treated as generator" );
2213+ TEST_PREDICATE (!_Py_uop_sym_matches_type (rg1 , & PyGen_Type ), "recorded gen func treated as generator" );
2214+ TEST_PREDICATE (_Py_uop_sym_get_probable_type (rg1 ) == NULL , "recorded gen func treated as generator" );
22152215 TEST_PREDICATE (_Py_uop_sym_get_const (ctx , rg1 ) == NULL , "recorded gen func is treated as known value" );
22162216
22172217 /* Test that setting type narrows correctly */
0 commit comments