blob: 2a76153cdfc7981a712e036b9aff3bd0e05f68d1 (
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
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
|
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
.assembly extern System.Console
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
.ver 4:0:0:0
}
.assembly extern legacy library mscorlib {}
.assembly localloc.exe{
.permission reqmin ['mscorlib']System.Security.Permissions.SecurityPermissionAttribute ( "SkipVerification" = true )
}
.class public _localloc {
.method public void .ctor() {
.maxstack 10
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
}
.method public static int32 main(string[]) {
.locals (class [mscorlib]System.IO.TextWriter,int32*,int32,class [mscorlib]System.Text.StringBuilder,int32,string)
.entrypoint
call class [mscorlib]System.IO.TextWriter [System.Console]System.Console::get_Out()
stloc 0
ldc.i4 0x0
stloc 2
newobj instance void [mscorlib]System.Text.StringBuilder::.ctor()
stloc 3
TryStart:
ldc.i4 0xFF
localloc
stloc 1
LOOP0:
ldloc 2
ldc.i4 0xFF
bgt END0
ldloc 1
ldloc 2
add
ldloc 2
conv.i1
stind.i1
ldc.i4 0x1
ldloc 2
add
stloc 2
br LOOP0
END0:
ldc.i4 0x0
stloc 2
LOOP1:
ldloc 2
ldc.i4 0xFF
bgt PassInLoop
ldloc 1
ldloc 2
add
ldind.i1
ldloc 2
conv.i1
bne.un FailInLoop
ldc.i4 0x1
ldloc 2
add
stloc 2
br LOOP1
END1:
br BeforeTryEnd
FailInLoop:
leave Fail
PassInLoop:
leave Pass
BeforeTryEnd:
leave Pass
TryEnd:
br Pass
Filter:
pop
ldc.i4 0x1
endfilter
Handler:
pop
leave EndHandler
EndHandler:
br Fail
Pass:
ldloc 0
ldstr "LOCALLOC Tests PASS"
callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string)
ldc.i4 100
br End
Fail:
ldloc 0
ldstr "!!!! FAILURE !!!! -- LOCALLOC Tests FAIL -- !!!! FAILURE !!!!"
callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string)
ldc.i4 0x0
br End
End:
ret
.try TryStart to TryEnd filter Filter handler Handler to EndHandler
}
}
|