summaryrefslogtreecommitdiff
path: root/compiler/GHC/Data/StringBuffer.hs
Commit message (Collapse)AuthorAgeFilesLines
* Fully remove HsVersions.hSylvain Henry2021-05-121-2/+0
| | | | | | | | | | Replace uses of WARN macro with calls to: warnPprTrace :: Bool -> SDoc -> a -> a Remove the now unused HsVersions.h Bump haddock submodule
* Replace CPP assertions with Haskell functionsSylvain Henry2021-05-121-2/+1
| | | | | | | | | | | | | | | There is no reason to use CPP. __LINE__ and __FILE__ macros are now better replaced with GHC's CallStack. As a bonus, assert error messages now contain more information (function name, column). Here is the mapping table (HasCallStack omitted): * ASSERT: assert :: Bool -> a -> a * MASSERT: massert :: Bool -> m () * ASSERTM: assertM :: m Bool -> m () * ASSERT2: assertPpr :: Bool -> SDoc -> a -> a * MASSERT2: massertPpr :: Bool -> SDoc -> m () * ASSERTM2: assertPprM :: m Bool -> SDoc -> m ()
* Ensure assert from Control.Exception isn't usedSylvain Henry2021-05-121-2/+2
|
* Don't use FastString to convert string to UTF8Matthew Pickering2021-03-031-1/+1
|
* StringBuffer: Use unsafeWithForeignPtrBen Gamari2021-02-141-12/+18
|
* Add the proper HLint rules and remove redundant keywords from compilerHécate2020-11-011-6/+10
|
* Pass specialised utf8DecodeChar# to utf8DecodeLazy# for performanceDaniel Gröber2020-07-221-1/+1
| | | | | | | Currently we're passing a indexWord8OffAddr# type function to utf8DecodeLazy# which then passes it on to utf8DecodeChar#. By passing one of utf8DecodeCharAddr# or utf8DecodeCharByteArray# instead we benefit from the inlining and specialization already done for those.
* Use ShortByteString for FastStringDaniel Gröber2020-07-221-1/+1
| | | | | | | | | | | | | | | There are multiple reasons we want this: - Fewer allocations: ByteString has 3 fields, ShortByteString just has one. - ByteString memory is pinned: - This can cause fragmentation issues (see for example #13110) but also - makes using FastStrings in compact regions impossible. Metric Decrease: T5837 T12150 T12234 T12425
* Modules: Utils and Data (#13009)Sylvain Henry2020-04-261-0/+334
Update Haddock submodule Metric Increase: haddock.compiler