From 1d03d8bef962e6789db44e8b6f2cfd9e34f3f5ad Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Thu, 11 Mar 2021 17:41:51 +0100 Subject: Replace (ptext .. sLit) with `text` 1. `text` is as efficient as `ptext . sLit` thanks to the rewrite rules 2. `text` is visually nicer than `ptext . sLit` 3. `ptext . sLit` encourages using one `ptext` for several `sLit` as in: ptext $ case xy of ... -> sLit ... ... -> sLit ... which may allocate SDoc's TextBeside constructors at runtime instead of sharing them into CAFs. --- compiler/GHC/CmmToAsm/Dwarf/Constants.hs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'compiler/GHC/CmmToAsm/Dwarf/Constants.hs') diff --git a/compiler/GHC/CmmToAsm/Dwarf/Constants.hs b/compiler/GHC/CmmToAsm/Dwarf/Constants.hs index ded0ea3237..e9047256e8 100644 --- a/compiler/GHC/CmmToAsm/Dwarf/Constants.hs +++ b/compiler/GHC/CmmToAsm/Dwarf/Constants.hs @@ -6,7 +6,6 @@ module GHC.CmmToAsm.Dwarf.Constants where import GHC.Prelude import GHC.Utils.Asm -import GHC.Data.FastString import GHC.Platform import GHC.Utils.Outputable @@ -165,11 +164,11 @@ dwarfSection platform name = -> text "\t.section .debug_" <> text name <> text ",\"dr\"" -- * Dwarf section labels -dwarfInfoLabel, dwarfAbbrevLabel, dwarfLineLabel, dwarfFrameLabel :: PtrString -dwarfInfoLabel = sLit ".Lsection_info" -dwarfAbbrevLabel = sLit ".Lsection_abbrev" -dwarfLineLabel = sLit ".Lsection_line" -dwarfFrameLabel = sLit ".Lsection_frame" +dwarfInfoLabel, dwarfAbbrevLabel, dwarfLineLabel, dwarfFrameLabel :: SDoc +dwarfInfoLabel = text ".Lsection_info" +dwarfAbbrevLabel = text ".Lsection_abbrev" +dwarfLineLabel = text ".Lsection_line" +dwarfFrameLabel = text ".Lsection_frame" -- | Mapping of registers to DWARF register numbers dwarfRegNo :: Platform -> Reg -> Word8 -- cgit v1.2.1