X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FByteCodeGen.lhs;h=007f3eb155bcb35a4eb0fe3e66866c6cfa1efdba;hb=e0fcf61dca4dfac99cb5417e1bc4cbee18822cf2;hp=2e0079e6a8b77655af5ceb07566a3c076d47fde1;hpb=937eb1f1386f12c729c6d819417fe81bc4786b9f;p=ghc-hetmet.git diff --git a/compiler/ghci/ByteCodeGen.lhs b/compiler/ghci/ByteCodeGen.lhs index 2e0079e..007f3eb 100644 --- a/compiler/ghci/ByteCodeGen.lhs +++ b/compiler/ghci/ByteCodeGen.lhs @@ -21,9 +21,7 @@ import ByteCodeItbls import ByteCodeAsm import ByteCodeLink import ByteCodeFFI -#ifdef USE_LIBFFI import LibFFI -#endif import Outputable import Name @@ -1063,19 +1061,11 @@ generateCCall d0 s p ccall_spec@(CCallSpec target cconv safety) fn args_r_to_l stk_offset = d_after_r - s -- in -#if !defined(USE_LIBFFI) - -- In the native case, we build marshalling code and attach the - -- address of that to the CCALL instruction - addr_of_marshaller <- ioToBc (mkMarshalCode cconv - (r_offW, r_rep) addr_offW - (zip args_offW a_reps)) -#else -- the only difference in libffi mode is that we prepare a cif -- describing the call type by calling libffi, and we attach the -- address of this to the CCALL instruction. token <- ioToBc $ prepForeignCall cconv a_reps r_rep let addr_of_marshaller = castPtrToFunPtr token -#endif recordItblMallocBc (ItblPtr (castFunPtrToPtr addr_of_marshaller)) let