Change the strategy to determine dynamic data access
authorClemens Fruhwirth <clemens@endorphin.org>
Tue, 31 Jul 2007 09:59:53 +0000 (09:59 +0000)
committerClemens Fruhwirth <clemens@endorphin.org>
Tue, 31 Jul 2007 09:59:53 +0000 (09:59 +0000)
commit81b2276ff9434d97aff683218c34c86479a8d868
treeaf25ac884da373745d889fc415ef9c7881bff4b3
parent7cf591f6971ba96d01ec4afc453fa4ac498d759a
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.
15 files changed:
compiler/cmm/CLabel.hs
compiler/cmm/PprC.hs
compiler/codeGen/CgBindery.lhs
compiler/codeGen/CgCase.lhs
compiler/codeGen/CgCon.lhs
compiler/codeGen/CgExpr.lhs
compiler/codeGen/CgHeapery.lhs
compiler/codeGen/CgTailCall.lhs
compiler/codeGen/CgUtils.hs
compiler/codeGen/ClosureInfo.lhs
compiler/codeGen/CodeGen.lhs
compiler/nativeGen/AsmCodeGen.lhs
compiler/nativeGen/MachCodeGen.hs
compiler/nativeGen/NCGMonad.hs
compiler/nativeGen/PositionIndependentCode.hs