diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-08-26 07:33:22 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-08-26 07:33:22 +0000 |
commit | 663b391470a783e8f23414c07c18a020850d2fb8 (patch) | |
tree | 50c2ccc3e28fd7c1e50cccb79868029aa933b8cc /compiler/codeGen | |
parent | 5822cb8d13aa3c05d2b46b4510c13d94b902eb21 (diff) | |
download | haskell-663b391470a783e8f23414c07c18a020850d2fb8.tar.gz |
Refactoring only: remove [Id] field from ForeignStubs
We used to pass the list of top-level foreign exported bindings to the
code generator so that it could create StablePtrs for them in the
stginit code. Now we don't use stginit unless profiling, and the
StablePtrs are generated by C functions marked with
attribute((constructor)). This patch removes various bits associated
with the old way of doing things, which were previously left in place
in case we wanted to switch back, I presume. Also I refactored
dsForeigns to clean it up a bit.
Diffstat (limited to 'compiler/codeGen')
-rw-r--r-- | compiler/codeGen/CodeGen.lhs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/codeGen/CodeGen.lhs b/compiler/codeGen/CodeGen.lhs index 64ee9e4c4b..eaaae2c165 100644 --- a/compiler/codeGen/CodeGen.lhs +++ b/compiler/codeGen/CodeGen.lhs @@ -57,14 +57,13 @@ import Panic codeGen :: DynFlags -> Module -> [TyCon] - -> ForeignStubs -> [Module] -- directly-imported modules -> CollectedCCs -- (Local/global) cost-centres needing declaring/registering. -> [(StgBinding,[(Id,[Id])])] -- Bindings to convert, with SRTs -> HpcInfo -> IO [Cmm] -- Output -codeGen dflags this_mod data_tycons foreign_stubs imported_mods +codeGen dflags this_mod data_tycons imported_mods cost_centre_info stg_binds hpc_info = do { showPass dflags "CodeGen" @@ -79,7 +78,7 @@ codeGen dflags this_mod data_tycons foreign_stubs imported_mods ; cmm_tycons <- mapM cgTyCon data_tycons ; cmm_init <- getCmm (mkModuleInit way cost_centre_info this_mod main_mod - foreign_stubs imported_mods hpc_info) + imported_mods hpc_info) ; return (cmm_binds ++ concat cmm_tycons ++ [cmm_init]) } -- Put datatype_stuff after code_stuff, because the @@ -141,11 +140,10 @@ mkModuleInit -> CollectedCCs -- cost centre info -> Module -> Module -- name of the Main module - -> ForeignStubs -> [Module] -> HpcInfo -> Code -mkModuleInit way cost_centre_info this_mod main_mod foreign_stubs imported_mods hpc_info +mkModuleInit way cost_centre_info this_mod main_mod imported_mods hpc_info = do { -- Allocate the static boolean that records if this -- module has been registered already emitData Data [CmmDataLabel moduleRegdLabel, |