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