X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FstgSyn%2FStgSyn.lhs;h=f1c50cc8fd017d2a8e67dc56e4fafdaa99b36af1;hb=30ee6ff795f017c433f27b37f290b29374545cec;hp=9c1c5466c2a48bd789e4e6dddbe1c5dc3592edd1;hpb=ef5b4b146aa172d8ac10f39b5eb3d7a0f948d8f1;p=ghc-hetmet.git diff --git a/ghc/compiler/stgSyn/StgSyn.lhs b/ghc/compiler/stgSyn/StgSyn.lhs index 9c1c546..f1c50cc 100644 --- a/ghc/compiler/stgSyn/StgSyn.lhs +++ b/ghc/compiler/stgSyn/StgSyn.lhs @@ -65,7 +65,9 @@ import TyCon ( TyCon ) import UniqSet ( isEmptyUniqSet, uniqSetToList, UniqSet ) import Unique ( Unique ) import Bitmap -import CmdLineOpts ( DynFlags, opt_SccProfilingOn ) +import DynFlags ( DynFlags ) +import Packages ( HomeModules ) +import StaticFlags ( opt_SccProfilingOn ) \end{code} %************************************************************************ @@ -104,18 +106,18 @@ data GenStgArg occ isStgTypeArg (StgTypeArg _) = True isStgTypeArg other = False -isDllArg :: DynFlags -> StgArg -> Bool +isDllArg :: HomeModules -> StgArg -> Bool -- Does this argument refer to something in a different DLL? -isDllArg dflags (StgTypeArg v) = False -isDllArg dflags (StgVarArg v) = isDllName dflags (idName v) -isDllArg dflags (StgLitArg lit) = False +isDllArg hmods (StgTypeArg v) = False +isDllArg hmods (StgVarArg v) = isDllName hmods (idName v) +isDllArg hmods (StgLitArg lit) = False -isDllConApp :: DynFlags -> DataCon -> [StgArg] -> Bool +isDllConApp :: HomeModules -> DataCon -> [StgArg] -> Bool -- Does this constructor application refer to -- anything in a different DLL? -- If so, we can't allocate it statically -isDllConApp dflags con args - = isDllName dflags (dataConName con) || any (isDllArg dflags) args +isDllConApp hmods con args + = isDllName hmods (dataConName con) || any (isDllArg hmods) args stgArgType :: StgArg -> Type -- Very half baked becase we have lost the type arguments @@ -325,12 +327,12 @@ And so the code for let(rec)-things: | StgLetNoEscape -- remember: ``advanced stuff'' (GenStgLiveVars occ) -- Live in the whole let-expression -- Mustn't overwrite these stack slots - -- *Doesn't* include binders of the let(rec). + -- *Doesn't* include binders of the let(rec). (GenStgLiveVars occ) -- Live in the right hand sides (only) -- These are the ones which must be saved on -- the stack if they aren't there already - -- *Does* include binders of the let(rec) if recursive. + -- *Does* include binders of the let(rec) if recursive. (GenStgBinding bndr occ) -- right hand sides (see below) (GenStgExpr bndr occ) -- body