[commit: ghc] master: Document putSymbolTable determinism (2046297)
git at git.haskell.org
git at git.haskell.org
Fri Jun 3 16:45:16 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/2046297ec03bdcd4901f69cd6ae03e84dc974683/ghc
>---------------------------------------------------------------
commit 2046297ec03bdcd4901f69cd6ae03e84dc974683
Author: Bartosz Nitka <niteria at gmail.com>
Date: Fri Jun 3 09:11:50 2016 -0700
Document putSymbolTable determinism
Like explained in the comment it's OK here.
Test Plan: ./validate
Reviewers: bgamari, austin, simonmar
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2298
GHC Trac Issues: #4012
>---------------------------------------------------------------
2046297ec03bdcd4901f69cd6ae03e84dc974683
compiler/iface/BinIface.hs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs
index 0b70e8c..4290704 100644
--- a/compiler/iface/BinIface.hs
+++ b/compiler/iface/BinIface.hs
@@ -254,7 +254,9 @@ binaryInterfaceMagic dflags
putSymbolTable :: BinHandle -> Int -> UniqFM (Int,Name) -> IO ()
putSymbolTable bh next_off symtab = do
put_ bh next_off
- let names = elems (array (0,next_off-1) (eltsUFM symtab))
+ let names = elems (array (0,next_off-1) (nonDetEltsUFM symtab))
+ -- It's OK to use nonDetEltsUFM here because the elements have
+ -- indices that array uses to create order
mapM_ (\n -> serialiseName bh n symtab) names
getSymbolTable :: BinHandle -> NameCacheUpdater -> IO SymbolTable
More information about the ghc-commits
mailing list