X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Fghci%2FByteCodeGen.lhs;h=99e896c024fca4bfa7917578ae20826a1860a4da;hb=82be37a44c572d2e6df6b7da09ea4e059c3f3133;hp=ad94e0cbe3c55a2d87c21d7547e0c0596aee0434;hpb=e7ab9c680f945aa020fb0f685fc9d2ec29553558;p=ghc-hetmet.git diff --git a/compiler/ghci/ByteCodeGen.lhs b/compiler/ghci/ByteCodeGen.lhs index ad94e0c..99e896c 100644 --- a/compiler/ghci/ByteCodeGen.lhs +++ b/compiler/ghci/ByteCodeGen.lhs @@ -1028,6 +1028,20 @@ generateCCall d0 s p (CCallSpec target cconv _) fn args_r_to_l = case target of DynamicTarget -> return (False, panic "ByteCodeGen.generateCCall(dyn)") + + PackageTarget target _ + -> do res <- ioToBc (lookupStaticPtr stdcall_adj_target) + return (True, res) + where + stdcall_adj_target +#ifdef mingw32_TARGET_OS + | StdCallConv <- cconv + = let size = fromIntegral a_reps_sizeW * wORD_SIZE in + mkFastString (unpackFS target ++ '@':show size) +#endif + | otherwise + = target + StaticTarget target -> do res <- ioToBc (lookupStaticPtr stdcall_adj_target) return (True, res)