X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FdeSugar%2FDsCCall.lhs;fp=ghc%2Fcompiler%2FdeSugar%2FDsCCall.lhs;h=71f3324adfcfe9c55265739ba1aa6fd8c8f44a70;hb=2129fa6fc4afd7f7b0c767f8c0c14b9ab5508ec2;hp=f2fdc288f597efc7e1cfa859817207b4ece4caf0;hpb=ce42f19f8c840fbe89844471a0d850d310a94556;p=ghc-hetmet.git diff --git a/ghc/compiler/deSugar/DsCCall.lhs b/ghc/compiler/deSugar/DsCCall.lhs index f2fdc28..71f3324 100644 --- a/ghc/compiler/deSugar/DsCCall.lhs +++ b/ghc/compiler/deSugar/DsCCall.lhs @@ -1,7 +1,7 @@ % % (c) The AQUA Project, Glasgow University, 1994-1998 % -\section[DsCCall]{Desugaring \tr{_ccall_}s and \tr{_casm_}s} +\section[DsCCall]{Desugaring C calls} \begin{code} module DsCCall @@ -103,17 +103,15 @@ follows: dsCCall :: CLabelString -- C routine to invoke -> [CoreExpr] -- Arguments (desugared) -> Safety -- Safety of the call - -> Bool -- True <=> really a "_casm_" -> Type -- Type of the result: IO t -> DsM CoreExpr -dsCCall lbl args may_gc is_asm result_ty +dsCCall lbl args may_gc result_ty = mapAndUnzipDs unboxArg args `thenDs` \ (unboxed_args, arg_wrappers) -> boxResult [] id Nothing result_ty `thenDs` \ (ccall_result_ty, res_wrapper) -> getUniqueDs `thenDs` \ uniq -> let - target | is_asm = CasmTarget lbl - | otherwise = StaticTarget lbl + target = StaticTarget lbl the_fcall = CCall (CCallSpec target CCallConv may_gc) the_prim_app = mkFCall uniq the_fcall unboxed_args ccall_result_ty in