[2020-02] Fix leak in assembly-specific dllmap lookups (#21053)
[mono-project.git] / mono / metadata / row-indexes.h
blobd7837d01ba09c951a6de60829fcb63f2e2019634
1 /**
2 * \file
3 */
5 #ifndef __MONO_METADATA_ROW_INDEXES_H__
6 #define __MONO_METADATA_ROW_INDEXES_H__
8 /*
9 * The last entry in the enum is used to give the number
10 * of columns in the row.
13 enum {
14 MONO_ASSEMBLY_HASH_ALG,
15 MONO_ASSEMBLY_MAJOR_VERSION,
16 MONO_ASSEMBLY_MINOR_VERSION,
17 MONO_ASSEMBLY_BUILD_NUMBER,
18 MONO_ASSEMBLY_REV_NUMBER,
19 MONO_ASSEMBLY_FLAGS,
20 MONO_ASSEMBLY_PUBLIC_KEY,
21 MONO_ASSEMBLY_NAME,
22 MONO_ASSEMBLY_CULTURE,
23 MONO_ASSEMBLY_SIZE
26 enum {
27 MONO_ASSEMBLYOS_PLATFORM,
28 MONO_ASSEMBLYOS_MAJOR_VERSION,
29 MONO_ASSEMBLYOS_MINOR_VERSION,
30 MONO_ASSEMBLYOS_SIZE
33 enum {
34 MONO_ASSEMBLY_PROCESSOR,
35 MONO_ASSEMBLY_PROCESSOR_SIZE
38 enum {
39 MONO_ASSEMBLYREF_MAJOR_VERSION,
40 MONO_ASSEMBLYREF_MINOR_VERSION,
41 MONO_ASSEMBLYREF_BUILD_NUMBER,
42 MONO_ASSEMBLYREF_REV_NUMBER,
43 MONO_ASSEMBLYREF_FLAGS,
44 MONO_ASSEMBLYREF_PUBLIC_KEY,
45 MONO_ASSEMBLYREF_NAME,
46 MONO_ASSEMBLYREF_CULTURE,
47 MONO_ASSEMBLYREF_HASH_VALUE,
48 MONO_ASSEMBLYREF_SIZE
51 enum {
52 MONO_ASSEMBLYREFOS_PLATFORM,
53 MONO_ASSEMBLYREFOS_MAJOR_VERSION,
54 MONO_ASSEMBLYREFOS_MINOR_VERSION,
55 MONO_ASSEMBLYREFOS_ASSEMBLYREF,
56 MONO_ASSEMBLYREFOS_SIZE
59 enum {
60 MONO_ASSEMBLYREFPROC_PROCESSOR,
61 MONO_ASSEMBLYREFPROC_ASSEMBLYREF,
62 MONO_ASSEMBLYREFPROC_SIZE
65 enum {
66 MONO_CLASS_LAYOUT_PACKING_SIZE,
67 MONO_CLASS_LAYOUT_CLASS_SIZE,
68 MONO_CLASS_LAYOUT_PARENT,
69 MONO_CLASS_LAYOUT_SIZE
72 enum {
73 MONO_CONSTANT_TYPE,
74 MONO_CONSTANT_PADDING,
75 MONO_CONSTANT_PARENT,
76 MONO_CONSTANT_VALUE,
77 MONO_CONSTANT_SIZE
80 enum {
81 MONO_CUSTOM_ATTR_PARENT,
82 MONO_CUSTOM_ATTR_TYPE,
83 MONO_CUSTOM_ATTR_VALUE,
84 MONO_CUSTOM_ATTR_SIZE
87 enum {
88 MONO_DECL_SECURITY_ACTION,
89 MONO_DECL_SECURITY_PARENT,
90 MONO_DECL_SECURITY_PERMISSIONSET,
91 MONO_DECL_SECURITY_SIZE
94 enum {
95 MONO_EVENT_MAP_PARENT,
96 MONO_EVENT_MAP_EVENTLIST,
97 MONO_EVENT_MAP_SIZE
100 enum {
101 MONO_EVENT_FLAGS,
102 MONO_EVENT_NAME,
103 MONO_EVENT_TYPE,
104 MONO_EVENT_SIZE
107 enum {
108 MONO_EVENT_POINTER_EVENT,
109 MONO_EVENT_POINTER_SIZE
112 enum {
113 MONO_EXP_TYPE_FLAGS,
114 MONO_EXP_TYPE_TYPEDEF,
115 MONO_EXP_TYPE_NAME,
116 MONO_EXP_TYPE_NAMESPACE,
117 MONO_EXP_TYPE_IMPLEMENTATION,
118 MONO_EXP_TYPE_SIZE
121 enum {
122 MONO_FIELD_FLAGS,
123 MONO_FIELD_NAME,
124 MONO_FIELD_SIGNATURE,
125 MONO_FIELD_SIZE
128 enum {
129 MONO_FIELD_LAYOUT_OFFSET,
130 MONO_FIELD_LAYOUT_FIELD,
131 MONO_FIELD_LAYOUT_SIZE
134 enum {
135 MONO_FIELD_MARSHAL_PARENT,
136 MONO_FIELD_MARSHAL_NATIVE_TYPE,
137 MONO_FIELD_MARSHAL_SIZE
140 enum {
141 MONO_FIELD_POINTER_FIELD,
142 MONO_FIELD_POINTER_SIZE
145 enum {
146 MONO_FIELD_RVA_RVA,
147 MONO_FIELD_RVA_FIELD,
148 MONO_FIELD_RVA_SIZE
151 enum {
152 MONO_FILE_FLAGS,
153 MONO_FILE_NAME,
154 MONO_FILE_HASH_VALUE,
155 MONO_FILE_SIZE
158 enum {
159 MONO_IMPLMAP_FLAGS,
160 MONO_IMPLMAP_MEMBER,
161 MONO_IMPLMAP_NAME,
162 MONO_IMPLMAP_SCOPE,
163 MONO_IMPLMAP_SIZE
166 enum {
167 MONO_INTERFACEIMPL_CLASS,
168 MONO_INTERFACEIMPL_INTERFACE,
169 MONO_INTERFACEIMPL_SIZE
172 enum {
173 MONO_MANIFEST_OFFSET,
174 MONO_MANIFEST_FLAGS,
175 MONO_MANIFEST_NAME,
176 MONO_MANIFEST_IMPLEMENTATION,
177 MONO_MANIFEST_SIZE
180 enum {
181 MONO_MEMBERREF_CLASS,
182 MONO_MEMBERREF_NAME,
183 MONO_MEMBERREF_SIGNATURE,
184 MONO_MEMBERREF_SIZE
187 enum {
188 MONO_METHOD_RVA,
189 MONO_METHOD_IMPLFLAGS,
190 MONO_METHOD_FLAGS,
191 MONO_METHOD_NAME,
192 MONO_METHOD_SIGNATURE,
193 MONO_METHOD_PARAMLIST,
194 MONO_METHOD_SIZE
197 enum {
198 MONO_METHODIMPL_CLASS,
199 MONO_METHODIMPL_BODY,
200 MONO_METHODIMPL_DECLARATION,
201 MONO_METHODIMPL_SIZE
204 enum {
205 MONO_METHOD_POINTER_METHOD,
206 MONO_METHOD_POINTER_SIZE
209 enum {
210 MONO_METHOD_SEMA_SEMANTICS,
211 MONO_METHOD_SEMA_METHOD,
212 MONO_METHOD_SEMA_ASSOCIATION,
213 MONO_METHOD_SEMA_SIZE
216 enum {
217 MONO_MODULE_GENERATION,
218 MONO_MODULE_NAME,
219 MONO_MODULE_MVID,
220 MONO_MODULE_ENC,
221 MONO_MODULE_ENCBASE,
222 MONO_MODULE_SIZE
225 enum {
226 MONO_MODULEREF_NAME,
227 MONO_MODULEREF_SIZE
230 enum {
231 MONO_NESTED_CLASS_NESTED,
232 MONO_NESTED_CLASS_ENCLOSING,
233 MONO_NESTED_CLASS_SIZE
236 enum {
237 MONO_PARAM_FLAGS,
238 MONO_PARAM_SEQUENCE,
239 MONO_PARAM_NAME,
240 MONO_PARAM_SIZE
243 enum {
244 MONO_PARAM_POINTER_PARAM,
245 MONO_PARAM_POINTER_SIZE
248 enum {
249 MONO_PROPERTY_FLAGS,
250 MONO_PROPERTY_NAME,
251 MONO_PROPERTY_TYPE,
252 MONO_PROPERTY_SIZE
255 enum {
256 MONO_PROPERTY_POINTER_PROPERTY,
257 MONO_PROPERTY_POINTER_SIZE
260 enum {
261 MONO_PROPERTY_MAP_PARENT,
262 MONO_PROPERTY_MAP_PROPERTY_LIST,
263 MONO_PROPERTY_MAP_SIZE
266 enum {
267 MONO_STAND_ALONE_SIGNATURE,
268 MONO_STAND_ALONE_SIGNATURE_SIZE
271 enum {
272 MONO_TYPEDEF_FLAGS,
273 MONO_TYPEDEF_NAME,
274 MONO_TYPEDEF_NAMESPACE,
275 MONO_TYPEDEF_EXTENDS,
276 MONO_TYPEDEF_FIELD_LIST,
277 MONO_TYPEDEF_METHOD_LIST,
278 MONO_TYPEDEF_SIZE
281 enum {
282 MONO_TYPEREF_SCOPE,
283 MONO_TYPEREF_NAME,
284 MONO_TYPEREF_NAMESPACE,
285 MONO_TYPEREF_SIZE
288 enum {
289 MONO_TYPESPEC_SIGNATURE,
290 MONO_TYPESPEC_SIZE
293 enum {
294 MONO_GENERICPARAM_NUMBER,
295 MONO_GENERICPARAM_FLAGS,
296 MONO_GENERICPARAM_OWNER,
297 MONO_GENERICPARAM_NAME,
299 MONO_GENERICPARAM_SIZE
302 enum {
303 MONO_METHODSPEC_METHOD,
304 MONO_METHODSPEC_SIGNATURE,
305 MONO_METHODSPEC_SIZE
308 enum {
309 MONO_GENPARCONSTRAINT_GENERICPAR,
310 MONO_GENPARCONSTRAINT_CONSTRAINT,
311 MONO_GENPARCONSTRAINT_SIZE
314 enum {
315 MONO_DOCUMENT_NAME,
316 MONO_DOCUMENT_HASHALG,
317 MONO_DOCUMENT_HASH,
318 MONO_DOCUMENT_LANGUAGE,
319 MONO_DOCUMENT_SIZE
322 enum {
323 MONO_METHODBODY_DOCUMENT,
324 MONO_METHODBODY_SEQ_POINTS,
325 MONO_METHODBODY_SIZE
328 enum {
329 MONO_LOCALSCOPE_METHOD,
330 MONO_LOCALSCOPE_IMPORTSCOPE,
331 MONO_LOCALSCOPE_VARIABLELIST,
332 MONO_LOCALSCOPE_CONSTANTLIST,
333 MONO_LOCALSCOPE_STARTOFFSET,
334 MONO_LOCALSCOPE_LENGTH,
335 MONO_LOCALSCOPE_SIZE
338 enum {
339 MONO_LOCALVARIABLE_ATTRIBUTES,
340 MONO_LOCALVARIABLE_INDEX,
341 MONO_LOCALVARIABLE_NAME,
342 MONO_LOCALVARIABLE_SIZE
345 enum {
346 MONO_CUSTOMDEBUGINFORMATION_PARENT,
347 MONO_CUSTOMDEBUGINFORMATION_KIND,
348 MONO_CUSTOMDEBUGINFORMATION_VALUE,
349 MONO_CUSTOMDEBUGINFORMATION_SIZE
353 * Coded Tokens
354 * The _BITS entry is for the bits used in the token.
355 * The _MASK entry is for mask the index out.
358 enum {
359 MONO_TYPEDEFORREF_TYPEDEF,
360 MONO_TYPEDEFORREF_TYPEREF,
361 MONO_TYPEDEFORREF_TYPESPEC,
362 MONO_TYPEDEFORREF_BITS = 2,
363 MONO_TYPEDEFORREF_MASK = 3
366 enum {
367 MONO_HASCONSTANT_FIEDDEF,
368 MONO_HASCONSTANT_PARAM,
369 MONO_HASCONSTANT_PROPERTY,
370 MONO_HASCONSTANT_BITS = 2,
371 MONO_HASCONSTANT_MASK = 3
374 enum {
375 MONO_CUSTOM_ATTR_METHODDEF,
376 MONO_CUSTOM_ATTR_FIELDDEF,
377 MONO_CUSTOM_ATTR_TYPEREF,
378 MONO_CUSTOM_ATTR_TYPEDEF,
379 MONO_CUSTOM_ATTR_PARAMDEF,
380 MONO_CUSTOM_ATTR_INTERFACE,
381 MONO_CUSTOM_ATTR_MEMBERREF,
382 MONO_CUSTOM_ATTR_MODULE,
383 MONO_CUSTOM_ATTR_PERMISSION,
384 MONO_CUSTOM_ATTR_PROPERTY,
385 MONO_CUSTOM_ATTR_EVENT,
386 MONO_CUSTOM_ATTR_SIGNATURE,
387 MONO_CUSTOM_ATTR_MODULEREF,
388 MONO_CUSTOM_ATTR_TYPESPEC,
389 MONO_CUSTOM_ATTR_ASSEMBLY,
390 MONO_CUSTOM_ATTR_ASSEMBLYREF,
391 MONO_CUSTOM_ATTR_FILE,
392 MONO_CUSTOM_ATTR_EXP_TYPE,
393 MONO_CUSTOM_ATTR_MANIFEST,
394 MONO_CUSTOM_ATTR_GENERICPAR,
395 MONO_CUSTOM_ATTR_GENERICPARAMCONSTRAINT,
396 MONO_CUSTOM_ATTR_BITS = 5,
397 MONO_CUSTOM_ATTR_MASK = 0x1F
400 enum {
401 MONO_HAS_FIELD_MARSHAL_FIELDSREF,
402 MONO_HAS_FIELD_MARSHAL_PARAMDEF,
403 MONO_HAS_FIELD_MARSHAL_BITS = 1,
404 MONO_HAS_FIELD_MARSHAL_MASK = 1
407 enum {
408 MONO_HAS_DECL_SECURITY_TYPEDEF,
409 MONO_HAS_DECL_SECURITY_METHODDEF,
410 MONO_HAS_DECL_SECURITY_ASSEMBLY,
411 MONO_HAS_DECL_SECURITY_BITS = 2,
412 MONO_HAS_DECL_SECURITY_MASK = 3
415 enum {
416 MONO_MEMBERREF_PARENT_TYPEDEF, /* not used */
417 MONO_MEMBERREF_PARENT_TYPEREF,
418 MONO_MEMBERREF_PARENT_MODULEREF,
419 MONO_MEMBERREF_PARENT_METHODDEF,
420 MONO_MEMBERREF_PARENT_TYPESPEC,
421 MONO_MEMBERREF_PARENT_BITS = 3,
422 MONO_MEMBERREF_PARENT_MASK = 7
425 enum {
426 MONO_HAS_SEMANTICS_EVENT,
427 MONO_HAS_SEMANTICS_PROPERTY,
428 MONO_HAS_SEMANTICS_BITS = 1,
429 MONO_HAS_SEMANTICS_MASK = 1
432 enum {
433 MONO_METHODDEFORREF_METHODDEF,
434 MONO_METHODDEFORREF_METHODREF,
435 MONO_METHODDEFORREF_BITS = 1,
436 MONO_METHODDEFORREF_MASK = 1
439 enum {
440 MONO_MEMBERFORWD_FIELDDEF,
441 MONO_MEMBERFORWD_METHODDEF,
442 MONO_MEMBERFORWD_BITS = 1,
443 MONO_MEMBERFORWD_MASK = 1
446 enum {
447 MONO_IMPLEMENTATION_FILE,
448 MONO_IMPLEMENTATION_ASSEMBLYREF,
449 MONO_IMPLEMENTATION_EXP_TYPE,
450 MONO_IMPLEMENTATION_BITS = 2,
451 MONO_IMPLEMENTATION_MASK = 3
454 enum {
455 MONO_CUSTOM_ATTR_TYPE_TYPEREF, /* not used */
456 MONO_CUSTOM_ATTR_TYPE_TYPEDEF, /* not used */
457 MONO_CUSTOM_ATTR_TYPE_METHODDEF,
458 MONO_CUSTOM_ATTR_TYPE_MEMBERREF,
459 MONO_CUSTOM_ATTR_TYPE_STRING, /* not used */
460 MONO_CUSTOM_ATTR_TYPE_BITS = 3,
461 MONO_CUSTOM_ATTR_TYPE_MASK = 7
464 enum {
465 MONO_RESOLUTION_SCOPE_MODULE,
466 MONO_RESOLUTION_SCOPE_MODULEREF,
467 MONO_RESOLUTION_SCOPE_ASSEMBLYREF,
468 MONO_RESOLUTION_SCOPE_TYPEREF,
469 MONO_RESOLUTION_SCOPE_BITS = 2,
470 MONO_RESOLUTION_SCOPE_MASK = 3
473 /* Kept for compatibility since this is a public header file */
474 enum {
475 MONO_RESOLTION_SCOPE_MODULE,
476 MONO_RESOLTION_SCOPE_MODULEREF,
477 MONO_RESOLTION_SCOPE_ASSEMBLYREF,
478 MONO_RESOLTION_SCOPE_TYPEREF,
479 MONO_RESOLTION_SCOPE_BITS = 2,
480 MONO_RESOLTION_SCOPE_MASK = 3
483 enum {
484 MONO_TYPEORMETHOD_TYPE,
485 MONO_TYPEORMETHOD_METHOD,
486 MONO_TYPEORMETHOD_BITS = 1,
487 MONO_TYPEORMETHOD_MASK = 1
490 #endif /* __MONO_METADATA_ROW_INDEXES_H__ */