summaryrefslogtreecommitdiff
path: root/compiler/codeGen/CgHeapery.lhs
diff options
context:
space:
mode:
authorClemens Fruhwirth <clemens@endorphin.org>2007-07-31 09:59:53 +0000
committerClemens Fruhwirth <clemens@endorphin.org>2007-07-31 09:59:53 +0000
commit81b2276ff9434d97aff683218c34c86479a8d868 (patch)
treeaf25ac884da373745d889fc415ef9c7881bff4b3 /compiler/codeGen/CgHeapery.lhs
parent7cf591f6971ba96d01ec4afc453fa4ac498d759a (diff)
downloadhaskell-81b2276ff9434d97aff683218c34c86479a8d868.tar.gz
Change the strategy to determine dynamic data access
Instead of attaching the information whether a Label is going to be accessed dynamically or not (distinction between IdLabel/DynLabel and additional flags in ModuleInitLabel and PlainModuleInitLabel), we hand dflags through the CmmOpt monad and the NatM monad. Before calling labelDynamic in PositionIndependentCode, we extract thisPackage from dflags and supply the current package to labelDynamic, so it can take this information into account instead of extracting it from the labels itself. This simplifies a lot of code in codeGen that just hands through this_pkg.
Diffstat (limited to 'compiler/codeGen/CgHeapery.lhs')
-rw-r--r--compiler/codeGen/CgHeapery.lhs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/codeGen/CgHeapery.lhs b/compiler/codeGen/CgHeapery.lhs
index b89452e1de..dfa49ebb47 100644
--- a/compiler/codeGen/CgHeapery.lhs
+++ b/compiler/codeGen/CgHeapery.lhs
@@ -114,8 +114,7 @@ getHpRelOffset virtual_offset
\begin{code}
layOutDynConstr, layOutStaticConstr
- :: PackageId
- -> DataCon
+ :: DataCon
-> [(CgRep,a)]
-> (ClosureInfo,
[(a,VirtualHpOffset)])
@@ -123,8 +122,8 @@ layOutDynConstr, layOutStaticConstr
layOutDynConstr = layOutConstr False
layOutStaticConstr = layOutConstr True
-layOutConstr is_static this_pkg data_con args
- = (mkConInfo this_pkg is_static data_con tot_wds ptr_wds,
+layOutConstr is_static data_con args
+ = (mkConInfo is_static data_con tot_wds ptr_wds,
things_w_offsets)
where
(tot_wds, -- #ptr_wds + #nonptr_wds