70 references to InternalSpecialType
Microsoft.CodeAnalysis (34)
ExtendedSpecialType.cs (7)
11
/// A structure meant to represent a union of <see cref="SpecialType"/> and <see cref="
InternalSpecialType
"/> values
26
public static explicit operator SpecialType(ExtendedSpecialType value) => value._value < (int)
InternalSpecialType
.First ? (SpecialType)value._value : SpecialType.None;
28
public static implicit operator ExtendedSpecialType(
InternalSpecialType
value) => new ExtendedSpecialType((int)value);
46
case
InternalSpecialType
other:
66
if (_value >= (int)
InternalSpecialType
.First && _value < (int)
InternalSpecialType
.NextAvailable)
68
return ((
InternalSpecialType
)_value).ToString();
MemberDescriptor.cs (2)
50
public bool IsSpecialTypeMember => _declaringTypeId < (int)
InternalSpecialType
.NextAvailable;
56
Debug.Assert(_declaringTypeId < (int)
InternalSpecialType
.NextAvailable);
SpecialMembers.cs (22)
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
SpecialTypes.cs (2)
19
private static readonly string?[] s_emittedNames = new string?[(int)
InternalSpecialType
.NextAvailable]
87
s_nameToTypeIdMap = new Dictionary<string, ExtendedSpecialType>((int)
InternalSpecialType
.NextAvailable - 1);
WellKnownTypes.cs (1)
21
First =
InternalSpecialType
.NextAvailable,
Microsoft.CodeAnalysis.CSharp (14)
Compilation\CSharpCompilation.cs (1)
1663
if ((int)specialType <= (int)SpecialType.None || (int)specialType >= (int)
InternalSpecialType
.NextAvailable)
Lowering\LocalRewriter\LocalRewriter.cs (2)
648
Debug.Assert(node.Type.ExtendedSpecialType ==
InternalSpecialType
.System_Type ||
660
if (node.Type.ExtendedSpecialType ==
InternalSpecialType
.System_Type)
Lowering\SyntheticBoundNodeFactory.cs (4)
1268
Debug.Assert(systemType.ExtendedSpecialType ==
InternalSpecialType
.System_Type ||
1273
if (systemType.ExtendedSpecialType ==
InternalSpecialType
.System_Type)
1450
Debug.Assert(systemReflectionMethodOrConstructorInfo.ExtendedSpecialType ==
InternalSpecialType
.System_Reflection_MethodInfo ||
1456
if (systemReflectionMethodOrConstructorInfo.ExtendedSpecialType ==
InternalSpecialType
.System_Reflection_MethodInfo)
Symbols\MetadataOrSourceAssemblySymbol.cs (3)
91
new NamedTypeSymbol[(int)
InternalSpecialType
.NextAvailable], null);
103
Debug.Assert(_cachedSpecialTypes > 0 && _cachedSpecialTypes < (int)
InternalSpecialType
.NextAvailable);
115
return ReferenceEquals(this.CorLibrary, this) && _cachedSpecialTypes < (int)
InternalSpecialType
.NextAvailable - 1;
Symbols\MissingCorLibrarySymbol.cs (1)
72
new 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];
114
Debug.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.Symbol.UnitTests (17)
Symbols\CorLibrary\CorTypes.cs (15)
80
for (int i = (int)
InternalSpecialType
.First; i < (int)
InternalSpecialType
.NextAvailable; i++)
82
var t = msCorLibRef.GetSpecialType((
InternalSpecialType
)i);
161
for (int i = (int)
InternalSpecialType
.First; i < (int)
InternalSpecialType
.NextAvailable; i++)
164
var t = msCorLibRef.GetSpecialType((
InternalSpecialType
)i);
207
for (int i = (int)
InternalSpecialType
.First; i < (int)
InternalSpecialType
.NextAvailable; i++)
210
var t = c1.GetSpecialType((
InternalSpecialType
)i);
230
Assert.Throws<ArgumentOutOfRangeException>(() => c1.GetSpecialType(
InternalSpecialType
.NextAvailable));
291
Assert.False(comp.GetSpecialType(
InternalSpecialType
.System_Type).IsErrorType());
297
Assert.Equal(
InternalSpecialType
.System_Type, model.GetTypeInfo(node).Type.GetSymbol().ExtendedSpecialType);
355
Assert.True(comp1.GetSpecialType(
InternalSpecialType
.System_Type).IsErrorType());
428
Assert.False(comp.GetSpecialType(
InternalSpecialType
.System_Type).IsErrorType());
536
Assert.True(comp1.GetSpecialType(
InternalSpecialType
.System_Type).IsErrorType());
Symbols\Metadata\PE\LoadingFields.cs (2)
150
var readOnlySpanType = comp.GetSpecialType(
InternalSpecialType
.System_ReadOnlySpan_T);
153
Assert.Equal((ExtendedSpecialType)
InternalSpecialType
.System_ReadOnlySpan_T, readOnlySpanType.ExtendedSpecialType);
Microsoft.CodeAnalysis.UnitTests (5)
CorLibTypesTests.cs (1)
20
for (int i = 1; i < (int)
InternalSpecialType
.NextAvailable; i++)
Symbols\SpecialTypeTests.cs (4)
18
AssertEx.Equal("System_ReadOnlySpan_T", ((ExtendedSpecialType)
InternalSpecialType
.First).ToString());
19
AssertEx.Equal("System_ReadOnlySpan_T", ((ExtendedSpecialType)
InternalSpecialType
.System_ReadOnlySpan_T).ToString());
20
AssertEx.Equal("System_Reflection_MethodInfo", ((ExtendedSpecialType)(
InternalSpecialType
.NextAvailable - 1)).ToString());
21
AssertEx.Equal("52", ((ExtendedSpecialType)
InternalSpecialType
.NextAvailable).ToString());