blob: 03a4c9bc076f938bd3f0bc1a96f4e2a5e1228221 (
plain)
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
|
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
.assembly extern mscorlib
{
}
.assembly 'bug'
{
.permission reqmin ['mscorlib']System.Security.Permissions.SecurityPermissionAttribute ( "SkipVerification" = true )
}
.module 'bug.exe'
.namespace JitTest
{
.class private auto ansi Test extends ['mscorlib']System.Object
{
.method private hidebysig instance int32 DoStuff(method instance int32 *(refany)) il managed
{
.locals (int32 N)
.maxstack 8
ldarg.0
ldc.i4.7
stloc N
ldloca N
mkrefany [mscorlib]System.Int32
ldarg.1
calli instance int32(refany)
ret
} // end of method 'Test::DoStuff'
.method private hidebysig instance int32 DummyMethod(refany) il managed
{
.maxstack 8
ldarg.1
refanytype
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle )
ldtoken [mscorlib]System.Int32
call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle )
ceq
brtrue OK
newobj instance void [mscorlib]System.ApplicationException::.ctor()
throw
OK:
ldarg.1
refanyval [mscorlib]System.Int32
ldind.i4
ldc.i4.7
xor
ldc.i4 100
add
ret
} // end of method 'Test::DoStuff'
.method private hidebysig static int32 Main() il managed
{
.entrypoint
.maxstack 6
.locals (int32 V_0, int32)
newobj instance void JitTest.Test::.ctor()
ldftn instance int32 JitTest.Test::DummyMethod(refany)
ldftn instance int32 JitTest.Test::DoStuff(method instance int32 *(refany))
tail. calli instance int32 (method instance int32 *(refany))
ret
} // end of method 'Test::Main'
.method public hidebysig specialname rtspecialname instance void .ctor() il managed
{
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void ['mscorlib']System.Object::.ctor()
IL_0006: ret
} // end of method 'Test::.ctor'
} // end of class 'Test'
} // end of namespace 'JitTest'
|