diff options
author | Clemens Fruhwirth <clemens@endorphin.org> | 2007-07-31 09:59:53 +0000 |
---|---|---|
committer | Clemens Fruhwirth <clemens@endorphin.org> | 2007-07-31 09:59:53 +0000 |
commit | 81b2276ff9434d97aff683218c34c86479a8d868 (patch) | |
tree | af25ac884da373745d889fc415ef9c7881bff4b3 /compiler/codeGen/CgUtils.hs | |
parent | 7cf591f6971ba96d01ec4afc453fa4ac498d759a (diff) | |
download | haskell-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/CgUtils.hs')
-rw-r--r-- | compiler/codeGen/CgUtils.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/codeGen/CgUtils.hs b/compiler/codeGen/CgUtils.hs index 8d3578e1ef..19f5eabb2f 100644 --- a/compiler/codeGen/CgUtils.hs +++ b/compiler/codeGen/CgUtils.hs @@ -281,11 +281,11 @@ addToMemE rep ptr n -- ------------------------------------------------------------------------- -tagToClosure :: PackageId -> TyCon -> CmmExpr -> CmmExpr -tagToClosure this_pkg tycon tag +tagToClosure :: TyCon -> CmmExpr -> CmmExpr +tagToClosure tycon tag = CmmLoad (cmmOffsetExprW closure_tbl tag) wordRep where closure_tbl = CmmLit (CmmLabel lbl) - lbl = mkClosureTableLabel this_pkg (tyConName tycon) + lbl = mkClosureTableLabel (tyConName tycon) ------------------------------------------------------------------------- -- |