blob: ded2dd64a751fffbeff5e8a755263905d4fe7e76 (
plain) (
blame)
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
|
/*
* System.Reflection-like API for acces to .NET assemblies (DLL & EXE)
*/
// $Id$
package ch.epfl.lamp.compiler.msil.util;
import ch.epfl.lamp.compiler.msil.Type;
/**
* Signatures
*
* @author Nikolay Mihaylov
* @version 1.0
*/
public interface Signature {
//##########################################################################
/** Marks end of a list. */
public static final int ELEMENT_TYPE_END = 0x00;
/** void */
public static final int ELEMENT_TYPE_VOID = 0x01;
/** boolean */
public static final int ELEMENT_TYPE_BOOLEAN = 0x02;
/** char */
public static final int ELEMENT_TYPE_CHAR = 0x03;
/** signed byte */
public static final int ELEMENT_TYPE_I1 = 0x04;
/** byte */
public static final int ELEMENT_TYPE_U1 = 0x05;
/** short */
public static final int ELEMENT_TYPE_I2 = 0x06;
/** unsigned short */
public static final int ELEMENT_TYPE_U2 = 0x07;
/** int */
public static final int ELEMENT_TYPE_I4 = 0x08;
/** unsigned int */
public static final int ELEMENT_TYPE_U4 = 0x09;
/** long */
public static final int ELEMENT_TYPE_I8 = 0x0a;
/** unsigned long */
public static final int ELEMENT_TYPE_U8 = 0x0b;
/** float */
public static final int ELEMENT_TYPE_R4 = 0x0c;
/** double */
public static final int ELEMENT_TYPE_R8 = 0x0d;
/** string */
public static final int ELEMENT_TYPE_STRING = 0x0e;
/** Followed by <type> token. */
public static final int ELEMENT_TYPE_PTR = 0x0f;
/** Followed by <type> token. */
public static final int ELEMENT_TYPE_BYREF = 0x10;
/** Followed by <type> token */
public static final int ELEMENT_TYPE_VALUETYPE = 0x11;
/** Followed by <type> token */
public static final int ELEMENT_TYPE_CLASS = 0x12;
/** <type> <rank> <boundsCount> <bound1> ... <loCount> <lo1> ... */
public static final int ELEMENT_TYPE_ARRAY = 0x14;
/***/
public static final int ELEMENT_TYPE_TYPEDBYREF = 0x16;
/** System.IntPtr */
public static final int ELEMENT_TYPE_I = 0x18;
/** System.UIntPtr */
public static final int ELEMENT_TYPE_U = 0x19;
/** Followed by full method signature. */
public static final int ELEMENT_TYPE_FNPTR = 0x1b;
/** System.Object. */
public static final int ELEMENT_TYPE_OBJECT = 0x1c;
/** Single-dim array with 0 lower bound. */
public static final int ELEMENT_TYPE_SZARRAY = 0x1d;
/** Required modifier : followed by a TypeDef or TypeRef token. */
public static final int ELEMENT_TYPE_CMOD_REQD = 0x1f;
/** Optional modifier : followed by a TypeDef or TypeRef token. */
public static final int ELEMENT_TYPE_CMOD_OPT = 0x20;
/** Implemented within the CLI. */
public static final int ELEMENT_TYPE_INTERNAL = 0x21;
/** Or'd with following element types. */
public static final int ELEMENT_TYPE_MODIFIER = 0x40;
/** Sentinel for varargs method signature. */
public static final int ELEMENT_TYPE_SENTINEL = 0x41;
/**Denotes a local variable that points at a pinned object. */
public static final int ELEMENT_TYPE_PINNED = 0x45;
//##########################################################################
// signature designators
public static final int HASTHIS = 0x20;
public static final int EXPLICITTHIS = 0x40;
public static final int DEFAULT = 0x00;
public static final int VARARG = 0x05;
public static final int SENTINEL = 0x41;
public static final int C = 0x01;
public static final int STDCALL = 0x02;
public static final int THISCALL = 0x03;
public static final int FASTCALL = 0x04;
public static final int FIELD = 0x06;
public static final int PROPERTY = 0x08;
public static final int LOCAL_SIG = 0x07;
//##########################################################################
// extra IDs used in the serialization format of named arguments
// to custom attributes. Reverse-engineered from compiled C# example
/** What follows is a string with the full name of the type. */
public static final int X_ELEMENT_TYPE_TYPE = 0x50;
/** What follows is a string with the full name of the enumeration type*/
public static final int X_ELEMENT_TYPE_ENUM = 0x55;
/** The named argument specifies a field. */
public static final int X_ELEMENT_KIND_FIELD = 0x53;
/** The named argument specifies a property. */
public static final int X_ELEMENT_KIND_PROPERTY = 0x54;
//##########################################################################
} // interface Signature
|