11 instantiations of TypeUnionValueSet
Microsoft.CodeAnalysis.CSharp (11)
Utilities\TypeUnionValueSet.cs (11)
77return new TypeUnionValueSet(typesInUnion, IsTrueNode.Instance, conversions); 84return new TypeUnionValueSet(typesInUnion, new IsTypeNode(type), conversions); 88return new TypeUnionValueSet(typesInUnion, IsFalseNode.Instance, conversions); 114return new TypeUnionValueSet(typesInUnion, IsNullNode.Instance, conversions); 119return new TypeUnionValueSet(typesInUnion, new NotNode(IsNullNode.Instance), conversions); 361return new TypeUnionValueSet(_typesInUnion, IsFalseNode.Instance, _conversions); 366return new TypeUnionValueSet(_typesInUnion, IsTrueNode.Instance, _conversions); 374return new TypeUnionValueSet(_typesInUnion, negated, _conversions); 401return new TypeUnionValueSet(_typesInUnion, new AndNode(_root, other._root), _conversions); 428return new TypeUnionValueSet(_typesInUnion, new OrNode(_root, other._root), _conversions); 457var copy = new TypeUnionValueSet(_typesInUnion, _root, _conversions);
58 references to TypeUnionValueSet
Microsoft.CodeAnalysis.CSharp (58)
Binder\DecisionDagBuilder.cs (9)
1832var fromTestPassing = factory.FromTypeMatch(typeTest.Type, _conversions, ref useSiteInfo); 1835(var whenTrueValues, var whenFalseValues, fromTestPassing, var fromTestFailing) = splitValues(values, typeTest.Input, fromTestPassing); 1857var fromTestPassing = factory.FromNonNullMatch(_conversions); 1859(var whenTrueValues, var whenFalseValues, fromTestPassing, var fromTestFailing) = splitValues(values, nonNullTest.Input, fromTestPassing); 1878var fromTestPassing = factory.FromNullMatch(_conversions); 1880(var whenTrueValues, var whenFalseValues, fromTestPassing, var fromTestFailing) = splitValues(values, nullTest.Input, fromTestPassing); 2002if (whenTrueValues is TypeUnionValueSet whenTrueUnionSet) 2095if (!_forLowering && whenFalseValues is TypeUnionValueSet whenFalseUnionSet) 2158else if (!_forLowering && whenFalseValues is TypeUnionValueSet whenFalseUnionSet &&
Binder\PatternExplainer.cs (2)
615var remainingValues = factory.AllValues(conversions); 621TypeUnionValueSet filtered;
Symbols\NamedTypeSymbol.cs (8)
49public ImmutableArray<TypeUnionValueSet.CaseInfo> _lazyTypeUnionValueSetCases; 68public ImmutableArray<TypeUnionValueSet.CaseInfo> _lazyTypeUnionValueSetCases; 820internal ImmutableArray<TypeUnionValueSet.CaseInfo> ClosedClassTypeUnionValueSetCases() 823ImmutableArray<TypeUnionValueSet.CaseInfo> lazyTypeUnionValueSetCases = lazyClosedClassData._lazyTypeUnionValueSetCases; 829var builder = ArrayBuilder<TypeUnionValueSet.CaseInfo>.GetInstance(); 2025internal ImmutableArray<TypeUnionValueSet.CaseInfo> UnionTypeUnionValueSetCases() 2028ImmutableArray<TypeUnionValueSet.CaseInfo> lazyTypeUnionValueSetCases = lazyUnionData._lazyTypeUnionValueSetCases; 2034var builder = ArrayBuilder<TypeUnionValueSet.CaseInfo>.GetInstance();
Utilities\ITypeUnionValueSetFactory.cs (4)
11TypeUnionValueSet AllValues(ConversionsBase conversions); 12TypeUnionValueSet FromTypeMatch(TypeSymbol type, ConversionsBase conversions, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo); 13TypeUnionValueSet FromNullMatch(ConversionsBase conversions); 14TypeUnionValueSet FromNonNullMatch(ConversionsBase conversions);
Utilities\TypeUnionValueSet.cs (12)
75internal static TypeUnionValueSet AllValues(ImmutableArray<CaseInfo> typesInUnion, ConversionsBase conversions) 80internal static TypeUnionValueSet FromTypeMatch(ImmutableArray<CaseInfo> typesInUnion, TypeSymbol type, ConversionsBase conversions, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 112internal static TypeUnionValueSet FromNullMatch(ImmutableArray<CaseInfo> typesInUnion, ConversionsBase conversions) 117internal static TypeUnionValueSet FromNonNullMatch(ImmutableArray<CaseInfo> typesInUnion, ConversionsBase conversions) 349return Intersect((TypeUnionValueSet)other); 354return Union((TypeUnionValueSet)other); 357public TypeUnionValueSet Complement() 377public TypeUnionValueSet Intersect(TypeUnionValueSet other) 404public TypeUnionValueSet Union(TypeUnionValueSet other) 457var copy = new TypeUnionValueSet(_typesInUnion, _root, _conversions);
Utilities\ValueSetFactory.ClosedClassTypeUnionValueSetFactory.cs (14)
25internal static void ExpandClosedSubtypes(TypeSymbol possibleClosedClass, ArrayBuilder<TypeUnionValueSet.CaseInfo> builder, HashSet<TypeSymbol> setBuilder) 36private static void ExpandClosedSubtypesCore(ImmutableArray<NamedTypeSymbol> subtypes, NamedTypeSymbol originalBase, ArrayBuilder<TypeUnionValueSet.CaseInfo> builder, HashSet<TypeSymbol> setBuilder) 52private static void AddCaseInfo(ArrayBuilder<TypeUnionValueSet.CaseInfo> builder, HashSet<TypeSymbol> setBuilder, TypeSymbol caseType, NamedTypeSymbol? originalClosedBase) 58builder.Add(new TypeUnionValueSet.CaseInfo(caseType, originalClosedBase)); 62private ImmutableArray<TypeUnionValueSet.CaseInfo> ClosedSubtypes() 69return [new TypeUnionValueSet.CaseInfo((TypeParameterSymbol)_closedClassOrTypeParameter, originalClosedBase: null)]; 72public TypeUnionValueSet AllValues(ConversionsBase conversions) 74return TypeUnionValueSet.AllValues(ClosedSubtypes(), conversions); 77public TypeUnionValueSet FromTypeMatch(TypeSymbol type, ConversionsBase conversions, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 79return TypeUnionValueSet.FromTypeMatch(ClosedSubtypes(), type, conversions, ref useSiteInfo); 82public TypeUnionValueSet FromNullMatch(ConversionsBase conversions) 84return TypeUnionValueSet.FromNullMatch(ClosedSubtypes(), conversions); 87public TypeUnionValueSet FromNonNullMatch(ConversionsBase conversions) 89return TypeUnionValueSet.FromNonNullMatch(ClosedSubtypes(), conversions);
Utilities\ValueSetFactory.UnionTypeTypeUnionValueSetFactory.cs (9)
24private ImmutableArray<TypeUnionValueSet.CaseInfo> AdjustedTypesInUnion() 29public TypeUnionValueSet AllValues(ConversionsBase conversions) 31return TypeUnionValueSet.AllValues(AdjustedTypesInUnion(), conversions); 34public TypeUnionValueSet FromTypeMatch(TypeSymbol type, ConversionsBase conversions, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 36return TypeUnionValueSet.FromTypeMatch(AdjustedTypesInUnion(), type, conversions, ref useSiteInfo); 39public TypeUnionValueSet FromNullMatch(ConversionsBase conversions) 41return TypeUnionValueSet.FromNullMatch(AdjustedTypesInUnion(), conversions); 44public TypeUnionValueSet FromNonNullMatch(ConversionsBase conversions) 46return TypeUnionValueSet.FromNonNullMatch(AdjustedTypesInUnion(), conversions);