summaryrefslogtreecommitdiff
path: root/compiler/ghci/ByteCodeGen.lhs
diff options
context:
space:
mode:
authorBen.Lippmeier@anu.edu.au <unknown>2010-01-02 09:30:46 +0000
committerBen.Lippmeier@anu.edu.au <unknown>2010-01-02 09:30:46 +0000
commit82be37a44c572d2e6df6b7da09ea4e059c3f3133 (patch)
tree7d3d04080a70680ca1237183c9dd30a74e8e9d14 /compiler/ghci/ByteCodeGen.lhs
parente7ab9c680f945aa020fb0f685fc9d2ec29553558 (diff)
downloadhaskell-82be37a44c572d2e6df6b7da09ea4e059c3f3133.tar.gz
Follow PackageTarget change in byte code generator
Diffstat (limited to 'compiler/ghci/ByteCodeGen.lhs')
-rw-r--r--compiler/ghci/ByteCodeGen.lhs14
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler/ghci/ByteCodeGen.lhs b/compiler/ghci/ByteCodeGen.lhs
index ad94e0cbe3..99e896c024 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)