[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 17 commits: Implement cstringLength# and FinalPtr

Marge Bot gitlab at gitlab.haskell.org
Thu May 7 18:59:09 UTC 2020



 Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
acccf67e by Andrew Martin at 2020-05-07T14:58:39-04:00
Implement cstringLength# and FinalPtr

This function and its accompanying rule resolve issue #5218.
A future PR to the bytestring library will make the internal
Data.ByteString.Internal.unsafePackAddress compute string length
with cstringLength#. This will improve the status quo because it is
eligible for constant folding.

Additionally, introduce a new data constructor to ForeignPtrContents
named FinalPtr. This additional data constructor, when used in the
IsString instance for ByteString, leads to more Core-to-Core
optimization opportunities, fewer runtime allocations, and smaller
binaries.

Also, this commit re-exports all the functions from GHC.CString
(including cstringLength#) in GHC.Exts. It also adds a new test
driver. This test driver is used to perform substring matches on Core
that is dumped after all the simplifier passes. In this commit, it is
used to check that constant folding of cstringLength# works.

- - - - -
c3bcb6af by Brian Foley at 2020-05-07T14:58:40-04:00
Remove further dead code found by a simple Python script.

Avoid removing some functions that are part of an API even
though they're not used in-tree at the moment.

- - - - -
ebb58b0e by Julien Debon at 2020-05-07T14:58:44-04:00
Add doc examples for Bifoldable

See #17929

- - - - -
e4b1d38c by Julien Debon at 2020-05-07T14:58:46-04:00
doc (Bitraversable): Add examples to Bitraversable

* Add examples to Data.Bitraversable
* Fix formatting for (,) in Bitraversable and Bifoldable
* Fix mistake on bimapAccumR documentation

See #17929

- - - - -
77ea518c by John Ericson at 2020-05-07T14:58:48-04:00
HsSigWcTypeScoping: Pull in documentation from stray location

- - - - -
7f7e0e7d by John Ericson at 2020-05-07T14:58:48-04:00
Rename local `real_fvs` to `implicit_vs`

It doesn't make sense to call the "free" variables we are about to
implicitly bind the real ones.

- - - - -
c1185e83 by John Ericson at 2020-05-07T14:58:48-04:00
A few tiny style nits with renaming

 - Use case rather than guards that repeatedly scrutenize same thing.

 - No need for view pattern when `L` is fine.

 - Use type synnonym to convey the intent like elsewhere.

- - - - -
341ece26 by John Ericson at 2020-05-07T14:58:48-04:00
Add `forAllOrNothing` function with note

- - - - -
306bc7f4 by Joseph C. Sible at 2020-05-07T14:58:50-04:00
Document lawlessness of Ap's Num instance
- - - - -
9e711055 by Joseph C. Sible at 2020-05-07T14:58:50-04:00
Apply suggestion to libraries/base/Data/Monoid.hs
- - - - -
d03c9c6f by Joseph C. Sible at 2020-05-07T14:58:50-04:00
Apply more suggestions from Simon Jakobi
- - - - -
5286b945 by Adam Gundry at 2020-05-07T14:58:51-04:00
Reject all duplicate declarations involving DuplicateRecordFields (fixes #17965)

This fixes a bug that resulted in some programs being accepted that used the same
identifier as a field label and another declaration, depending on the order they
appeared in the source code.

- - - - -
df9d7db4 by Simon Peyton Jones at 2020-05-07T14:58:51-04:00
Fix specialisation for DFuns

When specialising a DFun we must take care to saturate the
unfolding.  See Note [Specialising DFuns] in Specialise.

Fixes #18120

- - - - -
62aea86f by Greg Steuck at 2020-05-07T14:58:53-04:00
Remove unused SEGMENT_PROT_RWX

It's been unused for a year and is problematic on any OS which
requires W^X for security.

- - - - -
4484f0f7 by nineonine at 2020-05-07T14:58:54-04:00
Add test for #16167

- - - - -
0dcde93c by Ryan Scott at 2020-05-07T14:58:55-04:00
Bump exceptions submodule so that dist-boot is .gitignore'd

`exceptions` is a stage-0 boot library as of commit
30272412fa437ab8e7a8035db94a278e10513413, which means that building
`exceptions` in a GHC tree will generate a `dist-boot` directory.
However, this directory was not specified in `exceptions`'
`.gitignore` file, which causes it to dirty up the current `git`
working directory.

Accordingly, this bumps the `exceptions` submodule to commit
ghc/packages/exceptions at 23c0b8a50d7592af37ca09beeec16b93080df98f,
which adds `dist-boot` to the `.gitignore` file.

- - - - -
8dfdce68 by Ömer Sinan Ağacan at 2020-05-07T14:59:00-04:00
Linker.c: initialize n_symbols of ObjectCode with other fields

- - - - -


30 changed files:

- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Cmm/Utils.hs
- compiler/GHC/CmmToAsm/PPC/Cond.hs
- compiler/GHC/CmmToAsm/SPARC/Cond.hs
- compiler/GHC/CmmToAsm/X86/Cond.hs
- compiler/GHC/CmmToLlvm/Base.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Unfold.hs
- compiler/GHC/Data/FastString.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/Plugins.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/StgToCmm/Utils.hs
- compiler/GHC/SysTools/Tasks.hs
- compiler/GHC/Tc/Gen/Sig.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/Types/Basic.hs
- compiler/GHC/Types/Name/Reader.hs
- compiler/GHC/Types/Var/Env.hs
- compiler/GHC/Utils/Misc.hs
- docs/users_guide/8.12.1-notes.rst
- libraries/base/Data/Bifoldable.hs
- libraries/base/Data/Bitraversable.hs
- libraries/base/Data/Monoid.hs
- libraries/base/GHC/Exts.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/529d28e436cfa8066b405fc0f92aad5f46a220bf...8dfdce68107799c040e9387a0b7f31d8379befa5

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/529d28e436cfa8066b405fc0f92aad5f46a220bf...8dfdce68107799c040e9387a0b7f31d8379befa5
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200507/0f8fc45e/attachment.html>


More information about the ghc-commits mailing list