103 references to InternalSpecialType
Microsoft.CodeAnalysis (46)
ExtendedSpecialType.cs (16)
11/// A structure meant to represent a union of <see cref="SpecialType"/> and <see cref="InternalSpecialType"/> values 26public static explicit operator SpecialType(ExtendedSpecialType value) => value._value < (int)InternalSpecialType.First ? (SpecialType)value._value : SpecialType.None; 28public static implicit operator ExtendedSpecialType(InternalSpecialType value) => new ExtendedSpecialType((int)value); 29public static explicit operator InternalSpecialType(ExtendedSpecialType value) => value._value is < (int)InternalSpecialType.First or >= (int)InternalSpecialType.NextAvailable ? InternalSpecialType.Unknown : (InternalSpecialType)value._value; 47case InternalSpecialType other: 72Debug.Assert(InternalSpecialType.First == InternalSpecialType.System_ReadOnlySpan_T); 73if (_value == (int)InternalSpecialType.System_ReadOnlySpan_T) 75return nameof(InternalSpecialType.System_ReadOnlySpan_T); 78if (_value > (int)InternalSpecialType.First && _value < (int)InternalSpecialType.NextAvailable) 80return ((InternalSpecialType)_value).ToString();
MemberDescriptor.cs (2)
50public bool IsSpecialTypeMember => _declaringTypeId < (int)InternalSpecialType.NextAvailable; 56Debug.Assert(_declaringTypeId < (int)InternalSpecialType.NextAvailable);
SpecialMembers.cs (24)
106(byte)SignatureTypeCode.GenericTypeInstance, (byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_ReadOnlySpan_T, 109(byte)SignatureTypeCode.GenericTypeInstance, (byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_ReadOnlySpan_T, 119(byte)SignatureTypeCode.GenericTypeInstance, (byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_ReadOnlySpan_T, 122(byte)SignatureTypeCode.GenericTypeInstance, (byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_ReadOnlySpan_T, 125(byte)SignatureTypeCode.GenericTypeInstance, (byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_ReadOnlySpan_T, 135(byte)SignatureTypeCode.GenericTypeInstance, (byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_ReadOnlySpan_T, 138(byte)SignatureTypeCode.GenericTypeInstance, (byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_ReadOnlySpan_T, 141(byte)SignatureTypeCode.GenericTypeInstance, (byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_ReadOnlySpan_T, 144(byte)SignatureTypeCode.GenericTypeInstance, (byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_ReadOnlySpan_T, 196(byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_IFormatProvider, 214(byte)SignatureTypeCode.GenericTypeInstance, (byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_ReadOnlySpan_T, 277(byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_Type, 279(byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_Reflection_MethodInfo, 287(byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_Type, 289(byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_Reflection_MethodInfo, 1161(byte)InternalSpecialType.System_ReadOnlySpan_T, // DeclaringTypeId 1271(byte)InternalSpecialType.System_Reflection_MethodBase, // DeclaringTypeId 1274(byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_Reflection_MethodBase, // Return Type 1279(byte)InternalSpecialType.System_Reflection_MethodBase, // DeclaringTypeId 1282(byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_Reflection_MethodBase, // Return Type 1311(byte)InternalSpecialType.System_Type, // DeclaringTypeId 1314(byte)SignatureTypeCode.TypeHandle, (byte)InternalSpecialType.System_Type, // Return Type 1319(byte)InternalSpecialType.System_Runtime_CompilerServices_AsyncHelpers, // DeclaringTypeId 1327(byte)InternalSpecialType.System_Runtime_CompilerServices_AsyncHelpers, // DeclaringTypeId
SpecialTypes.cs (2)
19private static readonly string?[] s_emittedNames = new string?[(int)InternalSpecialType.NextAvailable] 93s_nameToTypeIdMap = new Dictionary<string, ExtendedSpecialType>((int)InternalSpecialType.NextAvailable - 1);
WellKnownTypes.cs (2)
21First = InternalSpecialType.NextAvailable, 762const int ExpectedCSharp7SentinelValue = 200 + (int)InternalSpecialType.NextAvailable + 1 /* Placeholder for ExtSentinel */;
Microsoft.CodeAnalysis.CSharp (30)
Binder\Binder_Await.cs (2)
337var asyncHelpersType = GetSpecialType(InternalSpecialType.System_Runtime_CompilerServices_AsyncHelpers, diagnostics, expression.Syntax); 481Compilation.GetSpecialType(InternalSpecialType.System_Runtime_CompilerServices_ICriticalNotifyCompletion),
BoundTree\BoundAwaitableInfo.cs (1)
15Debug.Assert(RuntimeAsyncAwaitCall.Method.ContainingType.ExtendedSpecialType == InternalSpecialType.System_Runtime_CompilerServices_AsyncHelpers);
CodeGen\CodeGenerator.cs (6)
181Debug.Assert(((InternalSpecialType)returnType.OriginalDefinition.ExtendedSpecialType) is InternalSpecialType.System_Threading_Tasks_ValueTask_T or InternalSpecialType.System_Threading_Tasks_Task_T); 327&& ((InternalSpecialType)_method.ReturnType.ExtendedSpecialType) is InternalSpecialType.System_Threading_Tasks_Task or InternalSpecialType.System_Threading_Tasks_ValueTask));
Compilation\CSharpCompilation.cs (6)
334if (((InternalSpecialType)methodReturn.ExtendedSpecialType) is not ( 335InternalSpecialType.System_Threading_Tasks_Task or 336InternalSpecialType.System_Threading_Tasks_Task_T or 337InternalSpecialType.System_Threading_Tasks_ValueTask or 338InternalSpecialType.System_Threading_Tasks_ValueTask_T)) 1699if ((int)specialType <= (int)SpecialType.None || (int)specialType >= (int)InternalSpecialType.NextAvailable)
Lowering\AsyncRewriter\RuntimeAsyncRewriter.cs (1)
83_factory.Compilation.GetSpecialType(InternalSpecialType.System_Runtime_CompilerServices_AsyncHelpers)));
Lowering\LocalRewriter\LocalRewriter.cs (2)
648Debug.Assert(node.Type.ExtendedSpecialType == InternalSpecialType.System_Type || 660if (node.Type.ExtendedSpecialType == InternalSpecialType.System_Type)
Lowering\SyntheticBoundNodeFactory.cs (4)
1268Debug.Assert(systemType.ExtendedSpecialType == InternalSpecialType.System_Type || 1273if (systemType.ExtendedSpecialType == InternalSpecialType.System_Type) 1450Debug.Assert(systemReflectionMethodOrConstructorInfo.ExtendedSpecialType == InternalSpecialType.System_Reflection_MethodInfo || 1456if (systemReflectionMethodOrConstructorInfo.ExtendedSpecialType == InternalSpecialType.System_Reflection_MethodInfo)
Symbols\AssemblySymbol.cs (1)
502=> GetSpecialType(InternalSpecialType.System_Runtime_CompilerServices_AsyncHelpers) is { TypeKind: TypeKind.Class, IsStatic: true };
Symbols\MetadataOrSourceAssemblySymbol.cs (3)
91new NamedTypeSymbol[(int)InternalSpecialType.NextAvailable], null); 103Debug.Assert(_cachedSpecialTypes > 0 && _cachedSpecialTypes < (int)InternalSpecialType.NextAvailable); 115return ReferenceEquals(this.CorLibrary, this) && _cachedSpecialTypes < (int)InternalSpecialType.NextAvailable - 1;
Symbols\MissingCorLibrarySymbol.cs (1)
72new NamedTypeSymbol[(int)InternalSpecialType.NextAvailable], null);
Symbols\MissingMetadataTypeSymbol.cs (1)
149/// Either <see cref="SpecialType"/>, <see cref="InternalSpecialType"/>, <see cref="WellKnownType"/>, or -1 if not initialized.
Symbols\Source\SourceMemberContainerSymbol.cs (2)
112_ = new int[SpecialTypeMask - (int)InternalSpecialType.NextAvailable + 1]; 114Debug.Assert(EnumUtilities.ContainsAllValues<InternalSpecialType>(SpecialTypeMask)); //This assert might false fail in the future, we don't really need to be able to represent NextAvailable
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenAsyncTests.cs (2)
8938comp.MakeTypeMissing(InternalSpecialType.System_Runtime_CompilerServices_AsyncHelpers); 8947comp.MakeTypeMissing(InternalSpecialType.System_Runtime_CompilerServices_AsyncHelpers);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (20)
Symbols\CorLibrary\CorTypes.cs (18)
63var knownMissingInternalSpecialTypes = new HashSet<InternalSpecialType>() 65InternalSpecialType.System_Runtime_CompilerServices_AsyncHelpers, 86for (int i = (int)InternalSpecialType.First; i < (int)InternalSpecialType.NextAvailable; i++) 88var internalSpecialType = (InternalSpecialType)i; 168for (int i = (int)InternalSpecialType.First; i < (int)InternalSpecialType.NextAvailable; i++) 171var t = msCorLibRef.GetSpecialType((InternalSpecialType)i); 214for (int i = (int)InternalSpecialType.First; i < (int)InternalSpecialType.NextAvailable; i++) 217var t = c1.GetSpecialType((InternalSpecialType)i); 237Assert.Throws<ArgumentOutOfRangeException>(() => c1.GetSpecialType(InternalSpecialType.NextAvailable)); 298Assert.False(comp.GetSpecialType(InternalSpecialType.System_Type).IsErrorType()); 304Assert.Equal(InternalSpecialType.System_Type, model.GetTypeInfo(node).Type.GetSymbol().ExtendedSpecialType); 362Assert.True(comp1.GetSpecialType(InternalSpecialType.System_Type).IsErrorType()); 435Assert.False(comp.GetSpecialType(InternalSpecialType.System_Type).IsErrorType()); 543Assert.True(comp1.GetSpecialType(InternalSpecialType.System_Type).IsErrorType());
Symbols\Metadata\PE\LoadingFields.cs (2)
150var readOnlySpanType = comp.GetSpecialType(InternalSpecialType.System_ReadOnlySpan_T); 153Assert.Equal((ExtendedSpecialType)InternalSpecialType.System_ReadOnlySpan_T, readOnlySpanType.ExtendedSpecialType);
Microsoft.CodeAnalysis.UnitTests (5)
CorLibTypesTests.cs (1)
20for (int i = 1; i < (int)InternalSpecialType.NextAvailable; i++)
Symbols\SpecialTypeTests.cs (4)
18AssertEx.Equal("System_ReadOnlySpan_T", ((ExtendedSpecialType)InternalSpecialType.First).ToString()); 19AssertEx.Equal("System_ReadOnlySpan_T", ((ExtendedSpecialType)InternalSpecialType.System_ReadOnlySpan_T).ToString()); 20AssertEx.Equal("System_Runtime_CompilerServices_ICriticalNotifyCompletion", ((ExtendedSpecialType)(InternalSpecialType.NextAvailable - 1)).ToString()); 21AssertEx.Equal("58", ((ExtendedSpecialType)InternalSpecialType.NextAvailable).ToString());