[project @ 2001-08-07 14:45:43 by dsyme]
[ghc-hetmet.git] / ghc / lib / std / PrelGHC.ilx.real
1 // The ILX implementation of PrelGHC 
2
3 .module extern ilx 'PrelBase.dll'
4 .classunion extern thunk [.module ilx 'PrelBase.dll']PrelBase_Bool {.alternative 'PrelBase_False' ()
5 .alternative 'PrelBase_True' ()}
6
7 .namespace GHC {
8    .class support {
9       .method public static class [.module ilx 'PrelBase.dll']PrelBase_Bool mkBool (bool b) {
10          ldarg b
11          brtrue true
12          newdata class [.module ilx 'PrelBase.dll']PrelBase_Bool, PrelBase_False()
13          ret
14         true:
15          newdata class [.module ilx 'PrelBase.dll']PrelBase_Bool, PrelBase_True()
16          ret
17       }
18       .method public static int32 IntGcdOp (int32,int32) {
19              ldstr "WARNING: IntGcdOp called (warning! not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
20          ldc.i4 1
21          ret
22       }
23       .method public static value class PrelGHC_Z1H<int32,int32> IntSubCOp(int32 a,int32 b)    {
24               .locals(int32 r, int32 c)
25              ldstr "WARNING: IntSubCOp called (warning! not yet tested properly)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
26               //r=a-b
27               ldarg a ldarg b sub stloc r
28               //c = ((a^r) & (a^b)) >> 31
29               ldloc r ldarg a xor ldarg a ldarg b xor and ldc.i4 31 shr.un stloc c
30               //
31              ldloc r ldloc c newobj void value class PrelGHC_Z1H<int32, int32 >::.ctor(!0,!1)
32              ldstr "a = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldarg a   call void ['mscorlib']System.Console::WriteLine(int32)
33              ldstr "b = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldarg b   call void ['mscorlib']System.Console::WriteLine(int32)
34              ldstr "r = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldloc r   call void ['mscorlib']System.Console::WriteLine(int32)
35              ldstr "c = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldloc c   call void ['mscorlib']System.Console::WriteLine(int32)
36               ret
37        }
38       .method public static value class PrelGHC_Z1H<int32,int32> IntAddCOp(int32 a,int32 b)    {
39               .locals(int32 r, int32 c)
40              ldstr "WARNING: IntAddCOp called (warning! not yet tested properly)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
41               //r=a+b
42               ldarg a ldarg b add stloc r
43               //c = ((a^r) & ~(a^b)) >> 31
44               ldloc r ldarg a xor ldarg a ldarg b xor not and ldc.i4 31 shr.un stloc c
45               //
46              ldloc r ldloc c  newobj void value class PrelGHC_Z1H<int32, int32 >::.ctor(!0,!1)
47              ldstr "a = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldarg a   call void ['mscorlib']System.Console::WriteLine(int32)
48              ldstr "b = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldarg b   call void ['mscorlib']System.Console::WriteLine(int32)
49              ldstr "r = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldloc r   call void ['mscorlib']System.Console::WriteLine(int32)
50              ldstr "c = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldloc c   call void ['mscorlib']System.Console::WriteLine(int32)
51               ret
52        }
53
54       // TODO: check me!!! test me!!!!
55       .method public static value class PrelGHC_Z1H<int32,int32> IntMulCOp(int32 a,int32 b)    {
56               .locals(int64 l, int32 r, int32 c)
57
58              ldstr "WARNING: IntMulCOp called (warning! not yet tested properly)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
59
60               //r=(StgInt64)a * (StgInt64)b
61               ldarg a conv.i8
62               ldarg b conv.i8
63               mul stloc l 
64               //  r = z.i[R]
65               //  c = z.i[C]
66              ldloc l ldc.i8 0x80000000 rem conv.i4 stloc r
67               ldloc l ldc.i8 0x80000000 div conv.i4 stloc c
68
69              ldloc r ldloc c newobj void value class PrelGHC_Z1H<int32, int32 >::.ctor(!0,!1)
70              ldstr "a = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldarg a   call void ['mscorlib']System.Console::WriteLine(int32)
71              ldstr "b = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldarg b   call void ['mscorlib']System.Console::WriteLine(int32)
72              ldstr "r = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldloc r   call void ['mscorlib']System.Console::WriteLine(int32)
73              ldstr "c = "   call void ['mscorlib']System.Console::Write(class ['mscorlib']System.String) ldloc c   call void ['mscorlib']System.Console::WriteLine(int32)
74              ret
75
76        }
77
78       .method public static 
79         // Return type
80         !!0  
81         // Method name
82           'catch'<any,any>( thunk<(func ( /* unit skipped */ ) --> !!0)> f1, thunk<(func (!!1) --> (func ( /* unit skipped */ ) --> !!0))> f2)
83       {
84          .locals(!!0 res, !!1 exn)
85                  //LOG ldstr "LOG: Entering catch..."   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
86         .try {
87            ldarg f1
88            // ldunit
89            callfunc () ( /* unit skipped */ ) --> !!0
90            stloc res
91                  //LOG ldstr "LOG: Leaving catch..."   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
92            leave retA
93         } catch [mscorlib]System.Object { 
94
95           // exception of type !!1 should be on the stack??
96            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)
97           unbox.any !!1
98           stloc exn
99           leave retE
100         }
101
102         retA: 
103              ldloc res
104              ret
105
106         retE: 
107                  ldstr "LOG: CAUGHT! Executing handler..."   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
108           ldarg f2
109           ldloc exn
110           tail. callfunc  () (!!1) --> !!0 
111           ret
112
113       }
114
115
116       .method public static !!0 'unblockAsyncExceptions'<any>( thunk<(func ( /* unit skipped */ ) --> !!0)> f ) 
117         {
118              //ldstr "WARNING: unblockAsyncExceptions called (warning! not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
119              ldarg f
120              // ldunit
121              tail. callfunc () ( /* unit skipped */ ) --> !!0
122              ret
123         }
124
125       .method public static !!0 'blockAsyncExceptions'<any>( thunk<(func ( /* unit skipped */ ) --> !!0)> f ) 
126         {
127              //ldstr "WARNING: blockAsyncExceptions called (warning! not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
128              ldarg f
129              // ldunit
130              tail. callfunc () ( /* unit skipped */ ) --> !!0
131              ret
132         }
133
134
135
136       .method public static !!0 'takeMVar'<any> (class PrelGHC_MVarzh<!!0> mvar)
137        {
138              //ldstr "WARNING: takeMVar called (warning! locking not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
139              ldarg mvar ldfld !0 class PrelGHC_MVarzh<!!0>::contents
140              //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)
141              //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)
142              ret
143       }
144
145
146       .method public static void 'putMVar'<any>(class PrelGHC_MVarzh<!!0> mvar ,!!0 v)
147        {
148              //ldstr "WARNING: putMVar called (warning! locking not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
149                 ldarg mvar ldarg v stfld !0 class PrelGHC_MVarzh<!!0>::contents
150              
151              //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)
152              //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)
153          ret
154        }
155
156       // Enter, if (null(Read)) Wait Exit
157       .method public static value class PrelGHC_Z1H<int32,  !!0> 'tryTakeMVar'<any>(class PrelGHC_MVarzh<!!0> mvar)
158        {
159              ldstr "WARNING: tryTakeMVar called (locking not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
160              ldc.i4 1
161              ldarg mvar ldfld !0 class PrelGHC_MVarzh<!!0>::contents
162              newobj void value class PrelGHC_Z1H<int32,!!0>::.ctor(!0,!1)
163              ret
164        }
165
166
167      // Enter, if (null(Read)) Wait Exit
168       .method public static int32 'tryPutMVar'<any>(class PrelGHC_MVarzh<!!0> mvar, !!0 v)
169        {
170              ldstr "WARNING: tryPutMVar called (locking not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
171              ldc.i4 1
172              ret
173        }
174
175
176
177       .method public static int32 isEmptyMVar<any>(class PrelGHC_MVarzh<!!0> mvar)
178        {
179              ldstr "WARNING: isEmptyMVar called (locking not yet implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
180              ldc.i4 0
181              ret
182        }
183
184
185       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerAddOp(int32, unsigned int8[], int32, unsigned int8[]) {
186              ldstr "WARNING: IntegerAddOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
187              ldc.i4 0 ldnull
188              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
189              ret
190        }
191
192       .method public static int32 IntegerCmpIntOp(int32, unsigned int8[], int32) {
193              ldstr "WARNING: IntegerCmpIntOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
194              ldc.i4 0 
195              ret
196        }
197       .method public static int32 IntegerCmpOp(int32, unsigned int8[], int32, unsigned int8[]) {
198              ldstr "WARNING: IntegerCmpOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
199              ldc.i4 0 
200              ret
201        }
202       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerSubOp(int32, unsigned int8[], int32, unsigned int8[]) {
203              ldstr "WARNING: IntegerSubOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
204              ldc.i4 0 ldnull
205              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
206              ret
207        }
208
209       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerMulOp(int32, unsigned int8[], int32, unsigned int8[]) {
210              ldstr "WARNING: IntegerMulOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
211              ldc.i4 0 ldnull
212              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
213              ret
214        }
215
216       .method public static value class PrelGHC_Z3H<int32, unsigned int8[],int32, unsigned int8[]> IntegerQuotRemOp(int32, unsigned int8[], int32, unsigned int8[]) {
217              ldstr "WARNING: IntegerQuotRemOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
218              ldc.i4 0 ldnull ldc.i4 0 ldnull
219              newobj void value class PrelGHC_Z3H<int32, unsigned int8[],int32, unsigned int8[]>::.ctor(!0,!1,!2,!3)
220              ret
221        }
222
223       .method public static value class PrelGHC_Z3H<int32, unsigned int8[],int32, unsigned int8[]> IntegerDivModOp(int32, unsigned int8[], int32, unsigned int8[]) {
224              ldstr "WARNING: IntegerDivModOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
225              ldc.i4 0 ldnull ldc.i4 0 ldnull
226              newobj void value class PrelGHC_Z3H<int32, unsigned int8[],int32, unsigned int8[]>::.ctor(!0,!1,!2,!3)
227              ret
228        }
229       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerDivExactOp(int32, unsigned int8[], int32, unsigned int8[]) {
230              ldstr "WARNING: IntegerDivExactOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
231              ldc.i4 0 ldnull 
232              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
233              ret
234        }
235       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerQuotOp(int32, unsigned int8[], int32, unsigned int8[]) {
236              ldstr "WARNING: IntegerQuotOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
237              ldc.i4 0 ldnull 
238              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
239              ret
240        }
241       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerAndOp(int32, unsigned int8[], int32, unsigned int8[]) {
242              ldstr "WARNING: IntegerAndOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
243              ldc.i4 0 ldnull
244              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
245              ret
246        }
247
248       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerRemOp(int32, unsigned int8[], int32, unsigned int8[]) {
249              ldstr "WARNING: IntegerRemOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
250              ldc.i4 0 ldnull
251              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
252              ret
253        }
254
255
256        .method public static int32 Integer2IntOp(int32, unsigned int8[]) {
257              ldstr "WARNING: Integer2IntOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
258              ldc.i4 0
259              ret
260        }
261
262        .method public static unsigned int32 Integer2WordOp(int32, unsigned int8[]) {
263              ldstr "WARNING: Integer2WordOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
264              ldc.i4 0
265              ret
266        }
267
268         .method public static int64 IntegerToInt64Op(int32, unsigned int8[]) {
269              ldstr "WARNING: IntegerToInt64Op called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
270              ldc.i8 0
271              ret
272        }
273
274        .method public static unsigned int64 IntegerToWord64Op(int32, unsigned int8[]) {
275              ldstr "WARNING: IntegerToWord64Op called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
276              ldc.i8 0
277              ret
278        }
279
280       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> Int2IntegerOp(int32) {
281              ldstr "WARNING: Integer2IntOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
282              ldc.i4 0 ldnull
283              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
284              ret
285        }
286
287        .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> Word2IntegerOp(unsigned int32) {
288              ldstr "WARNING: Word2IntegerOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
289              ldc.i4 0 ldnull
290              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
291              ret
292        }
293
294         .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> Word64ToIntegerOp(unsigned int64) {
295              ldstr "WARNING: Word64ToIntegerOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
296              ldc.i4 0 ldnull
297              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
298              ret
299        }
300
301         .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> Int64ToIntegerOp(int64) {
302              ldstr "WARNING: Int64ToIntegerOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
303              ldc.i4 0 ldnull
304              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
305              ret
306        }
307
308     .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerOrOp(int32, unsigned int8[], int32, unsigned int8[]) {
309              ldstr "WARNING: IntegerOrOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
310              ldc.i4 0 ldnull
311              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
312              ret
313        }
314
315      .method public static int32 IntegerIntGcdOp(int32, unsigned int8[], int32) {
316              ldstr "WARNING: IntegerOrOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
317              ldc.i4 0 
318              ret
319        }
320       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerXorOp(int32, unsigned int8[], int32, unsigned int8[]) {
321              ldstr "WARNING: IntegerXorOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
322              ldc.i4 0 ldnull
323              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
324              ret
325        }
326
327       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerGcdOp(int32, unsigned int8[], int32, unsigned int8[]) {
328              ldstr "WARNING: IntegerGcdOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
329              ldc.i4 0 ldnull
330              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
331              ret
332        }
333
334       .method public static value class PrelGHC_Z1H<int32, unsigned int8[]> IntegerComplementOp(int32, unsigned int8[]) {
335              ldstr "WARNING: IntegerComplementOp called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
336              ldc.i4 0 ldnull
337              newobj void value class PrelGHC_Z1H<int32, unsigned int8[]>::.ctor(!0,!1)
338              ret
339        }
340
341       .method public static value class PrelGHC_Z2H<int32,int32,  unsigned int8[]> decodeFloat(float32 f) {
342              ldstr "WARNING: decodeFloat called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
343              ldarg f conv.r8 call float64 [mscorlib]System.Math::Abs(float64) call float64 [mscorlib]System.Math::Log(float64) conv.i4 
344              ldc.i4 0 ldnull
345              newobj void value class PrelGHC_Z2H<int32,int32,  unsigned int8[]>::.ctor(!0,!1,!2)
346              ret
347        }
348
349       .method public static value class PrelGHC_Z2H<int32,int32,  unsigned int8[]> decodeDouble(float64 f) {
350              ldstr "WARNING: decodeDouble called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
351              ldarg f  call float64 [mscorlib]System.Math::Abs(float64) call float64 [mscorlib]System.Math::Log(float64) conv.i4 
352              ldc.i4 0 ldnull
353              newobj void value class PrelGHC_Z2H<int32,int32,  unsigned int8[]>::.ctor(!0,!1,!2)
354              ret
355        }
356
357
358       .method public static !!0[] newArray<any>(int32 n, !!0 x)  {
359            .locals(int32 i, !!0[] res)
360            ldarg n
361            newarr !!0
362            stloc res
363            ldc.i4 0
364            stloc i
365 loop:
366            ldarg n
367            ldloc i
368            beq end
369            ldloc res
370            ldloc i
371            ldarg x
372            stelem.any !!0
373            br loop
374 end:
375            ldloc res
376            ret
377        }
378
379
380       .method public static int32 dataToTag<any>(!!0 x)    {
381            ldstr "WARNING: dataToTag called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
382               ldc.i4 0
383               ret
384        }
385       .method public static !!0 tagToEnum<any>(int32)    {
386            ldstr "WARNING: tagToEnum called (not implemented)"   call void ['mscorlib']System.Console::WriteLine(class ['mscorlib']System.String)
387               ldnull
388               ret
389        }
390    }
391 }
392
393 //--------------------------------------------
394 // Builtin classes
395
396 .class public 'PrelGHC_MVarzh'<any> {
397   .field public !0 contents
398   .field public int32 id
399   .field static public int32 ids
400     .method public rtspecialname specialname instance void .ctor() {
401        ldarg 0
402        ldsfld int32 class PrelGHC_MVarzh::ids
403        ldc.i4 1
404        add
405        dup
406         stsfld int32 class PrelGHC_MVarzh::ids
407        stfld int32 class PrelGHC_MVarzh<!0>::id
408
409        ret 
410     }
411 }
412
413 .class public 'PrelGHC_StablePtrzh' /* <any> */ {
414   .field public class [mscorlib]System.Object contents
415     .method public rtspecialname specialname instance void .ctor(class [mscorlib]System.Object) {
416        ldarg 0 ldarg 1 stfld class [mscorlib]System.Object class PrelGHC_StablePtrzh::contents
417        ret 
418     }
419 }
420
421 .class public 'PrelGHC_StableNamezh' /* <any> */ {
422     .method public rtspecialname specialname instance void .ctor() {
423        ret 
424     }
425 }
426
427 .class public 'PrelGHC_Foreignzh' {
428   .field public void * contents
429     .method public rtspecialname specialname instance void .ctor(void *) {
430        ldarg 0 ldarg 1 stfld void * class PrelGHC_Foreignzh::contents
431        ret 
432     }
433 }
434
435 // TODO
436 .class public 'PrelGHC_Weakzh'<any> {
437   .field public !0 contents
438    .field public thunk<(func ( /* unit skipped */ ) --> class [.module ilx 'PrelBase.dll']PrelBase_Z0T)> _finalizer
439    .method public rtspecialname specialname instance void .ctor(!0 x, thunk<(func ( /* unit skipped */ ) --> class [.module ilx 'PrelBase.dll']PrelBase_Z0T)> f) {
440        ldarg 0 ldarg x stfld !0 class PrelGHC_Weakzh<!0>::contents
441        ldarg 0 ldarg f stfld thunk<(func ( /* unit skipped */ ) --> class [.module ilx 'PrelBase.dll']PrelBase_Z0T)> class PrelGHC_Weakzh<!0>::_finalizer
442        ret 
443     }
444    .method public static  value class PrelGHC_Z1H<int32,thunk<(func ( /* unit skipped */ ) --> class [.module ilx 'PrelBase.dll']PrelBase_Z0T)>> finalizer<any>(class PrelGHC_Weakzh<!!0>) { 
445        ldc.i4 1
446        ldarg 0 ldfld thunk<(func ( /* unit skipped */ ) --> class [.module ilx 'PrelBase.dll']PrelBase_Z0T)> class PrelGHC_Weakzh<!!0>::_finalizer
447          newobj void value class PrelGHC_Z1H<int32,thunk<(func ( /* unit skipped */ ) --> class [.module ilx 'PrelBase.dll']PrelBase_Z0T)>>::.ctor(!0,!1)
448        ret
449    }
450    .method public static value class PrelGHC_Z1H<int32,!!0> deref<any>(class PrelGHC_Weakzh<!!0>) { 
451        ldc.i4 1
452        ldarg 0 ldfld !0 class PrelGHC_Weakzh<!!0>::contents
453        newobj void  value class PrelGHC_Z1H<int32,!!0>::.ctor(!0,!1)
454        ret
455    }
456    .method public  static  class PrelGHC_Weakzh<!!1> bake<any,any,any>(!!0,!!1 object,!!2 finalizer) {
457          ldarg object 
458          // TODO: work out how to get finalizer correctly...  why is it a type variable anyway? 
459          // The unbox below doesn't work in all circumstances because of known problems with 
460          // the runtime types ascribed to funtion types (see RAID bug)
461          ldnull // ldarg finalizer unbox.any (func ( /* unit skipped */ ) --> class [.module ilx 'PrelBase.dll']PrelBase_Z0T)
462          newobj void class 'PrelGHC_Weakzh'<!!1>::.ctor(!0 x, (func ( /* unit skipped */ ) --> class [.module ilx 'PrelBase.dll']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     .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_Z0H' <any>  extends ['mscorlib']System.ValueType { 
494     .method public rtspecialname specialname instance void .ctor(!0) {
495        ldarg 0 ldarg 1 stfld !0 class PrelGHC_Z0H<!0>::fld0
496        ret 
497     }
498    .field public !0 fld0
499 }
500
501 .class value sealed 'PrelGHC_Z1H' <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_Z1H<!0,!1>::fld0
504        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z1H<!0,!1>::fld1
505        ret 
506     }
507    .field public !0 fld0
508    .field public !1 fld1
509 }
510
511 .class value sealed 'PrelGHC_Z2H' <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_Z2H<!0,!1,!2>::fld0
514        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z2H<!0,!1,!2>::fld1
515        ldarg 0 ldarg 3 stfld !2 class PrelGHC_Z2H<!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_Z3H' <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_Z3H<!0,!1,!2,!3>::fld0
526        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z3H<!0,!1,!2,!3>::fld1
527        ldarg 0 ldarg 3 stfld !2 class PrelGHC_Z3H<!0,!1,!2,!3>::fld2
528        ldarg 0 ldarg 4 stfld !3 class PrelGHC_Z3H<!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_Z4H' <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_Z4H<!0,!1,!2,!3,!4>::fld0
540        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z4H<!0,!1,!2,!3,!4>::fld1
541        ldarg 0 ldarg 3 stfld !2 class PrelGHC_Z4H<!0,!1,!2,!3,!4>::fld2
542        ldarg 0 ldarg 4 stfld !3 class PrelGHC_Z4H<!0,!1,!2,!3,!4>::fld3
543        ldarg 0 ldarg 5 stfld !4 class PrelGHC_Z4H<!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_Z5H' <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_Z5H<!0,!1,!2,!3,!4,!5>::fld0
556        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z5H<!0,!1,!2,!3,!4,!5>::fld1
557        ldarg 0 ldarg 3 stfld !2 class PrelGHC_Z5H<!0,!1,!2,!3,!4,!5>::fld2
558        ldarg 0 ldarg 4 stfld !3 class PrelGHC_Z5H<!0,!1,!2,!3,!4,!5>::fld3
559        ldarg 0 ldarg 5 stfld !4 class PrelGHC_Z5H<!0,!1,!2,!3,!4,!5>::fld4
560        ldarg 0 ldarg 6 stfld !5 class PrelGHC_Z5H<!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_Z6H' <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_Z6H<!0,!1,!2,!3,!4,!5,!6>::fld0
574        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z6H<!0,!1,!2,!3,!4,!5,!6>::fld1
575        ldarg 0 ldarg 3 stfld !2 class PrelGHC_Z6H<!0,!1,!2,!3,!4,!5,!6>::fld2
576        ldarg 0 ldarg 4 stfld !3 class PrelGHC_Z6H<!0,!1,!2,!3,!4,!5,!6>::fld3
577        ldarg 0 ldarg 5 stfld !4 class PrelGHC_Z6H<!0,!1,!2,!3,!4,!5,!6>::fld4
578        ldarg 0 ldarg 6 stfld !5 class PrelGHC_Z6H<!0,!1,!2,!3,!4,!5,!6>::fld5
579        ldarg 0 ldarg 7 stfld !6 class PrelGHC_Z6H<!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_Z7H' <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_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld0
594        ldarg 0 ldarg 2 stfld !1 class PrelGHC_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld1
595        ldarg 0 ldarg 3 stfld !2 class PrelGHC_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld2
596        ldarg 0 ldarg 4 stfld !3 class PrelGHC_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld3
597        ldarg 0 ldarg 5 stfld !4 class PrelGHC_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld4
598        ldarg 0 ldarg 6 stfld !5 class PrelGHC_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld5
599        ldarg 0 ldarg 7 stfld !6 class PrelGHC_Z7H<!0,!1,!2,!3,!4,!5,!6,!7>::fld6
600        ldarg 0 ldarg 8 stfld !7 class PrelGHC_Z7H<!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 thunk '()'  { 
660    .alternative '()'()
661 }
662