/
SpecialType.cs
271 lines (222 loc) · 8.36 KB
/
SpecialType.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace Microsoft.CodeAnalysis
{
/// <summary>
/// Specifies the Ids of special runtime types.
/// </summary>
/// <remarks>
/// Only types explicitly mentioned in "Co-located core types" spec
/// (https://github.com/dotnet/roslyn/blob/main/docs/compilers/Co-located%20core%20types.md)
/// can be in this enum.
/// The following things should be in sync:
/// 1) SpecialType enum
/// 2) names in SpecialTypes.EmittedNames array.
/// </remarks>
public enum SpecialType : sbyte
{
/// <summary>
/// Indicates a non-special type (default value).
/// </summary>
None = 0,
/// <summary>
/// Indicates that the type is <see cref="object"/>.
/// </summary>
System_Object = 1,
/// <summary>
/// Indicates that the type is <see cref="Enum"/>.
/// </summary>
System_Enum = 2,
/// <summary>
/// Indicates that the type is <see cref="MulticastDelegate"/>.
/// </summary>
System_MulticastDelegate = 3,
/// <summary>
/// Indicates that the type is <see cref="Delegate"/>.
/// </summary>
System_Delegate = 4,
/// <summary>
/// Indicates that the type is <see cref="ValueType"/>.
/// </summary>
System_ValueType = 5,
/// <summary>
/// Indicates that the type is <see cref="void"/>.
/// </summary>
System_Void = 6,
/// <summary>
/// Indicates that the type is <see cref="bool"/>.
/// </summary>
System_Boolean = 7,
/// <summary>
/// Indicates that the type is <see cref="char"/>.
/// </summary>
System_Char = 8,
/// <summary>
/// Indicates that the type is <see cref="sbyte"/>.
/// </summary>
System_SByte = 9,
/// <summary>
/// Indicates that the type is <see cref="byte"/>.
/// </summary>
System_Byte = 10,
/// <summary>
/// Indicates that the type is <see cref="short"/>.
/// </summary>
System_Int16 = 11,
/// <summary>
/// Indicates that the type is <see cref="ushort"/>.
/// </summary>
System_UInt16 = 12,
/// <summary>
/// Indicates that the type is <see cref="int"/>.
/// </summary>
System_Int32 = 13,
/// <summary>
/// Indicates that the type is <see cref="uint"/>.
/// </summary>
System_UInt32 = 14,
/// <summary>
/// Indicates that the type is <see cref="long"/>.
/// </summary>
System_Int64 = 15,
/// <summary>
/// Indicates that the type is <see cref="ulong"/>.
/// </summary>
System_UInt64 = 16,
/// <summary>
/// Indicates that the type is <see cref="decimal"/>.
/// </summary>
System_Decimal = 17,
/// <summary>
/// Indicates that the type is <see cref="float"/>.
/// </summary>
System_Single = 18,
/// <summary>
/// Indicates that the type is <see cref="double"/>.
/// </summary>
System_Double = 19,
/// <summary>
/// Indicates that the type is <see cref="string"/>.
/// </summary>
System_String = 20,
/// <summary>
/// Indicates that the type is <see cref="IntPtr" />.
/// </summary>
System_IntPtr = 21,
/// <summary>
/// Indicates that the type is <see cref="UIntPtr"/>.
/// </summary>
System_UIntPtr = 22,
/// <summary>
/// Indicates that the type is <see cref="Array"/>.
/// </summary>
System_Array = 23,
/// <summary>
/// Indicates that the type is <see cref="IEnumerable"/>.
/// </summary>
System_Collections_IEnumerable = 24,
/// <summary>
/// Indicates that the type is <see cref="IEnumerable{T}"/>.
/// </summary>
System_Collections_Generic_IEnumerable_T = 25, // Note: IEnumerable<int> (i.e. constructed type) has no special type
/// <summary>
/// Indicates that the type is <see cref="IList{T}"/>.
/// </summary>
System_Collections_Generic_IList_T = 26,
/// <summary>
/// Indicates that the type is <see cref="ICollection{T}"/>.
/// </summary>
System_Collections_Generic_ICollection_T = 27,
/// <summary>
/// Indicates that the type is <see cref="IEnumerator"/>.
/// </summary>
System_Collections_IEnumerator = 28,
/// <summary>
/// Indicates that the type is <see cref="IEnumerator{T}"/>.
/// </summary>
System_Collections_Generic_IEnumerator_T = 29,
/// <summary>
/// Indicates that the type is <see cref="IReadOnlyList{T}"/>.
/// </summary>
System_Collections_Generic_IReadOnlyList_T = 30,
/// <summary>
/// Indicates that the type is <see cref="IReadOnlyCollection{T}"/>.
/// </summary>
System_Collections_Generic_IReadOnlyCollection_T = 31,
/// <summary>
/// Indicates that the type is <see cref="Nullable{T}"/>.
/// </summary>
System_Nullable_T = 32,
/// <summary>
/// Indicates that the type is <see cref="DateTime"/>.
/// </summary>
System_DateTime = 33,
/// <summary>
/// Indicates that the type is <see cref="IsVolatile"/>.
/// </summary>
System_Runtime_CompilerServices_IsVolatile = 34,
/// <summary>
/// Indicates that the type is <see cref="IDisposable"/>.
/// </summary>
System_IDisposable = 35,
#pragma warning disable CA1200 // Avoid using cref tags with a prefix
/// <summary>
/// Indicates that the type is <see cref="T:System.TypedReference"/>.
/// </summary>
#pragma warning restore CA1200 // Avoid using cref tags with a prefix
System_TypedReference = 36,
#pragma warning disable CA1200 // Avoid using cref tags with a prefix
/// <summary>
/// Indicates that the type is <see cref="T:System.ArgIterator"/>.
/// </summary>
#pragma warning restore CA1200 // Avoid using cref tags with a prefix
System_ArgIterator = 37,
#pragma warning disable CA1200 // Avoid using cref tags with a prefix
/// <summary>
/// Indicates that the type is <see cref="T:System.RuntimeArgumentHandle"/>.
/// </summary>
#pragma warning restore CA1200 // Avoid using cref tags with a prefix
System_RuntimeArgumentHandle = 38,
/// <summary>
/// Indicates that the type is <see cref="RuntimeFieldHandle"/>.
/// </summary>
System_RuntimeFieldHandle = 39,
/// <summary>
/// Indicates that the type is <see cref="RuntimeMethodHandle"/>.
/// </summary>
System_RuntimeMethodHandle = 40,
/// <summary>
/// Indicates that the type is <see cref="RuntimeTypeHandle"/>.
/// </summary>
System_RuntimeTypeHandle = 41,
/// <summary>
/// Indicates that the type is <see cref="IAsyncResult"/>.
/// </summary>
System_IAsyncResult = 42,
/// <summary>
/// Indicates that the type is <see cref="AsyncCallback"/>.
/// </summary>
System_AsyncCallback = 43,
/// <summary>
/// Indicates that the type is System.Runtime.CompilerServices.RuntimeFeature.
/// </summary>
System_Runtime_CompilerServices_RuntimeFeature = 44,
/// <summary>
/// An attribute that is placed on each method with a 'methodimpl" aka ".override" in metadata.
/// </summary>
System_Runtime_CompilerServices_PreserveBaseOverridesAttribute = 45,
/// <summary>
/// An attribute that is placed on an inline array type.
/// </summary>
System_Runtime_CompilerServices_InlineArrayAttribute = 46,
/// <summary>
/// Count of special types. This is not a count of enum members.
/// </summary>
Count = System_Runtime_CompilerServices_InlineArrayAttribute
}
}