[commit: ghc] master: Make the fields in NameCache strict (bed118a)

Simon Peyton-Jones simonpj at microsoft.com
Wed Nov 13 09:24:43 UTC 2013


Patrick, does this have any effect on the performance of the compiler (runtime, allocation)?

Simon

| -----Original Message-----
| From: ghc-commits [mailto:ghc-commits-bounces at haskell.org] On Behalf Of
| git at git.haskell.org
| Sent: 13 November 2013 03:40
| To: ghc-commits at haskell.org
| Subject: [commit: ghc] master: Make the fields in NameCache strict
| (bed118a)
| 
| Repository : ssh://git@git.haskell.org/ghc
| 
| On branch  : master
| Link       :
| http://ghc.haskell.org/trac/ghc/changeset/bed118a43019e02ca0bc763fa6e418
| 45b1deb21f/ghc
| 
| >---------------------------------------------------------------
| 
| commit bed118a43019e02ca0bc763fa6e41845b1deb21f
| Author: Patrick Palka <patrick at parcs.ath.cx>
| Date:   Sat Nov 9 14:23:46 2013 -0500
| 
|     Make the fields in NameCache strict
| 
|     We've already been making sure to strictly modify the global name
| cache
|     in order to avoid space leaks.  However, that does us little good if
| the
|     fields of the name cache are not made strict as well.
| 
| 
| >---------------------------------------------------------------
| 
| bed118a43019e02ca0bc763fa6e41845b1deb21f
|  compiler/main/HscTypes.lhs |    4 ++--
|  1 file changed, 2 insertions(+), 2 deletions(-)
| 
| diff --git a/compiler/main/HscTypes.lhs b/compiler/main/HscTypes.lhs
| index 1004a6b..a3c6a65 100644
| --- a/compiler/main/HscTypes.lhs
| +++ b/compiler/main/HscTypes.lhs
| @@ -2033,9 +2033,9 @@ its binding site, we fix it up.
|  -- each original name; i.e. (module-name, occ-name) pair and provides
|  -- something of a lookup mechanism for those names.
|  data NameCache
| - = NameCache {  nsUniqs :: UniqSupply,
| + = NameCache {  nsUniqs :: !UniqSupply,
|                  -- ^ Supply of uniques
| -                nsNames :: OrigNameCache
| +                nsNames :: !OrigNameCache
|                  -- ^ Ensures that one original name gets one unique
|     }
| 
| 
| _______________________________________________
| ghc-commits mailing list
| ghc-commits at haskell.org
| http://www.haskell.org/mailman/listinfo/ghc-commits


More information about the ghc-devs mailing list