From 2d07102b55e4da88ffc001735892f518d57b9e23 Mon Sep 17 00:00:00 2001 From: rrt Date: Mon, 1 Oct 2001 13:45:43 +0000 Subject: [PATCH] [project @ 2001-10-01 13:45:43 by rrt] PrelGHC.dll -> PrelGHC.i_o, and a few other corrections to follow changes to ILX. --- ghc/lib/std/PrelGHC.ilx.real | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/ghc/lib/std/PrelGHC.ilx.real b/ghc/lib/std/PrelGHC.ilx.real index d2f0e25..8e6e932 100644 --- a/ghc/lib/std/PrelGHC.ilx.real +++ b/ghc/lib/std/PrelGHC.ilx.real @@ -1,19 +1,19 @@ // The ILX implementation of PrelGHC -.module extern 'PrelBase.dll' -.classunion import [.module 'PrelBase.dll']PrelBase_Bool {.alternative 'PrelBase_False' () +.module extern 'PrelBase.i_o' +.classunion import [.module 'PrelBase.i_o']PrelBase_Bool {.alternative 'PrelBase_False' () .alternative 'PrelBase_True' ()} .assembly extern 'mscorlib' { } .namespace GHC { .class support { - .method public static class [.module 'PrelBase.dll']PrelBase_Bool mkBool (bool b) { + .method public static class [.module 'PrelBase.i_o']PrelBase_Bool mkBool (bool b) { ldarg b brtrue Ltrue - newdata class [.module 'PrelBase.dll']PrelBase_Bool, PrelBase_False() + newdata class [.module 'PrelBase.i_o']PrelBase_Bool, PrelBase_False() ret Ltrue: - newdata class [.module 'PrelBase.dll']PrelBase_Bool, PrelBase_True() + newdata class [.module 'PrelBase.i_o']PrelBase_Bool, PrelBase_True() ret } .method public static int32 IntGcdOp (int32,int32) { @@ -436,16 +436,16 @@ end: // TODO .class public 'PrelGHC_Weakzh' { .field public !0 contents - .field public thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.dll']PrelBase_Z0T)> _finalizer - .method public rtspecialname specialname instance void .ctor(!0 x, thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.dll']PrelBase_Z0T)> f) { + .field public thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.i_o']PrelBase_Z0T)> _finalizer + .method public rtspecialname specialname instance void .ctor(!0 x, thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.i_o']PrelBase_Z0T)> f) { ldarg 0 ldarg x stfld !0 class PrelGHC_Weakzh::contents - ldarg 0 ldarg f stfld thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.dll']PrelBase_Z0T)> class PrelGHC_Weakzh::_finalizer + ldarg 0 ldarg f stfld thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.i_o']PrelBase_Z0T)> class PrelGHC_Weakzh::_finalizer ret } - .method public static value class PrelGHC_Z1H class [.module 'PrelBase.dll']PrelBase_Z0T)>> finalizer(class PrelGHC_Weakzh) { + .method public static value class PrelGHC_Z1H class [.module 'PrelBase.i_o']PrelBase_Z0T)>> finalizer(class PrelGHC_Weakzh) { ldc.i4 1 - ldarg 0 ldfld thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.dll']PrelBase_Z0T)> class PrelGHC_Weakzh::_finalizer - newobj void value class PrelGHC_Z1H class [.module 'PrelBase.dll']PrelBase_Z0T)>>::.ctor(!0,!1) + ldarg 0 ldfld thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.i_o']PrelBase_Z0T)> class PrelGHC_Weakzh::_finalizer + newobj void value class PrelGHC_Z1H class [.module 'PrelBase.i_o']PrelBase_Z0T)>>::.ctor(!0,!1) ret } .method public static value class PrelGHC_Z1H deref(class PrelGHC_Weakzh) { @@ -454,13 +454,12 @@ end: newobj void value class PrelGHC_Z1H::.ctor(!0,!1) ret } - .method public static class PrelGHC_Weakzh bake(!!0,!!1 obj,!!2 finalizer) { + .method public static + class PrelGHC_Weakzh + bake(!!0,!!1 obj,thunk<(func () -> class [.module 'PrelBase.i_o']PrelBase_Z0T)> finalizer) { ldarg obj - // TODO: work out how to get finalizer correctly... why is it a type variable anyway? - // The unbox below doesn't work in all circumstances because of known problems with - // the runtime types ascribed to funtion types (see RAID bug) - ldnull // ldarg finalizer unbox.any (func ( /* unit skipped */ ) --> class [.module 'PrelBase.dll']PrelBase_Z0T) - newobj void class 'PrelGHC_Weakzh'::.ctor(!0 x, (func ( /* unit skipped */ ) --> class [.module 'PrelBase.dll']PrelBase_Z0T)) + ldarg finalizer + newobj void class 'PrelGHC_Weakzh'::.ctor(!0 x, thunk<(func ( /* unit skipped */ ) --> class [.module 'PrelBase.i_o']PrelBase_Z0T)>) ret } -- 1.7.10.4