X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FdeSugar%2FDsForeign.lhs;h=269274ce5a3c62fea9fb0c315f827ad7b8f21d74;hb=423d477bfecd490de1449c59325c8776f91d7aac;hp=05dcb05221ee9649f71a56e643fb188c79b378f0;hpb=553e90d9a32ee1b1809430f260c401cc4169c6c7;p=ghc-hetmet.git diff --git a/ghc/compiler/deSugar/DsForeign.lhs b/ghc/compiler/deSugar/DsForeign.lhs index 05dcb05..269274c 100644 --- a/ghc/compiler/deSugar/DsForeign.lhs +++ b/ghc/compiler/deSugar/DsForeign.lhs @@ -18,6 +18,8 @@ import DsMonad import HsSyn ( ForeignDecl(..), ForeignExport(..), LForeignDecl, ForeignImport(..), CImportSpec(..) ) +import MachOp ( machRepByteWidth ) +import SMRep ( argMachRep, primRepToCgRep ) import CoreUtils ( exprType, mkInlineMe ) import Id ( Id, idType, idName, mkSysLocal, setInlinePragma ) import Literal ( Literal(..) ) @@ -34,14 +36,12 @@ import BasicTypes ( Boxity(..) ) import HscTypes ( ForeignStubs(..) ) import ForeignCall ( ForeignCall(..), CCallSpec(..), Safety(..), playSafe, - CExportSpec(..), + CExportSpec(..), CLabelString, CCallConv(..), ccallConvToInt, ccallConvAttribute ) -import CStrings ( CLabelString ) import TysWiredIn ( unitTy, tupleTyCon ) import TysPrim ( addrPrimTy, mkStablePtrPrimTy, alphaTy ) -import PrimRep ( getPrimRepSizeInBytes ) import PrelNames ( hasKey, ioTyConKey, stablePtrTyConName, newStablePtrName, bindIOName, checkDotnetResName ) import BasicTypes ( Activation( NeverActive ) ) @@ -389,7 +389,7 @@ dsFExportDynamic id cconv -- (probably in the RTS.) adjustor = FSLIT("createAdjustor") - sz_args = sum (map (getPrimRepSizeInBytes . typePrimRep) stub_args) + sz_args = sum (map (machRepByteWidth.argMachRep.primRepToCgRep.typePrimRep) stub_args) mb_sz_args = case cconv of StdCallConv -> Just sz_args _ -> Nothing