diff options
Diffstat (limited to 'compiler/utils/FastString.lhs')
-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} |