summaryrefslogtreecommitdiff
path: root/compiler/main
diff options
context:
space:
mode:
authorManuel M T Chakravarty <chak@cse.unsw.edu.au>2007-05-22 09:27:29 +0000
committerManuel M T Chakravarty <chak@cse.unsw.edu.au>2007-05-22 09:27:29 +0000
commit686d87447e2186e2aa55e1a925f0a3a8e94872f5 (patch)
tree9234993c94c0a89bebdff0e44976d35e34c16049 /compiler/main
parent067d1b6c33cd8dd20f59551a8582899ba11c4831 (diff)
downloadhaskell-686d87447e2186e2aa55e1a925f0a3a8e94872f5.tar.gz
Add data type information to VectInfo
Diffstat (limited to 'compiler/main')
-rw-r--r--compiler/main/HscTypes.lhs32
1 files changed, 23 insertions, 9 deletions
diff --git a/compiler/main/HscTypes.lhs b/compiler/main/HscTypes.lhs
index 956d10d30b..fb8e87edb2 100644
--- a/compiler/main/HscTypes.lhs
+++ b/compiler/main/HscTypes.lhs
@@ -1255,28 +1255,42 @@ on just the OccName easily in a Core pass.
-- ModGuts/ModDetails/EPS version
data VectInfo
= VectInfo {
- vectInfoCCVar :: VarEnv (Var, Var) -- (f, f_CC) keyed on f
- -- always tidy, even in ModGuts
+ vectInfoCCVar :: VarEnv (Var , Var ), -- (f, f_CC) keyed on f
+ vectInfoCCTyCon :: NameEnv (TyCon , TyCon), -- (T, T_CC) keyed on T
+ vectInfoCCDataCon :: NameEnv (DataCon, DataCon), -- (C, C_CC) keyed on C
+ vectInfoCCIso :: NameEnv (TyCon , Var) -- (T, isoT) keyed on T
}
+ -- all of this is always tidy, even in ModGuts
-- ModIface version
data IfaceVectInfo
= IfaceVectInfo {
- ifaceVectInfoCCVar :: [Name] -- all variables in here have
- -- a closure-converted variant
- -- the name of the CC'ed variant
- -- is determined by `mkCloOcc'
+ ifaceVectInfoCCVar :: [Name],
+ -- all variables in here have a closure-converted variant;
+ -- the name of the CC'ed variant is determined by `mkCloOcc'
+ ifaceVectInfoCCTyCon :: [Name],
+ -- all tycons in here have a closure-converted variant;
+ -- the name of the CC'ed variant and those of its data constructors are
+ -- determined by `mkCloTyConOcc' and `mkCloDataConOcc'; the names of
+ -- the isomorphisms is determined by `mkCloIsoOcc'
+ ifaceVectInfoCCTyConReuse :: [Name]
+ -- the closure-converted form of all the tycons in here coincids with
+ -- the unconverted from; the names of the isomorphisms is determined
+ -- by `mkCloIsoOcc'
}
noVectInfo :: VectInfo
-noVectInfo = VectInfo emptyVarEnv
+noVectInfo = VectInfo emptyVarEnv emptyNameEnv emptyNameEnv emptyNameEnv
plusVectInfo :: VectInfo -> VectInfo -> VectInfo
plusVectInfo vi1 vi2 =
- VectInfo (vectInfoCCVar vi1 `plusVarEnv` vectInfoCCVar vi2)
+ VectInfo (vectInfoCCVar vi1 `plusVarEnv` vectInfoCCVar vi2)
+ (vectInfoCCTyCon vi1 `plusNameEnv` vectInfoCCTyCon vi2)
+ (vectInfoCCDataCon vi1 `plusNameEnv` vectInfoCCDataCon vi2)
+ (vectInfoCCIso vi1 `plusNameEnv` vectInfoCCIso vi2)
noIfaceVectInfo :: IfaceVectInfo
-noIfaceVectInfo = IfaceVectInfo []
+noIfaceVectInfo = IfaceVectInfo [] [] []
\end{code}
%************************************************************************