Commit 8eee9100 authored by simonmar's avatar simonmar
Browse files

[project @ 2005-05-17 13:47:39 by simonmar]

closureDescription: remove duplicate module name for external names,
and include the unique for local names.  This makes profiling with -hd
more uesful.
parent 9a71a03c
% %
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
% %
% $Id: CgClosure.lhs,v 1.69 2005/04/21 15:28:20 simonmar Exp $ % $Id: CgClosure.lhs,v 1.70 2005/05/17 13:47:39 simonmar Exp $
% %
\section[CgClosure]{Code generation for closures} \section[CgClosure]{Code generation for closures}
...@@ -45,7 +45,7 @@ import StgSyn ...@@ -45,7 +45,7 @@ import StgSyn
import StaticFlags ( opt_DoTickyProfiling ) import StaticFlags ( opt_DoTickyProfiling )
import CostCentre import CostCentre
import Id ( Id, idName, idType ) import Id ( Id, idName, idType )
import Name ( Name ) import Name ( Name, isExternalName )
import Module ( Module, pprModule ) import Module ( Module, pprModule )
import ListSetOps ( minusList ) import ListSetOps ( minusList )
import Util ( isIn, mapAccumL, zipWithEqual ) import Util ( isIn, mapAccumL, zipWithEqual )
...@@ -589,7 +589,11 @@ closureDescription :: Module -- Module ...@@ -589,7 +589,11 @@ closureDescription :: Module -- Module
-- Not called for StgRhsCon which have global info tables built in -- Not called for StgRhsCon which have global info tables built in
-- CgConTbls.lhs with a description generated from the data constructor -- CgConTbls.lhs with a description generated from the data constructor
closureDescription mod_name name closureDescription mod_name name
= showSDoc (hcat [char '<', pprModule mod_name, = showSDocDump (char '<' <>
char '.', ppr name, char '>']) (if isExternalName name
then ppr name -- ppr will include the module name prefix
else pprModule mod_name <> char '.' <> ppr name) <>
char '>')
-- showSDocDump, because we want to see the unique on the Name.
\end{code} \end{code}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment