projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add $$($1_$2_$3_ALL_HC_OPTS) when linking dynamic libraries. Not
[ghc-hetmet.git]
/
compiler
/
stgSyn
/
StgSyn.lhs
diff --git
a/compiler/stgSyn/StgSyn.lhs
b/compiler/stgSyn/StgSyn.lhs
index
78f7447
..
3bce281
100644
(file)
--- a/
compiler/stgSyn/StgSyn.lhs
+++ b/
compiler/stgSyn/StgSyn.lhs
@@
-48,16
+48,14
@@
module StgSyn (
import CostCentre ( CostCentreStack, CostCentre )
import VarSet ( IdSet, isEmptyVarSet )
import CostCentre ( CostCentreStack, CostCentre )
import VarSet ( IdSet, isEmptyVarSet )
-import Var ( isId )
-import Id ( Id, idName, idType, idCafInfo )
+import Id
+import DataCon
import IdInfo ( mayHaveCafRefs )
import IdInfo ( mayHaveCafRefs )
-import Packages ( isDllName )
import Literal ( Literal, literalType )
import ForeignCall ( ForeignCall )
import Literal ( Literal, literalType )
import ForeignCall ( ForeignCall )
-import DataCon ( DataCon, dataConName )
import CoreSyn ( AltCon )
import PprCore ( {- instances -} )
import CoreSyn ( AltCon )
import PprCore ( {- instances -} )
-import PrimOp ( PrimOp )
+import PrimOp ( PrimOp, PrimCall )
import Outputable
import Type ( Type )
import TyCon ( TyCon )
import Outputable
import Type ( Type )
import TyCon ( TyCon )
@@
-67,6
+65,11
@@
import Bitmap
import StaticFlags ( opt_SccProfilingOn )
import Module
import FastString
import StaticFlags ( opt_SccProfilingOn )
import Module
import FastString
+
+#if mingw32_TARGET_OS
+import Packages ( isDllName )
+
+#endif
\end{code}
%************************************************************************
\end{code}
%************************************************************************
@@
-106,17
+109,20
@@
isStgTypeArg :: StgArg -> Bool
isStgTypeArg (StgTypeArg _) = True
isStgTypeArg _ = False
isStgTypeArg (StgTypeArg _) = True
isStgTypeArg _ = False
-isDllArg :: PackageId -> StgArg -> Bool
- -- Does this argument refer to something in a different DLL?
-isDllArg this_pkg (StgVarArg v) = isDllName this_pkg (idName v)
-isDllArg _ _ = False
-
isDllConApp :: PackageId -> DataCon -> [StgArg] -> Bool
isDllConApp :: PackageId -> 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 *Windows* DLL?
+-- If so, we can't allocate it statically
+#if mingw32_TARGET_OS
isDllConApp this_pkg con args
isDllConApp this_pkg con args
- = isDllName this_pkg (dataConName con) || any (isDllArg this_pkg) args
+ = isDllName this_pkg (dataConName con) || any is_dll_arg args
+ where
+ is_dll_arg ::StgArg -> Bool
+ is_dll_arg (StgVarArg v) = isDllName this_pkg (idName v)
+ is_dll_arg _ = False
+#else
+isDllConApp _ _ _ = False
+#endif
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
@@
-558,6
+564,8
@@
in StgOpApp and COpStmt.
\begin{code}
data StgOp = StgPrimOp PrimOp
\begin{code}
data StgOp = StgPrimOp PrimOp
+ | StgPrimCallOp PrimCall
+
| StgFCallOp ForeignCall Unique
-- The Unique is occasionally needed by the C pretty-printer
-- (which lacks a unique supply), notably when generating a
| StgFCallOp ForeignCall Unique
-- The Unique is occasionally needed by the C pretty-printer
-- (which lacks a unique supply), notably when generating a
@@
-766,6
+774,7
@@
pprStgAlt (con, params, _use_mask, expr)
pprStgOp :: StgOp -> SDoc
pprStgOp (StgPrimOp op) = ppr op
pprStgOp :: StgOp -> SDoc
pprStgOp (StgPrimOp op) = ppr op
+pprStgOp (StgPrimCallOp op)= ppr op
pprStgOp (StgFCallOp op _) = ppr op
instance Outputable AltType where
pprStgOp (StgFCallOp op _) = ppr op
instance Outputable AltType where