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
|
.assembly extern System.Console
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
.ver 4:0:0:0
}
.assembly extern mscorlib { }
.assembly types { }
.namespace JitTest
{
.class private auto ansi beforefieldinit Test
extends [mscorlib]System.Object
{
.method private hidebysig static void
test_token(object boxed_vt,
valuetype [mscorlib]System.RuntimeTypeHandle vt) cil managed
{
.maxstack 8
ldarg.0
callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType()
ldarg.1
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(
valuetype [mscorlib]System.RuntimeTypeHandle)
beq.s IL_EXIT
ldstr "Test failed on "
ldarg.1
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(
valuetype [mscorlib]System.RuntimeTypeHandle)
callvirt instance string [mscorlib]System.Type::ToString()
call string [mscorlib]System.String::Concat(string, string)
call void [System.Console]System.Console::WriteLine(string)
ldc.i4.s 101
call void [mscorlib]System.Environment::Exit(int32)
IL_EXIT:
ret
}
.method private hidebysig static int32
Main() cil managed
{
.entrypoint
.maxstack 8
ldc.i4.1
box [mscorlib]System.Byte
ldtoken [mscorlib]System.Byte
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4.1
box [mscorlib]System.SByte
ldtoken [mscorlib]System.SByte
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4.1
box [mscorlib]System.Int16
ldtoken [mscorlib]System.Int16
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4.1
box [mscorlib]System.UInt16
ldtoken [mscorlib]System.UInt16
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4.1
box [mscorlib]System.Int32
ldtoken [mscorlib]System.Int32
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4.1
box [mscorlib]System.UInt32
ldtoken [mscorlib]System.UInt32
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i8 1
box [mscorlib]System.Int64
ldtoken [mscorlib]System.Int64
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i8 1
box [mscorlib]System.UInt64
ldtoken [mscorlib]System.UInt64
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.r8 1
box [mscorlib]System.Single
ldtoken [mscorlib]System.Single
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.r4 1
box [mscorlib]System.Double
ldtoken [mscorlib]System.Double
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4.1
box [mscorlib]System.IntPtr
ldtoken [mscorlib]System.IntPtr
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4.1
box [mscorlib]System.UIntPtr
ldtoken [mscorlib]System.UIntPtr
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4.1
box [mscorlib]System.Boolean
ldtoken [mscorlib]System.Boolean
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4.1
box [mscorlib]System.Char
ldtoken [mscorlib]System.Char
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldstr "moo"
ldtoken [mscorlib]System.String
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
newobj instance void [mscorlib]System.Object::.ctor()
ldtoken [mscorlib]System.Object
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4 10
newarr int8
ldtoken int8[]
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4 10
newarr uint8
ldtoken uint8[]
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4 10
newarr int16
ldtoken int16[]
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4 10
newarr uint16
ldtoken uint16[]
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4 10
newarr int32
ldtoken int32[]
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4 10
newarr uint32
ldtoken uint32[]
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4 10
newarr int64
ldtoken int64[]
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4 10
newarr uint64
ldtoken uint64[]
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4 10
newarr native int
ldtoken native int[]
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4 10
newarr valuetype [mscorlib]System.UIntPtr
ldtoken valuetype [mscorlib]System.UIntPtr[]
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4 10
newarr bool
ldtoken bool[]
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4 10
newarr char
ldtoken char[]
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4 10
newarr object
ldtoken object[]
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldc.i4 10
newarr string
ldtoken string[]
call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle)
ldstr "Passed"
call void [System.Console]System.Console::WriteLine(string)
ldc.i4.s 100
ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
}
}
|