projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2003-10-09 11:58:39 by simonpj]
[ghc-hetmet.git]
/
ghc
/
compiler
/
codeGen
/
CodeGen.lhs
diff --git
a/ghc/compiler/codeGen/CodeGen.lhs
b/ghc/compiler/codeGen/CodeGen.lhs
index
fd5ef9d
..
4ac0eaa
100644
(file)
--- a/
ghc/compiler/codeGen/CodeGen.lhs
+++ b/
ghc/compiler/codeGen/CodeGen.lhs
@@
-28,7
+28,7
@@
import DriverState ( v_Build_tag, v_MainModIs )
import StgSyn
import CgMonad
import AbsCSyn
import StgSyn
import CgMonad
import AbsCSyn
-import PrelNames ( gHC_PRIM, dOLLAR_MAIN, mAIN_Name )
+import PrelNames ( gHC_PRIM, rOOT_MAIN, mAIN_Name )
import CLabel ( mkSRTLabel, mkClosureLabel,
mkPlainModuleInitLabel, mkModuleInitLabel )
import PprAbsC ( dumpRealC )
import CLabel ( mkSRTLabel, mkClosureLabel,
mkPlainModuleInitLabel, mkModuleInitLabel )
import PprAbsC ( dumpRealC )
@@
-148,7
+148,7
@@
mkModuleInit way cost_centre_info this_mod mb_main_mod foreign_stubs imported_mo
register_mod_imports = map mk_import_register imported_mods
-- When compiling the module in which the 'main' function lives,
register_mod_imports = map mk_import_register imported_mods
-- When compiling the module in which the 'main' function lives,
- -- we inject an extra stg_init procedure for stg_init_zdMain, for the
+ -- we inject an extra stg_init procedure for stg_init_ZCMain, for the
-- RTS to invoke. We must consult the -main-is flag in case the
-- user specified a different function to Main.main
main_mod_name = case mb_main_mod of
-- RTS to invoke. We must consult the -main-is flag in case the
-- user specified a different function to Main.main
main_mod_name = case mb_main_mod of
@@
-158,9
+158,9
@@
mkModuleInit way cost_centre_info this_mod mb_main_mod foreign_stubs imported_mo
| Module.moduleName this_mod /= main_mod_name
= AbsCNop -- The normal case
| otherwise -- this_mod contains the main function
| Module.moduleName this_mod /= main_mod_name
= AbsCNop -- The normal case
| otherwise -- this_mod contains the main function
- = CModuleInitBlock (mkPlainModuleInitLabel dOLLAR_MAIN)
- (mkModuleInitLabel dOLLAR_MAIN way)
- (mk_import_register this_mod)
+ = CCodeBlock (mkPlainModuleInitLabel rOOT_MAIN)
+ (CJump (CLbl (mkPlainModuleInitLabel this_mod) CodePtrRep))
+
in
mkAbstractCs [
cc_decls,
in
mkAbstractCs [
cc_decls,
@@
-300,7
+300,7
@@
maybeExternaliseId id
| opt_EnsureSplittableC, -- Externalise the name for -split-objs
isInternalName name
= moduleName `thenFC` \ mod ->
| opt_EnsureSplittableC, -- Externalise the name for -split-objs
isInternalName name
= moduleName `thenFC` \ mod ->
- returnFC (setIdName id (mkExternalName uniq mod new_occ (nameSrcLoc name)))
+ returnFC (setIdName id (mkExternalName uniq mod new_occ Nothing (nameSrcLoc name)))
| otherwise
= returnFC id
where
| otherwise
= returnFC id
where