projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2005-03-31 10:16:33 by simonmar]
[ghc-hetmet.git]
/
ghc
/
compiler
/
stgSyn
/
StgSyn.lhs
diff --git
a/ghc/compiler/stgSyn/StgSyn.lhs
b/ghc/compiler/stgSyn/StgSyn.lhs
index
a6f1868
..
75f6a94
100644
(file)
--- a/
ghc/compiler/stgSyn/StgSyn.lhs
+++ b/
ghc/compiler/stgSyn/StgSyn.lhs
@@
-51,7
+51,7
@@
import VarSet ( IdSet, isEmptyVarSet )
import Var ( isId )
import Id ( Id, idName, idType, idCafInfo )
import IdInfo ( mayHaveCafRefs )
import Var ( isId )
import Id ( Id, idName, idType, idCafInfo )
import IdInfo ( mayHaveCafRefs )
-import Name ( isDllName )
+import Packages ( isDllName )
import Literal ( Literal, literalType )
import ForeignCall ( ForeignCall )
import DataCon ( DataCon, dataConName )
import Literal ( Literal, literalType )
import ForeignCall ( ForeignCall )
import DataCon ( DataCon, dataConName )
@@
-65,7
+65,8
@@
import TyCon ( TyCon )
import UniqSet ( isEmptyUniqSet, uniqSetToList, UniqSet )
import Unique ( Unique )
import Bitmap
import UniqSet ( isEmptyUniqSet, uniqSetToList, UniqSet )
import Unique ( Unique )
import Bitmap
-import CmdLineOpts ( opt_SccProfilingOn )
+import DynFlags ( DynFlags )
+import StaticFlags ( opt_SccProfilingOn )
\end{code}
%************************************************************************
\end{code}
%************************************************************************
@@
-104,17
+105,18
@@
data GenStgArg occ
isStgTypeArg (StgTypeArg _) = True
isStgTypeArg other = False
isStgTypeArg (StgTypeArg _) = True
isStgTypeArg other = False
-isDllArg :: StgArg -> Bool
+isDllArg :: DynFlags -> StgArg -> Bool
-- Does this argument refer to something in a different DLL?
-- Does this argument refer to something in a different DLL?
-isDllArg (StgTypeArg v) = False
-isDllArg (StgVarArg v) = isDllName (idName v)
-isDllArg (StgLitArg lit) = False
+isDllArg dflags (StgTypeArg v) = False
+isDllArg dflags (StgVarArg v) = isDllName dflags (idName v)
+isDllArg dflags (StgLitArg lit) = False
-isDllConApp :: DataCon -> [StgArg] -> Bool
+isDllConApp :: DynFlags -> DataCon -> [StgArg] -> Bool
-- Does this constructor application refer to
-- anything in a different DLL?
-- If so, we can't allocate it statically
-- Does this constructor application refer to
-- anything in a different DLL?
-- If so, we can't allocate it statically
-isDllConApp con args = isDllName (dataConName con) || any isDllArg args
+isDllConApp dflags con args
+ = isDllName dflags (dataConName con) || any (isDllArg dflags) args
stgArgType :: StgArg -> Type
-- Very half baked becase we have lost the type arguments
stgArgType :: StgArg -> Type
-- Very half baked becase we have lost the type arguments
@@
-324,12
+326,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
| 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
(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
(GenStgBinding bndr occ) -- right hand sides (see below)
(GenStgExpr bndr occ) -- body