summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Methodical/explicit/basic/refarg_i4.il
blob: 5c34b03f4af83d9bf29f851e7b6b9745767c1058 (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
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.



.assembly extern mscorlib { }
.assembly extern System.Console
{
  .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
  .ver 4:0:0:0
}
.assembly 'refarg_i4'// as "refarg_i4"
{

  //  .custom instance void ['mscorlib']System.Diagnostics.DebuggableAttribute::.ctor(bool,
  //                                                                                  bool) = ( 01 00 00 01 00 00 ) 
  
  
}
.module 'refarg_i4.exe'
// MVID: {0D4BD404-2598-466F-9449-2F343E513C7B}
.namespace Test
{
  .class private auto ansi AA extends ['mscorlib']System.Object
  {
    .field public class Test.AA self3
    .field public class Test.AA self4
    .field private int32 pad1
    .field public int32 mm
    .field public class Test.AA self1
    .field public class Test.AA self2
    .method public hidebysig specialname rtspecialname 
            instance void  .ctor(int32 reclevel) il managed
    {
      // Code size       98 (0x62)
      .maxstack  5
      .locals (class Test.AA V_0)
      IL_0000:  ldarg.0
      IL_0001:  ldnull
      IL_0002:  stfld      class Test.AA Test.AA::self3
      IL_0007:  ldarg.0
      IL_0008:  ldnull
      IL_0009:  stfld      class Test.AA Test.AA::self4
      IL_000e:  ldarg.0
      IL_000f:  ldc.i4     0xbf
      IL_0014:  stfld      int32 Test.AA::pad1
      IL_0019:  ldarg.0
      IL_001a:  ldc.i4.s   11
      IL_001c:  stfld      int32 Test.AA::mm
      IL_0021:  ldarg.0
      IL_0022:  ldnull
      IL_0023:  stfld      class Test.AA Test.AA::self1
      IL_0028:  ldarg.0
      IL_0029:  ldnull
      IL_002a:  stfld      class Test.AA Test.AA::self2
      IL_002f:  ldarg.0
      IL_0030:  call       instance void ['mscorlib']System.Object::.ctor()
      IL_0035:  ldarg.0
      IL_0036:  ldarg.0
      IL_0037:  ldarg.0
      IL_0038:  ldarg.0
      IL_0039:  dup
      IL_003a:  stloc.0
      IL_003b:  stfld      class Test.AA Test.AA::self4
      IL_0040:  ldloc.0
      IL_0041:  dup
      IL_0042:  stloc.0
      IL_0043:  stfld      class Test.AA Test.AA::self2
      IL_0048:  ldloc.0
      IL_0049:  stfld      class Test.AA Test.AA::self1
      IL_004e:  ldarg.1
      IL_004f:  ldc.i4.s   100
      IL_0051:  bge.s      IL_0061

      IL_0053:  ldarg.0
      IL_0054:  ldarg.1
      IL_0055:  ldc.i4.1
      IL_0056:  add
      IL_0057:  newobj     instance void Test.AA::.ctor(int32)
      IL_005c:  stfld      class Test.AA Test.AA::self3
      IL_0061:  ret
    } // end of method 'AA::.ctor'

    .method family hidebysig instance void
            CheckFields() il managed
    {
      // Code size       39 (0x27)
      .maxstack  8
      IL_0000:  ldarg.0
      IL_0001:  brtrue.s   IL_0009

      IL_0003:  newobj     instance void ['mscorlib']System.Exception::.ctor()
      IL_0008:  throw

      IL_0009:  ldarg.0
      IL_000a:  ldfld      int32 Test.AA::pad1
      IL_000f:  ldc.i4     0xbf
      IL_0014:  bne.un.s   IL_0020

      IL_0016:  ldarg.0
      IL_0017:  ldfld      int32 Test.AA::mm
      IL_001c:  ldc.i4.s   11
      IL_001e:  beq.s      IL_0026

      IL_0020:  newobj     instance void ['mscorlib']System.Exception::.ctor()
      IL_0025:  throw

      IL_0026:  ret
    } // end of method 'AA::CheckFields'

    .method family hidebysig virtual instance void
            Finalize() il managed
    {
      // Code size       83 (0x53)
      .maxstack  1
      IL_0000:  ldarg.0
      IL_0001:  call       instance void Test.AA::CheckFields()
      IL_0006:  ldarg.0
      IL_0007:  ldfld      class Test.AA Test.AA::self1
      IL_000c:  brfalse.s  IL_0019

      IL_000e:  ldarg.0
      IL_000f:  ldfld      class Test.AA Test.AA::self1
      IL_0014:  call       instance void Test.AA::CheckFields()
      IL_0019:  ldarg.0
      IL_001a:  ldfld      class Test.AA Test.AA::self2
      IL_001f:  brfalse.s  IL_002c

      IL_0021:  ldarg.0
      IL_0022:  ldfld      class Test.AA Test.AA::self2
      IL_0027:  call       instance void Test.AA::CheckFields()
      IL_002c:  ldarg.0
      IL_002d:  ldfld      class Test.AA Test.AA::self3
      IL_0032:  brfalse.s  IL_003f

      IL_0034:  ldarg.0
      IL_0035:  ldfld      class Test.AA Test.AA::self3
      IL_003a:  call       instance void Test.AA::CheckFields()
      IL_003f:  ldarg.0
      IL_0040:  ldfld      class Test.AA Test.AA::self4
      IL_0045:  brfalse.s  IL_0052

      IL_0047:  ldarg.0
      IL_0048:  ldfld      class Test.AA Test.AA::self4
      IL_004d:  call       instance void Test.AA::CheckFields()
      IL_0052:  ret
    } // end of method 'AA::Finalize'

  } // end of class 'AA'

  .class private auto ansi App extends ['mscorlib']System.Object
  {
    .field private static class Test.AA s_aa
    .method private hidebysig static void
            Litter() il managed
    {
      // Code size       38 (0x26)
      .maxstack  2
      .locals (int32 V_0,
               int32[] V_1)
      IL_0000:  call       void ['mscorlib']System.GC::Collect()
      IL_0005:  ldc.i4.0
      IL_0006:  stloc.0
      IL_0007:  br.s       IL_0018

      IL_0009:  ldc.i4     0x3e8
      IL_000e:  newarr     ['mscorlib']System.Int32
      IL_0013:  stloc.1
      IL_0014:  ldloc.0
      IL_0015:  ldc.i4.1
      IL_0016:  add
      IL_0017:  stloc.0
      IL_0018:  ldloc.0
      IL_0019:  ldc.i4     0x3e8
      IL_001e:  blt.s      IL_0009

      IL_0020:  call       void ['mscorlib']System.GC::Collect()
      IL_0025:  ret
    } // end of method 'App::Litter'

    .method private hidebysig static int32 
            Test(int32& n) il managed
    {
      // Code size       47 (0x2f)
      .maxstack  2
      .locals (int32 V_0)
      IL_0000:  ldnull
      IL_0001:  stsfld     class Test.AA Test.App::s_aa
      IL_0006:  call       void Test.App::Litter()
      IL_000b:  ldarg.0
      IL_000c:  ldind.i4
      IL_000d:  ldc.i4.s   11
      IL_000f:  beq.s      IL_001f

      IL_0011:  ldstr      "*** failed ***"
      IL_0016:  call       void [System.Console]System.Console::WriteLine(class System.String)
      IL_001b:  ldc.i4.1
      IL_001c:  stloc.0
      IL_001d:  br.s       IL_002d

      IL_001f:  ldstr      "*** passed ***"
      IL_0024:  call       void [System.Console]System.Console::WriteLine(class System.String)
      IL_0029:  ldc.i4    0x64
      IL_002a:  stloc.0
      IL_002b:  br.s       IL_002d

      IL_002d:  ldloc.0
      IL_002e:  ret
    } // end of method 'App::Test'

    .method private hidebysig static int32
            Main() il managed
    {
      .entrypoint
      // Code size       32 (0x20)
      .maxstack  1
      .locals (int32 V_0,
               int32 V_1)
      IL_0000:  ldsfld     class Test.AA Test.App::s_aa
      IL_0005:  ldflda     int32 Test.AA::mm
      IL_000a:  call       int32 Test.App::Test(int32&)
      IL_000f:  stloc.0
      IL_0010:  call       void ['mscorlib']System.GC::Collect()
      IL_0015:  call       void ['mscorlib']System.GC::WaitForPendingFinalizers()
      IL_001a:  ldloc.0
      IL_001b:  stloc.1
      IL_001c:  br.s       IL_001e

      IL_001e:  ldloc.1
      IL_001f:  ret
    } // end of method 'App::Main'

    .method public hidebysig specialname rtspecialname static 
            void .cctor() il managed
    {
      // Code size       12 (0xc)
      .maxstack  8
      IL_0000:  ldc.i4.0
      IL_0001:  newobj     instance void Test.AA::.ctor(int32)
      IL_0006:  stsfld     class Test.AA Test.App::s_aa
      IL_000b:  ret
    } // end of method 'App::.cctor'

    .method public hidebysig specialname rtspecialname 
            instance void .ctor() il managed
    {
      // Code size       7 (0x7)
      .maxstack  8
      IL_0000:  ldarg.0
      IL_0001:  call       instance void ['mscorlib']System.Object::.ctor()
      IL_0006:  ret
    } // end of method 'App::.ctor'

  } // end of class 'App'

} // end of namespace 'Test'

//*********** DISASSEMBLY COMPLETE ***********************