diff options
author | simonpj <unknown> | 2000-11-10 15:12:55 +0000 |
---|---|---|
committer | simonpj <unknown> | 2000-11-10 15:12:55 +0000 |
commit | f23ba2b294429ccbdeb80f0344ec08f6abf61bb7 (patch) | |
tree | 30e94ffff421c99ae25f35759e52b7e267e9e8af /ghc/compiler/codeGen/CodeGen.lhs | |
parent | 6bd12a0cb5115d08a9ee84dbc1920e83bb7c1616 (diff) | |
download | haskell-f23ba2b294429ccbdeb80f0344ec08f6abf61bb7.tar.gz |
[project @ 2000-11-10 15:12:50 by simonpj]
1. Outputable.PprStyle now carries a bit more information
In particular, the printing style tells whether to print
a name in unqualified form. This used to be embedded in
a Name, but since Names now outlive a single compilation unit,
that's no longer appropriate.
So now the print-unqualified predicate is passed in the printing
style, not embedded in the Name.
2. I tidied up HscMain a little. Many of the showPass messages
have migraged into the repective pass drivers
Diffstat (limited to 'ghc/compiler/codeGen/CodeGen.lhs')
-rw-r--r-- | ghc/compiler/codeGen/CodeGen.lhs | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/ghc/compiler/codeGen/CodeGen.lhs b/ghc/compiler/codeGen/CodeGen.lhs index 8eab80e904..462f0ff4d7 100644 --- a/ghc/compiler/codeGen/CodeGen.lhs +++ b/ghc/compiler/codeGen/CodeGen.lhs @@ -40,7 +40,7 @@ import PrimRep ( PrimRep(..) ) import TyCon ( TyCon, isDataTyCon ) import BasicTypes ( TopLevelFlag(..) ) import UniqSupply ( mkSplitUniqSupply ) -import ErrUtils ( dumpIfSet_dyn ) +import ErrUtils ( dumpIfSet_dyn, showPass ) import Panic ( assertPanic ) \end{code} @@ -60,26 +60,28 @@ codeGen :: DynFlags codeGen dflags mod_name imported_modules cost_centre_info fe_binders tycons stg_binds - = mkSplitUniqSupply 'f' >>= \ fl_uniqs -> -- absC flattener - let - datatype_stuff = genStaticConBits cinfo data_tycons - code_stuff = initC cinfo (cgTopBindings maybe_split stg_binds) - init_stuff = mkModuleInit fe_binders mod_name imported_modules - cost_centre_info - - abstractC = mkAbstractCs [ maybe_split, - init_stuff, - code_stuff, - datatype_stuff] + = do { showPass dflags "CodeGen" + + ; fl_uniqs <- mkSplitUniqSupply 'f' + ; let + datatype_stuff = genStaticConBits cinfo data_tycons + code_stuff = initC cinfo (cgTopBindings maybe_split stg_binds) + init_stuff = mkModuleInit fe_binders mod_name imported_modules + cost_centre_info + + abstractC = mkAbstractCs [ maybe_split, + init_stuff, + code_stuff, + datatype_stuff] -- Put datatype_stuff after code_stuff, because the -- datatype closure table (for enumeration types) -- to (say) PrelBase_True_closure, which is defined in code_stuff - flat_abstractC = flattenAbsC fl_uniqs abstractC - in - dumpIfSet_dyn dflags Opt_D_dump_absC "Abstract C" (dumpRealC abstractC) >> - return flat_abstractC + flat_abstractC = flattenAbsC fl_uniqs abstractC + ; dumpIfSet_dyn dflags Opt_D_dump_absC "Abstract C" (dumpRealC abstractC) + ; return flat_abstractC + } where data_tycons = filter isDataTyCon tycons |