8e6e9323c5a455aa6ee99a17a47dd4e47aa5a152
[ghc-hetmet.git] / ghc / lib / std / PrelGHC.ilx.real
1 // The ILX implementation of PrelGHC 
2
3 .module extern 'PrelBase.i_o'
4 .classunion import [.module 'PrelBase.i_o']PrelBase_Bool {.alternative 'PrelBase_False' ()
5 .alternative 'PrelBase_True' ()}
6 .assembly extern 'mscorlib' { }
7
8 .namespace GHC {
9    .class support {
10       .method public static class [.module 'PrelBase.i_o']PrelBase_Bool mkBool (bool b) {
11          ldarg b
12          brtrue Ltrue
13          newdata class [.module 'PrelBase.i_o']PrelBase_Bool, PrelBase_False()
14          ret
15         Ltrue:
16          newdata class [.module 'PrelBase.i_o']PrelBase_Bool, PrelBase_True()
17          ret
18       }
19       .method public static int32 IntGcdOp (int32,int32) {
20              ldstr "WARNING: IntGcdOp called (warning! not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
21          ldc.i4 1
22          ret
23       }
24       .method public static value class PrelGHC_Z1H<int32,int32> IntSubCOp(int32 a,int32 b)    {
25               .locals(int32 r, int32 c)
26              ldstr "WARNING: IntSubCOp called (warning! not yet tested properly)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
27               //r=a-b
28               ldarg a ldarg b sub stloc r
29               //c = ((a^r) & (a^b)) >> 31
30               ldloc r ldarg a xor ldarg a ldarg b xor and ldc.i4 31 shr.un stloc c
31               //
32              ldloc r ldloc c newobj void value class PrelGHC_Z1H<int32, int32 >::.ctor(!0,!1)
33              ldstr "a = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldarg a   call void ['mscorlib']System.Console::WriteLine(int32)
34              ldstr "b = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldarg b   call void ['mscorlib']System.Console::WriteLine(int32)
35              ldstr "r = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldloc r   call void ['mscorlib']System.Console::WriteLine(int32)
36              ldstr "c = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldloc c   call void ['mscorlib']System.Console::WriteLine(int32)
37               ret
38        }
39       .method public static value class PrelGHC_Z1H<int32,int32> IntAddCOp(int32 a,int32 b)    {
40               .locals(int32 r, int32 c)
41              ldstr "WARNING: IntAddCOp called (warning! not yet tested properly)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
42               //r=a+b
43               ldarg a ldarg b add stloc r
44               //c = ((a^r) & ~(a^b)) >> 31
45               ldloc r ldarg a xor ldarg a ldarg b xor not and ldc.i4 31 shr.un stloc c
46               //
47              ldloc r ldloc c  newobj void value class PrelGHC_Z1H<int32, int32 >::.ctor(!0,!1)
48              ldstr "a = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldarg a   call void ['mscorlib']System.Console::WriteLine(int32)
49              ldstr "b = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldarg b   call void ['mscorlib']System.Console::WriteLine(int32)
50              ldstr "r = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldloc r   call void ['mscorlib']System.Console::WriteLine(int32)
51              ldstr "c = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldloc c   call void ['mscorlib']System.Console::WriteLine(int32)
52               ret
53        }
54
55       // TODO: check me!!! test me!!!!
56       .method public static value class PrelGHC_Z1H<int32,int32> IntMulCOp(int32 a,int32 b)    {
57               .locals(int64 l, int32 r, int32 c)
58
59              ldstr "WARNING: IntMulCOp called (warning! not yet tested properly)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
60
61               //r=(StgInt64)a * (StgInt64)b
62               ldarg a conv.i8
63               ldarg b conv.i8
64               mul stloc l 
65               //  r = z.i[R]
66               //  c = z.i[C]
67              ldloc l ldc.i8 0x80000000 rem conv.i4 stloc r
68               ldloc l ldc.i8 0x80000000 div conv.i4 stloc c
69
70              ldloc r ldloc c newobj void value class PrelGHC_Z1H<int32, int32 >::.ctor(!0,!1)
71              ldstr "a = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldarg a   call void ['mscorlib']System.Console::WriteLine(int32)
72              ldstr "b = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldarg b   call void ['mscorlib']System.Console::WriteLine(int32)
73              ldstr "r = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldloc r   call void ['mscorlib']System.Console::WriteLine(int32)
74              ldstr "c = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldloc c   call void ['mscorlib']System.Console::WriteLine(int32)
75              ret
76
77        }
78
79       .method public static 
80         // Return type
81         !!0  
82         // Method name
83           'catch'<any,any>( thunk<(func ( /* unit skipped */ ) --> !!0)> f1, thunk<(func (!!1) --> (func ( /* unit skipped */ ) --> !!0))> f2)
84       {
85          .locals(!!0 res, !!1 exn)
86                  //LOG ldstr "LOG: Entering catch..."   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
87         .try {
88            ldarg f1
89            // ldunit
90            callfunc () ( /* unit skipped */ ) --> !!0
91            stloc res
92                  //LOG ldstr "LOG: Leaving catch..."   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
93            leave retA
94         } catch [mscorlib]System.Object { 
95
96           // exception of type !!1 should be on the stack??
97            dup      ldstr "LOG: CAUGHT! , Exn = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.Object)
98           unbox.any !!1
99           stloc exn
100           leave retE
101         }
102
103         retA: 
104              ldloc res
105              ret
106
107         retE: 
108                  ldstr "LOG: CAUGHT! Executing handler..."   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
109           ldarg f2
110           ldloc exn
111           tail. callfunc  () (!!1) --> !!0 
112           ret
113
114       }
115
116
117       .method public static !!0 'unblockAsyncExceptions'<any>( thunk<(func ( /* unit skipped */ ) --> !!0)> f ) 
118         {
119              //ldstr "WARNING: unblockAsyncExceptions called (warning! not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
120              ldarg f
121              // ldunit
122              tail. callfunc () ( /* unit skipped */ ) --> !!0
123              ret
124         }
125
126       .method public static !!0 'blockAsyncExceptions'<any>( thunk<(func ( /* unit skipped */ ) --> !!0)> f ) 
127         {
128              //ldstr "WARNING: blockAsyncExceptions called (warning! not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
129              ldarg f
130              // ldunit
131              tail. callfunc () ( /* unit skipped */ ) --> !!0
132              ret
133         }
134
135
136
137       .method public static !!0 'takeMVar'<any> (class PrelGHC_MVarzh<!!0> mvar)
138        {
139              //ldstr "WARNING: takeMVar called (warning! locking not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
140              ldarg mvar ldfld !0 class PrelGHC_MVarzh<!!0>::contents
141              //LOG ldstr "LOG: takeMVar returned: "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String)             dup call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.Object)
142              //LOG ldstr "LOG: for MVar: "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String)             ldarg mvar ldfld int32 class PrelGHC_MVarzh<!!0>::id call void ['mscorlib']System.Console::WriteLine(int32)
143              ret
144       }
145
146
147       .method public static void 'putMVar'<any>(class PrelGHC_MVarzh<!!0> mvar ,!!0 v)
148        {
149              //ldstr "WARNING: putMVar called (warning! locking not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
150                 ldarg mvar ldarg v stfld !0 class PrelGHC_MVarzh<!!0>::contents
151              
152              //LOG ldstr "LOG: putMVar put: "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String)             ldarg v call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.Object)
153              //LOG ldstr "LOG: for MVar: "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String)             ldarg mvar ldfld int32 class PrelGHC_MVarzh<!!0>::id call void ['mscorlib']System.Console::WriteLine(int32)
154          ret
155        }
156
157       // Enter, if (null(Read)) Wait Exit
158       .method public static value class PrelGHC_Z1H<int32,  !!0> 'tryTakeMVar'<any>(class PrelGHC_MVarzh<!!0> mvar)
159        {
160              ldstr "WARNING: tryTakeMVar called (locking not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
161              ldc.i4 1
162              ldarg mvar ldfld !0 class PrelGHC_MVarzh<!!0>::contents
163              newobj void value class PrelGHC_Z1H<int32,!!0>::.ctor(!0,!1)
164              ret
165        }
166
167
168      // Enter, if (null(Read)) Wait Exit
169       .method public static int32 'tryPutMVar'<any>(class PrelGHC_MVarzh<!!0> mvar, !!0 v)
170        {
171              ldstr "WARNING: tryPutMVar called (locking not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
172              ldc.i4 1
173              ret
174        }
175
176
177
178       .method public static int32 isEmptyMVar<any>(class PrelGHC_MVarzh<!!0> mvar)
179        {
180              ldstr "WARNING: isEmptyMVar called (locking not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
181              ldc.i4 0
182              ret
183        }
184
185
186       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerAddOp(int32, unsigned int8[], int32, unsigned int8[]) {
187              ldstr "WARNING: IntegerAddOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
188              ldc.i4 0 ldnull
189              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
190              ret
191        }
192
193       .method public static int32 IntegerCmpIntOp(int32, unsigned int8[], int32) {
194              ldstr "WARNING: IntegerCmpIntOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
195              ldc.i4 0 
196              ret
197        }
198       .method public static int32 IntegerCmpOp(int32, unsigned int8[], int32, unsigned int8[]) {
199              ldstr "WARNING: IntegerCmpOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
200              ldc.i4 0 
201              ret
202        }
203       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerSubOp(int32, unsigned int8[], int32, unsigned int8[]) {
204              ldstr "WARNING: IntegerSubOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
205              ldc.i4 0 ldnull
206              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
207              ret
208        }
209
210       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerMulOp(int32, unsigned int8[], int32, unsigned int8[]) {
211              ldstr "WARNING: IntegerMulOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
212              ldc.i4 0 ldnull
213              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
214              ret
215        }
216
217       .method public static value class PrelGHC_Z3H<int32, unsigned int8[],int32, unsigned int8[]> IntegerQuotRemOp(int32, unsigned int8[], int32, unsigned int8[]) {
218              ldstr "WARNING: IntegerQuotRemOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
219              ldc.i4 0 ldnull ldc.i4 0 ldnull
220              newobj void value class PrelGHC_Z3H<int32, unsigned int8[],int32, unsigned int8[]>::.ctor(!0,!1,!2,!3)
221              ret
222        }
223
224       .method public static value class PrelGHC_Z3H<int32, unsigned int8[],int32, unsigned int8[]> IntegerDivModOp(int32, unsigned int8[], int32, unsigned int8[]) {
225              ldstr "WARNING: IntegerDivModOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
226              ldc.i4 0 ldnull ldc.i4 0 ldnull
227              newobj void value class PrelGHC_Z3H<int32, unsigned int8[],int32, unsigned int8[]>::.ctor(!0,!1,!2,!3)
228              ret
229        }
230       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerDivExactOp(int32, unsigned int8[], int32, unsigned int8[]) {
231              ldstr "WARNING: IntegerDivExactOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
232              ldc.i4 0 ldnull 
233              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
234              ret
235        }
236       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerQuotOp(int32, unsigned int8[], int32, unsigned int8[]) {
237              ldstr "WARNING: IntegerQuotOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
238              ldc.i4 0 ldnull 
239              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
240              ret
241        }
242       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerAndOp(int32, unsigned int8[], int32, unsigned int8[]) {
243              ldstr "WARNING: IntegerAndOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
244              ldc.i4 0 ldnull
245              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
246              ret
247        }
248
249       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerRemOp(int32, unsigned int8[], int32, unsigned int8[]) {
250              ldstr "WARNING: IntegerRemOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
251              ldc.i4 0 ldnull
252              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
253              ret
254        }
255
256
257        .method public static int32 Integer2IntOp(int32, unsigned int8[]) {
258              ldstr "WARNING: Integer2IntOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
259              ldc.i4 0
260              ret
261        }
262
263        .method public static unsigned int32 Integer2WordOp(int32, unsigned int8[]) {
264              ldstr "WARNING: Integer2WordOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
265              ldc.i4 0
266              ret
267        }
268
269         .method public static int64 IntegerToInt64Op(int32, unsigned int8[]) {
270              ldstr "WARNING: IntegerToInt64Op called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
271              ldc.i8 0
272              ret
273        }
274
275        .method public static unsigned int64 IntegerToWord64Op(int32, unsigned int8[]) {
276              ldstr "WARNING: IntegerToWord64Op called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
277              ldc.i8 0
278              ret
279        }
280
281       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> Int2IntegerOp(int32) {
282              ldstr "WARNING: Integer2IntOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
283              ldc.i4 0 ldnull
284              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
285              ret
286        }
287
288        .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> Word2IntegerOp(unsigned int32) {
289              ldstr "WARNING: Word2IntegerOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
290              ldc.i4 0 ldnull
291              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
292              ret
293        }
294
295         .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> Word64ToIntegerOp(unsigned int64) {
296              ldstr "WARNING: Word64ToIntegerOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
297              ldc.i4 0 ldnull
298              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
299              ret
300        }
301
302         .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> Int64ToIntegerOp(int64) {
303              ldstr "WARNING: Int64ToIntegerOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
304              ldc.i4 0 ldnull
305              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
306              ret
307        }
308
309     .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerOrOp(int32, unsigned int8[], int32, unsigned int8[]) {
310              ldstr "WARNING: IntegerOrOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
311              ldc.i4 0 ldnull
312              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
313              ret
314        }
315
316      .method public static int32 IntegerIntGcdOp(int32, unsigned int8[], int32) {
317              ldstr "WARNING: IntegerOrOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
318              ldc.i4 0 
319              ret
320        }
321       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerXorOp(int32, unsigned int8[], int32, unsigned int8[]) {
322              ldstr "WARNING: IntegerXorOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
323              ldc.i4 0 ldnull
324              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
325              ret
326        }
327
328       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerGcdOp(int32, unsigned int8[], int32, unsigned int8[]) {
329              ldstr "WARNING: IntegerGcdOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
330              ldc.i4 0 ldnull
331              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
332              ret
333        }
334
335       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerComplementOp(int32, unsigned int8[]) {
336              ldstr "WARNING: IntegerComplementOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
337              ldc.i4 0 ldnull
338              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
339              ret
340        }
341
342       .method public static value class PrelGHC_Z2H<int32,int32,  unsigned int8[]> decodeFloat(float32 f) {
343              ldstr "WARNING: decodeFloat called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
344              ldarg f conv.r8 call float64 [mscorlib]System.Math::Abs(float64) call float64 [mscorlib]System.Math::Log(float64) conv.i4 
345              ldc.i4 0 ldnull
346              newobj void value class PrelGHC_Z2H<int32,int32,  unsigned int8[]>::.ctor(!0,!1,!2)
347              ret
348        }
349
350       .method public static value class PrelGHC_Z2H<int32,int32,  unsigned int8[]> decodeDouble(float64 f) {
351              ldstr "WARNING: decodeDouble called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
352              ldarg f  call float64 [mscorlib]System.Math::Abs(float64) call float64 [mscorlib]System.Math::Log(float64) conv.i4 
353              ldc.i4 0 ldnull
354              newobj void value class PrelGHC_Z2H<int32,int32,  unsigned int8[]>::.ctor(!0,!1,!2)
355              ret
356        }
357
358
359       .method public static !!0[] newArray<any>(int32 n, !!0 x)  {
360            .locals(int32 i, !!0[] res)
361            ldarg n
362            newarr !!0
363            stloc res
364            ldc.i4 0
365            stloc i
366 loop:
367            ldarg n
368            ldloc i
369            beq end
370            ldloc res
371            ldloc i
372            ldarg x
373            stelem.any !!0
374            br loop
375 end:
376            ldloc res
377            ret
378        }
379
380
381       .method public static int32 dataToTag<any>(!!0 x)    {
382            ldstr "WARNING: dataToTag called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
383               ldc.i4 0
384               ret
385        }
386       .method public static !!0 tagToEnum<any>(int32)    {
387            ldstr "WARNING: tagToEnum called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
388               ldnull
389               ret
390        }
391    }
392 }
393
394 //--------------------------------------------
395 // Builtin classes
396
397 .class public 'PrelGHC_MVarzh'<any> {
398   .field public !0 contents
399   .field public int32 id
400   .field static public int32 ids
401     .method public rtspecialname specialname instance void .ctor() {
402        ldarg 0
403        ldsfld int32 class PrelGHC_MVarzh::ids
404        ldc.i4 1
405        add
406        dup
407         stsfld int32 class PrelGHC_MVarzh::ids
408        stfld int32 class PrelGHC_MVarzh<!0>::id
409
410        ret 
411     }
412 }
413
414 .class public 'PrelGHC_StablePtrzh' /* <any> */ {
415   .field public class [mscorlib]System.Object contents
416     .method public rtspecialname specialname instance void .ctor(class [mscorlib]System.Object) {
417        ldarg 0 ldarg 1 stfld class [mscorlib]System.Object class PrelGHC_StablePtrzh::contents
418        ret 
419     }
420 }
421
422 .class public 'PrelGHC_StableNamezh' /* <any> */ {
423     .method public rtspecialname specialname instance void .ctor() {
424        ret 
425     }
426 }
427
428 .class public 'PrelGHC_Foreignzh' {
429   .field public void * contents
430     .method public rtspecialname specialname instance void .ctor(void *) {
431        ldarg 0 ldarg 1 stfld void * class PrelGHC_Foreignzh::contents
432        ret 
433     }
434 }
435
436 // TODO
437 .class public 'PrelGHC_Weakzh'<any> {
438   .field public !0 contents
439    .field public thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.i_o']PrelBase_Z0T)> _finalizer
440    .method public rtspecialname specialname instance void .ctor(!0 x, thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.i_o']PrelBase_Z0T)> f) {
441        ldarg 0 ldarg x stfld !0 class PrelGHC_Weakzh<!0>::contents
442        ldarg 0 ldarg f stfld thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.i_o']PrelBase_Z0T)> class PrelGHC_Weakzh<!0>::_finalizer
443        ret 
444     }
445    .method public static  value class PrelGHC_Z1H<int32,thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.i_o']PrelBase_Z0T)>> finalizer<any>(class PrelGHC_Weakzh<!!0>) { 
446        ldc.i4 1
447        ldarg 0 ldfld thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.i_o']PrelBase_Z0T)> class PrelGHC_Weakzh<!!0>::_finalizer
448          newobj void value class PrelGHC_Z1H<int32,thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.i_o']PrelBase_Z0T)>>::.ctor(!0,!1)
449        ret
450    }
451    .method public static value class PrelGHC_Z1H<int32,!!0> deref<any>(class PrelGHC_Weakzh<!!0>) { 
452        ldc.i4 1
453        ldarg 0 ldfld !0 class PrelGHC_Weakzh<!!0>::contents
454        newobj void  value class PrelGHC_Z1H<int32,!!0>::.ctor(!0,!1)
455        ret
456    }
457    .method public  static  
458        class PrelGHC_Weakzh<!!1>
459            bake<any,any>(!!0,!!1 obj,thunk<(func () -> class [.module 'PrelBase.i_o']PrelBase_Z0T)> finalizer) {
460          ldarg obj 
461          ldarg finalizer
462          newobj void class 'PrelGHC_Weakzh'<!!1>::.ctor(!0 x, thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.i_o']PrelBase_Z0T)>) 
463          ret 
464    }
465
466 }
467
468 .class public 'PrelGHC_MutVarzh'<any> { 
469   .field public !0 contents
470     .method public rtspecialname specialname instance void .ctor(!0) {
471        ldarg 0 ldarg 1 stfld !0 class PrelGHC_MutVarzh<!0>::contents
472        ret 
473     }
474 }
475
476 .class public PrelGHC_ZCTCCallable<any> {
477 }
478
479 .class public PrelGHC_BCOzh {
480 }
481
482 .class public PrelGHC_ZCTCReturnable<any> {
483 }
484
485
486 //------------------------------------------------------------
487 // Builtin Unboxed Tuple Types
488
489 .class value sealed  'PrelGHC_Z0H' <any>  extends ['mscorlib']System.ValueType { 
490     .method public rtspecialname specialname instance void .ctor(!0) {
491        ldarg 0 ldarg 1 stfld !0 class PrelGHC_Z0H<!0>::fld0
492        ret 
493     }
494    .field public !0 fld0
495 }
496
497 .class value sealed 'PrelGHC_Z1H' <any,any> extends ['mscorlib']System.ValueType  { 
498     .method public rtspecialname specialname instance void .ctor(!0,!1) {
499        ldarg 0 ldarg 1 stfld !0 class PrelGHC_Z1H<!0,!1>::fld0
500        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z1H<!0,!1>::fld1
501        ret 
502     }
503    .field public !0 fld0
504    .field public !1 fld1
505 }
506
507 .class value sealed 'PrelGHC_Z2H' <any,any,any>  extends ['mscorlib']System.ValueType { 
508     .method public rtspecialname specialname instance void .ctor(!0,!1,!2) {
509        ldarg 0 ldarg 1 stfld !0 class PrelGHC_Z2H<!0,!1,!2>::fld0
510        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z2H<!0,!1,!2>::fld1
511        ldarg 0 ldarg 3 stfld !2 class PrelGHC_Z2H<!0,!1,!2>::fld2
512        ret 
513     }
514    .field public !0 fld0
515    .field public !1 fld1
516    .field public !2 fld2
517 }
518
519 .class value sealed 'PrelGHC_Z3H' <any,any,any,any>  extends ['mscorlib']System.ValueType { 
520     .method public rtspecialname specialname instance void .ctor(!0,!1,!2,!3) {
521        ldarg 0 ldarg 1 stfld !0 class PrelGHC_Z3H<!0,!1,!2,!3>::fld0
522        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z3H<!0,!1,!2,!3>::fld1
523        ldarg 0 ldarg 3 stfld !2 class PrelGHC_Z3H<!0,!1,!2,!3>::fld2
524        ldarg 0 ldarg 4 stfld !3 class PrelGHC_Z3H<!0,!1,!2,!3>::fld3
525        ret 
526     }
527    .field public !0 fld0
528    .field public !1 fld1
529    .field public !2 fld2
530    .field public !3 fld3
531 }
532
533 .class value sealed 'PrelGHC_Z4H' <any,any,any,any,any>  extends ['mscorlib']System.ValueType { 
534     .method public rtspecialname specialname instance void .ctor(!0,!1,!2,!3,!4) {
535        ldarg 0 ldarg 1 stfld !0 class PrelGHC_Z4H<!0,!1,!2,!3,!4>::fld0
536        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z4H<!0,!1,!2,!3,!4>::fld1
537        ldarg 0 ldarg 3 stfld !2 class PrelGHC_Z4H<!0,!1,!2,!3,!4>::fld2
538        ldarg 0 ldarg 4 stfld !3 class PrelGHC_Z4H<!0,!1,!2,!3,!4>::fld3
539        ldarg 0 ldarg 5 stfld !4 class PrelGHC_Z4H<!0,!1,!2,!3,!4>::fld4
540        ret 
541     }
542    .field public !0 fld0
543    .field public !1 fld1
544    .field public !2 fld2
545    .field public !3 fld3
546    .field public !4 fld4
547 }
548
549 .class value sealed 'PrelGHC_Z5H' <any,any,any,any,any,any>  extends ['mscorlib']System.ValueType { 
550    .method public rtspecialname specialname instance void .ctor(!0,!1,!2,!3,!4,!5) {
551        ldarg 0 ldarg 1 stfld !0 class PrelGHC_Z5H<!0,!1,!2,!3,!4,!5>::fld0
552        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z5H<!0,!1,!2,!3,!4,!5>::fld1
553        ldarg 0 ldarg 3 stfld !2 class PrelGHC_Z5H<!0,!1,!2,!3,!4,!5>::fld2
554        ldarg 0 ldarg 4 stfld !3 class PrelGHC_Z5H<!0,!1,!2,!3,!4,!5>::fld3
555        ldarg 0 ldarg 5 stfld !4 class PrelGHC_Z5H<!0,!1,!2,!3,!4,!5>::fld4
556        ldarg 0 ldarg 6 stfld !5 class PrelGHC_Z5H<!0,!1,!2,!3,!4,!5>::fld5
557        ret 
558     }
559    .field public !0 fld0
560    .field public !1 fld1
561    .field public !2 fld2
562    .field public !3 fld3
563    .field public !4 fld4
564    .field public !5 fld5
565 }
566
567 .class value sealed 'PrelGHC_Z6H' <any,any,any,any,any,any,any>  extends ['mscorlib']System.ValueType { 
568    .method public rtspecialname specialname instance void .ctor(!0,!1,!2,!3,!4,!5,!6) {
569        ldarg 0 ldarg 1 stfld !0 class PrelGHC_Z6H<!0,!1,!2,!3,!4,!5,!6>::fld0
570        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z6H<!0,!1,!2,!3,!4,!5,!6>::fld1
571        ldarg 0 ldarg 3 stfld !2 class PrelGHC_Z6H<!0,!1,!2,!3,!4,!5,!6>::fld2
572        ldarg 0 ldarg 4 stfld !3 class PrelGHC_Z6H<!0,!1,!2,!3,!4,!5,!6>::fld3
573        ldarg 0 ldarg 5 stfld !4 class PrelGHC_Z6H<!0,!1,!2,!3,!4,!5,!6>::fld4
574        ldarg 0 ldarg 6 stfld !5 class PrelGHC_Z6H<!0,!1,!2,!3,!4,!5,!6>::fld5
575        ldarg 0 ldarg 7 stfld !6 class PrelGHC_Z6H<!0,!1,!2,!3,!4,!5,!6>::fld6
576        ret 
577     }
578    .field public !0 fld0
579    .field public !1 fld1
580    .field public !2 fld2
581    .field public !3 fld3
582    .field public !4 fld4
583    .field public !5 fld5
584    .field public !6 fld6
585 }
586
587 .class value sealed 'PrelGHC_Z7H' <any,any,any,any,any,any,any,any>  extends ['mscorlib']System.ValueType { 
588    .method public rtspecialname specialname instance void .ctor(!0,!1,!2,!3,!4,!5,!6,!7) {
589        ldarg 0 ldarg 1 stfld !0 class PrelGHC_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld0
590        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld1
591        ldarg 0 ldarg 3 stfld !2 class PrelGHC_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld2
592        ldarg 0 ldarg 4 stfld !3 class PrelGHC_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld3
593        ldarg 0 ldarg 5 stfld !4 class PrelGHC_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld4
594        ldarg 0 ldarg 6 stfld !5 class PrelGHC_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld5
595        ldarg 0 ldarg 7 stfld !6 class PrelGHC_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld6
596        ldarg 0 ldarg 8 stfld !7 class PrelGHC_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld7
597        ret 
598     }
599    .field public !0 fld0
600    .field public !1 fld1
601    .field public !2 fld2
602    .field public !3 fld3
603    .field public !4 fld4
604    .field public !5 fld5
605    .field public !6 fld6
606    .field public !7 fld7
607 }
608
609
610 // Phew...This is needed by the optimized Haskell library....
611 // - TODO: fill in the rest!
612 .class value sealed 'PrelGHC_Z18H' <any,any,any,any,any,any,any,any,any,any,any,any,any,any,any,any,any,any>  extends ['mscorlib']System.ValueType { 
613    .method public rtspecialname specialname instance void .ctor(!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17) {
614        ldarg 0 ldarg 1 stfld !0 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld0
615        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld1
616        ldarg 0 ldarg 3 stfld !2 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld2
617        ldarg 0 ldarg 4 stfld !3 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld3
618        ldarg 0 ldarg 5 stfld !4 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld4
619        ldarg 0 ldarg 6 stfld !5 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld5
620        ldarg 0 ldarg 7 stfld !6 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld6
621        ldarg 0 ldarg 8 stfld !7 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld7
622        ldarg 0 ldarg 9 stfld !8 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld8
623        ldarg 0 ldarg 10 stfld !9 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld9
624        ldarg 0 ldarg 11 stfld !10 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld10
625        ldarg 0 ldarg 12 stfld !11 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld11
626        ldarg 0 ldarg 13 stfld !12 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld12
627        ldarg 0 ldarg 14 stfld !13 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld13
628        ldarg 0 ldarg 15 stfld !14 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld14
629        ldarg 0 ldarg 16 stfld !15 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld15
630        ldarg 0 ldarg 17 stfld !16 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld16
631        ldarg 0 ldarg 18 stfld !17 class PrelGHC_Z18H<!0,!1,!2,!3,!4,!5,!6,!7,!8,!9,!10,!11,!12,!13,!14,!15,!16,!17>::fld17
632        ret 
633     }
634    .field public !0 fld0
635    .field public !1 fld1
636    .field public !2 fld2
637    .field public !3 fld3
638    .field public !4 fld4
639    .field public !5 fld5
640    .field public !6 fld6
641    .field public !7 fld7
642    .field public !8 fld8
643    .field public !9 fld9
644    .field public !10 fld10
645    .field public !11 fld11
646    .field public !12 fld12
647    .field public !13 fld13
648    .field public !14 fld14
649    .field public !15 fld15
650    .field public !16 fld16
651    .field public !17 fld17
652
653 }
654
655 .classunion '()' extends thunk<class '()'>  { 
656    .alternative '()'()
657 }
658