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

Marge Bot gitlab at gitlab.haskell.org
Thu May 7 12:18:21 UTC 2020



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


Commits:
ccb73e1b by Andrew Martin at 2020-05-07T08:17:38-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.

- - - - -
f8407e88 by Brian Foley at 2020-05-07T08:17:43-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.

- - - - -
3f27676b by John Ericson at 2020-05-07T08:17:47-04:00
HsSigWcTypeScoping: Pull in documentation from stray location

- - - - -
18197a7a by John Ericson at 2020-05-07T08:17:47-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.

- - - - -
a6f69e21 by John Ericson at 2020-05-07T08:17:47-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.

- - - - -
8872bec8 by John Ericson at 2020-05-07T08:17:47-04:00
Add `forAllOrNothing` function with note

- - - - -
78bf775e by Joseph C. Sible at 2020-05-07T08:17:51-04:00
Document lawlessness of Ap's Num instance
- - - - -
dfb6ac88 by Joseph C. Sible at 2020-05-07T08:17:51-04:00
Apply suggestion to libraries/base/Data/Monoid.hs
- - - - -
fea5ddd7 by Joseph C. Sible at 2020-05-07T08:17:51-04:00
Apply more suggestions from Simon Jakobi
- - - - -
722c0ff5 by Adam Gundry at 2020-05-07T08:17: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.

- - - - -
a6014e52 by Simon Peyton Jones at 2020-05-07T08:17:52-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

- - - - -
499754bb by Greg Steuck at 2020-05-07T08:17:55-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.

- - - - -
b1a6ab7d by nineonine at 2020-05-07T08:18:05-04:00
Add test for #16167

- - - - -
4d7b2ce0 by Ryan Scott at 2020-05-07T08:18:05-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.

- - - - -
529d28e4 by Ömer Sinan Ağacan at 2020-05-07T08:18:11-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/Monoid.hs
- libraries/base/GHC/Exts.hs
- libraries/base/GHC/ForeignPtr.hs
- libraries/exceptions


The diff was not included because it is too large.


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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6aeb9888fc1f3cb5ca2033642edf40852e911c18...529d28e436cfa8066b405fc0f92aad5f46a220bf
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/6f48eefa/attachment.html>


More information about the ghc-commits mailing list