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