diff options
author | Nicolas Frisby <nicolas.frisby@gmail.com> | 2013-07-06 12:43:57 -0500 |
---|---|---|
committer | Nicolas Frisby <nicolas.frisby@gmail.com> | 2013-07-16 11:27:43 -0500 |
commit | 4115f23c2df56fd8b30c62c78f41c091f9ca12a4 (patch) | |
tree | d761330fe1d114e610c88f4720da0a0969bfbd63 /compiler/utils | |
parent | 48f462f3ea7951fbf3774ad3d57b47eee2de4e04 (diff) | |
download | haskell-4115f23c2df56fd8b30c62c78f41c091f9ca12a4.tar.gz |
This reverts commit 163de25813d12764aa5ded1666af7c06fee0d67e and commit 279ac9f66a83203448b279ea478b2cc1dafbd35d.
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/FastString.lhs | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs index 5c6e7ff5c7..36b1b1e63e 100644 --- a/compiler/utils/FastString.lhs +++ b/compiler/utils/FastString.lhs @@ -91,10 +91,7 @@ module FastString unpackLitString, -- ** Operations - lengthLS, - - -- * Saving/restoring globals - saveFSTable, restoreFSTable, unsaveFSTable, FastStringTable + lengthLS ) where #include "HsVersions.h" @@ -480,7 +477,7 @@ nilFS = mkFastString "" getFastStringTable :: IO [[FastString]] getFastStringTable = do tbl <- readIORef string_table - buckets <- mapM (lookupTbl tbl) [0 .. hASH_TBL_SIZE - 1] + buckets <- mapM (lookupTbl tbl) [0 .. hASH_TBL_SIZE] return buckets -- ----------------------------------------------------------------------------- @@ -576,24 +573,4 @@ fsLit x = mkFastString x forall x . sLit (unpackCString# x) = mkLitString# x #-} {-# RULES "fslit" forall x . fsLit (unpackCString# x) = mkFastString# x #-} - - --------------------- --- for plugins; see Note [Initializing globals] in CoreMonad - --- called by host compiler -saveFSTable :: IO FastStringTable -saveFSTable = readIORef string_table - --- called by host compiler -unsaveFSTable :: IO () -unsaveFSTable = do - tbl@(FastStringTable _ arr#) <- readIORef string_table - buckets <- mapM (lookupTbl tbl) [0 .. hASH_TBL_SIZE - 1] - let size = sum $ map length $ buckets - writeIORef string_table (FastStringTable size arr#) - --- called by plugin -restoreFSTable :: FastStringTable -> IO () -restoreFSTable = writeIORef string_table \end{code} |