summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Methodical/explicit/basic/refloc_i1.il
blob: 07acbaf186e55e21f6b8b064e9195eed31ecaa17 (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
// 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 'refloc_i1'// as "refloc_i1"
{

  //  .custom instance void ['mscorlib']System.Diagnostics.DebuggableAttribute::.ctor(bool,
  //                                                                                  bool) = ( 01 00 00 01 00 00 ) 
  
  
}
.module 'refloc_i1.exe'
// MVID: {3752C643-F767-47EB-BDBF-8588A1A0B6B3}
.namespace Test
{
  .class private auto ansi AA extends ['mscorlib']System.Object
  {
    .field public unsigned int8 mm
    .field static family class Test.AA s_aa
    .field family class Test.AA m_aa
    .field public static bool finalizerCalled
    .method family hidebysig virtual instance void
            Finalize() il managed
    {
      // Code size       59 (0x3b)
      .maxstack  8
      IL_0000:  ldstr      "finalizer called."
      IL_0005:  call       void [System.Console]System.Console::WriteLine(class System.String)
      IL_000a:  ldarg.0
      IL_0027:  ldfld      unsigned int8 Test.AA::mm
      			ldc.i4 45
      IL_002c:  beq.s      IL_0034

      IL_002e:  newobj     instance void ['mscorlib']System.Exception::.ctor()
      IL_0033:  throw

      IL_0034:  ldc.i4.1
      IL_0035:  stsfld     bool Test.AA::finalizerCalled
      IL_003a:  ret
    } // end of method 'AA::Finalize'

    .method public hidebysig specialname rtspecialname static 
            void .cctor() il managed
    {
      // Code size       17 (0x11)
      .maxstack  8
      IL_0000:  newobj     instance void Test.AA::.ctor()
      IL_0005:  stsfld     class Test.AA Test.AA::s_aa
      IL_000a:  ldc.i4.0
      IL_000b:  stsfld     bool Test.AA::finalizerCalled
      IL_0010:  ret
    } // end of method 'AA::.cctor'

    .method public hidebysig specialname rtspecialname 
            instance void .ctor() il managed
    {
      // Code size       26 (0x1a)
      .maxstack  8
      IL_0000:  ldarg.0
      IL_0001:  ldc.i4.s   45
      IL_0003:  stfld      unsigned int8 Test.AA::mm
      IL_0008:  ldarg.0
      IL_0009:  ldsfld     class Test.AA Test.AA::s_aa
      IL_000e:  stfld      class Test.AA Test.AA::m_aa
      IL_0013:  ldarg.0
      IL_0014:  call       instance void ['mscorlib']System.Object::.ctor()
      IL_0019:  ret
    } // end of method 'AA::.ctor'

  } // 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       43 (0x2b)
      .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:  call       void ['mscorlib']System.GC::WaitForPendingFinalizers()
      IL_002a:  ret
    } // end of method 'App::Litter'

    .method private hidebysig static int32
            Main() il managed
    {
      .entrypoint
      // Code size       64 (0x40)
      .maxstack  2
      .locals (unsigned int8 & V_0,
               int32 V_1)
      IL_0000:  ldsfld     class Test.AA Test.App::s_aa
      IL_0005:  ldflda      unsigned int8 Test.AA::mm
      IL_000a:  stloc.0
      IL_000b:  ldnull
      IL_000c:  stsfld     class Test.AA Test.App::s_aa
      IL_0011:  call       void Test.App::Litter()
      IL_0016:  ldsfld     bool Test.AA::finalizerCalled
      IL_001b:  brtrue.s   IL_0022

      IL_001d:  ldloc.0
      			ldind.i1
      IL_001e:  ldc.i4.s   45
      IL_0020:  beq.s      IL_0030

      IL_0022:  ldstr      "*** failed ***"
      IL_0027:  call       void [System.Console]System.Console::WriteLine(class System.String)
      IL_002c:  ldc.i4.1
      IL_002d:  stloc.1
      IL_002e:  br.s       IL_003e

      IL_0030:  ldstr      "*** passed ***"
      IL_0035:  call       void [System.Console]System.Console::WriteLine(class System.String)
      IL_003a:  ldc.i4    0x64
      IL_003b:  stloc.1
      IL_003c:  br.s       IL_003e

      IL_003e:  ldloc.1
      IL_003f:  ret
    } // end of method 'App::Main'

    .method public hidebysig specialname rtspecialname static 
            void .cctor() il managed
    {
      // Code size       11 (0xb)
      .maxstack  8
      IL_0000:  newobj     instance void Test.AA::.ctor()
      IL_0005:  stsfld     class Test.AA Test.App::s_aa
      IL_000a:  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 ***********************