diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2019-01-17 13:34:32 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-01-31 12:46:51 -0500 |
commit | 4fa32293c9d2658ce504b8fe6d909db2acf59983 (patch) | |
tree | 6c7519fd6a320cbaf2264c2cbfdfe1eef0d70acc /compiler/codeGen/StgCmmClosure.hs | |
parent | deab6d64eac085b2e0ec68bfb3eeeda608dfb85a (diff) | |
download | haskell-4fa32293c9d2658ce504b8fe6d909db2acf59983.tar.gz |
Use ByteString to represent Cmm string literals (#16198)
Also used ByteString in some other relevant places
Diffstat (limited to 'compiler/codeGen/StgCmmClosure.hs')
-rw-r--r-- | compiler/codeGen/StgCmmClosure.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs index 65e7cf7dab..8ad8951a21 100644 --- a/compiler/codeGen/StgCmmClosure.hs +++ b/compiler/codeGen/StgCmmClosure.hs @@ -91,6 +91,7 @@ import DynFlags import Util import Data.Coerce (coerce) +import qualified Data.ByteString.Char8 as BS8 ----------------------------------------------------------------------------- -- Data types and synonyms @@ -916,10 +917,9 @@ enterIdLabel dflags id c mkProfilingInfo :: DynFlags -> Id -> String -> ProfilingInfo mkProfilingInfo dflags id val_descr | not (gopt Opt_SccProfilingOn dflags) = NoProfilingInfo - | otherwise = ProfilingInfo ty_descr_w8 val_descr_w8 + | otherwise = ProfilingInfo ty_descr_w8 (BS8.pack val_descr) where - ty_descr_w8 = stringToWord8s (getTyDescription (idType id)) - val_descr_w8 = stringToWord8s val_descr + ty_descr_w8 = BS8.pack (getTyDescription (idType id)) getTyDescription :: Type -> String getTyDescription ty @@ -966,8 +966,8 @@ mkDataConInfoTable dflags data_con is_static ptr_wds nonptr_wds prof | not (gopt Opt_SccProfilingOn dflags) = NoProfilingInfo | otherwise = ProfilingInfo ty_descr val_descr - ty_descr = stringToWord8s $ occNameString $ getOccName $ dataConTyCon data_con - val_descr = stringToWord8s $ occNameString $ getOccName data_con + ty_descr = BS8.pack $ occNameString $ getOccName $ dataConTyCon data_con + val_descr = BS8.pack $ occNameString $ getOccName data_con -- We need a black-hole closure info to pass to @allocDynClosure@ when we -- want to allocate the black hole on entry to a CAF. |