forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcatchrettoinnertry.il
More file actions
150 lines (121 loc) · 3.94 KB
/
Copy pathcatchrettoinnertry.il
File metadata and controls
150 lines (121 loc) · 3.94 KB
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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
.assembly extern System.Console
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
.ver 4:0:0:0
}
.assembly extern mscorlib
{
}
.assembly extern eh_common{}
.assembly catchrettoinnertry
{
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.assembly extern xunit.core {}
.imagebase 0x00400000
.subsystem 0x00000003
.file alignment 512
.corflags 0x00000001
.namespace strswitch
{
.class private auto ansi beforefieldinit Class1
extends [mscorlib]System.Object
{
}
}
.namespace strswitch
{
.class private auto ansi beforefieldinit Class1
extends [mscorlib]System.Object
{
.field private static class [eh_common]TestUtil.TestLog testLog
.method private hidebysig specialname rtspecialname static void .cctor() cil managed
{
.maxstack 2
.locals init (class [mscorlib]System.IO.StringWriter expectedOut)
newobj instance void [mscorlib]System.IO.StringWriter::.ctor()
stloc.s expectedOut
ldloc.s expectedOut
ldstr "Caught an exception"
callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string)
ldloc.s expectedOut
ldstr "bye"
callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string)
ldloc.s expectedOut
ldstr "In outer finally"
callvirt instance void [mscorlib]System.IO.TextWriter::WriteLine(string)
ldloc.s expectedOut
newobj instance void [eh_common]TestUtil.TestLog::.ctor(object)
stsfld class [eh_common]TestUtil.TestLog strswitch.Class1::testLog
ret
}
.method private hidebysig static int32
Main() cil managed
{
.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = (
01 00 00 00
)
.entrypoint
.maxstack 2
ldsfld class [eh_common]TestUtil.TestLog strswitch.Class1::testLog
callvirt instance void [eh_common]TestUtil.TestLog::StartRecording()
.locals init (int32 V_0,
class [mscorlib]System.Exception V_1,
int32 V_2)
ldc.i4.3
stloc.0
.try
{
.try
{
branch_0002: ldloc.0
ldc.i4.3
bne.un.s branch_000c
newobj instance void [mscorlib]System.IndexOutOfRangeException::.ctor()
throw
branch_000c: ldloc.0
ldc.i4.4
bne.un.s branch_001a
ldstr "bye"
call void [System.Console]System.Console::WriteLine(string)
branch_001a: leave.s branch_002d
}
catch [mscorlib]System.Exception
{
stloc.1
ldstr "Caught an exception"
call void [System.Console]System.Console::WriteLine(string)
ldloc.0
ldc.i4.1
add
stloc.0
leave.s branch_0002
}
branch_002d: leave.s branch_003a
}
finally
{
ldstr "In outer finally"
call void [System.Console]System.Console::WriteLine(string)
endfinally
}
branch_003a:
ldsfld class [eh_common]TestUtil.TestLog strswitch.Class1::testLog
callvirt instance void [eh_common]TestUtil.TestLog::StopRecording()
ldsfld class [eh_common]TestUtil.TestLog strswitch.Class1::testLog
callvirt instance int32 [eh_common]TestUtil.TestLog::VerifyOutput()
ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.maxstack 1
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
}
}
}