diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2017-04-17 12:56:20 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2017-04-17 12:56:31 +0100 |
commit | a92ff5d66182d992d02dfaad4c446ad074582368 (patch) | |
tree | ed086f1c65efb717cc7cc8ade62a186d719fcd4d /compiler/codeGen/StgCmm.hs | |
parent | 29ef71412af48e1bbf7739d1dbc4c4feb3b9a86a (diff) | |
download | haskell-a92ff5d66182d992d02dfaad4c446ad074582368.tar.gz |
hs_add_root() RTS API removal
Before ghc-7.2 hs_add_root() had to be used to initialize haskell
modules when haskell was called from FFI.
commit a52ff7619e8b7d74a9d933d922eeea49f580bca8
("Change the way module initialisation is done (#3252, #4417)")
removed needs for hs_add_root() and made function a no-op.
For backward compatibility '__stginit_<module>' symbol was
not removed.
This change removes no-op hs_add_root() function and unused
'__stginit_<module>' symbol from each haskell module.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Test Plan: ./validate
Reviewers: simonmar, austin, bgamari, erikd
Reviewed By: simonmar
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3460
Diffstat (limited to 'compiler/codeGen/StgCmm.hs')
-rw-r--r-- | compiler/codeGen/StgCmm.hs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/compiler/codeGen/StgCmm.hs b/compiler/codeGen/StgCmm.hs index a420677625..d92b410a7f 100644 --- a/compiler/codeGen/StgCmm.hs +++ b/compiler/codeGen/StgCmm.hs @@ -160,39 +160,6 @@ cgTopRhs dflags rec bndr (StgRhsClosure cc bi fvs upd_flag args body) -- Module initialisation code --------------------------------------------------------------- -{- The module initialisation code looks like this, roughly: - - FN(__stginit_Foo) { - JMP_(__stginit_Foo_1_p) - } - - FN(__stginit_Foo_1_p) { - ... - } - - We have one version of the init code with a module version and the - 'way' attached to it. The version number helps to catch cases - where modules are not compiled in dependency order before being - linked: if a module has been compiled since any modules which depend on - it, then the latter modules will refer to a different version in their - init blocks and a link error will ensue. - - The 'way' suffix helps to catch cases where modules compiled in different - ways are linked together (eg. profiled and non-profiled). - - We provide a plain, unadorned, version of the module init code - which just jumps to the version with the label and way attached. The - reason for this is that when using foreign exports, the caller of - startupHaskell() must supply the name of the init function for the "top" - module in the program, and we don't want to require that this name - has the version and way info appended to it. - -We initialise the module tree by keeping a work-stack, - * pointed to by Sp - * that grows downward - * Sp points to the last occupied slot --} - mkModuleInit :: CollectedCCs -- cost centre info -> Module @@ -202,10 +169,6 @@ mkModuleInit mkModuleInit cost_centre_info this_mod hpc_info = do { initHpc this_mod hpc_info ; initCostCentres cost_centre_info - -- For backwards compatibility: user code may refer to this - -- label for calling hs_add_root(). - ; let lbl = mkPlainModuleInitLabel this_mod - ; emitDecl (CmmData (Section Data lbl) (Statics lbl [])) } |