[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 14 commits: rts: introduce (and use) `STG_NORETURN`

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Nov 2 16:38:40 UTC 2022



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


Commits:
6b400d26 by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: introduce (and use) `STG_NORETURN`

Instead of sprinkling the codebase with
`GNU(C3)_ATTRIBUTE(__noreturn__)`, add a `STG_NORETURN` macro (for,
basically, the same thing) similar to `STG_UNUSED` and others, and
update the code to use this macro where applicable.

- - - - -
f9638654 by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: consistently use `STG_UNUSED`

- - - - -
81a58433 by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: introduce (and use) `STG_USED`

Similar to `STG_UNUSED`, have a specific macro for
`__attribute__(used)`.

- - - - -
41e1f748 by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: introduce (and use) `STG_MALLOC`

Instead of using `GNUC3_ATTRIBUTE(__malloc__)`, provide a `STG_MALLOC`
macro definition and use it instead.

- - - - -
3a9a8bde by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: use `STG_UNUSED`

- - - - -
9ab999de by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: specify deallocator of allocating functions

This patch adds a new `STG_MALLOC1` macro (and its counterpart
`STG_MALLOC2` for completeness) which allows to specify the deallocation
function to be used with allocations of allocating functions, and
applies it to `stg*allocBytes`.

It also fixes a case where `free` was used to free up an
`stgMallocBytes` allocation, found by the above change.

See: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-malloc-function-attribute
See: https://gitlab.haskell.org/ghc/ghc/-/issues/22381

- - - - -
81c0c7c9 by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: use `alloc_size` attribute

This patch adds the `STG_ALLOC_SIZE1` and `STG_ALLOC_SIZE2` macros which
allow to set the `alloc_size` attribute on functions, when available.

See: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-alloc_005fsize-function-attribute
See: https://gitlab.haskell.org/ghc/ghc/-/issues/22381

- - - - -
99a1d896 by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: add and use `STG_RETURNS_NONNULL`

See: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-returns_005fnonnull-function-attribute
See: https://gitlab.haskell.org/ghc/ghc/-/issues/22381

- - - - -
c235b399 by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: tag `stgStrndup` as `STG_MALLOC`

See: https://gitlab.haskell.org/ghc/ghc/-/issues/22381

- - - - -
ed81b448 by Oleg Grenrus at 2022-11-02T12:07:27-04:00
Move Symbol implementation note out of public haddock

- - - - -
7f07ca12 by Ben Gamari at 2022-11-02T12:38:12-04:00
gen-dll: Drop it

Currently it is only used by the make build system, which is soon to be
retired, and it has not built since 41cf758b. We may need to reintroduce
it when dynamic-linking support is introduced on Windows, but we will
cross that bridge once we get there.

Fixes #21753.

- - - - -
11736d31 by Matthew Pickering at 2022-11-02T12:38:13-04:00
Port foundation numeric tests to GHC testsuite

This commit ports the numeric tests which found a regression in GHC-9.4.

https://github.com/haskell-foundation/foundation/issues/571

Included in the commit is a simple random number generator and
simplified QuickCheck implementation. In future these could be factored
out of this standalone file and reused as a general purpose library
which could be used for other QuickCheck style tests in the testsuite.

See #22282

- - - - -
ca3171ea by M Farkas-Dyck at 2022-11-02T12:38:21-04:00
git: ignore HIE files.

Cleans up git status if one sets -fwrite-ide-info in hadrian/ghci.

- - - - -
4e93b329 by Matthew Pickering at 2022-11-02T12:38:22-04:00
Clarify status of bindings in WholeCoreBindings

Gergo points out that these bindings are tidied, rather than prepd as
the variable claims. Therefore we update the name of the variable to
reflect reality and add a comment to the data type to try to erase any
future confusion.

Fixes #22307

- - - - -


30 changed files:

- .gitignore
- CODEOWNERS
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Unit/Module/WholeCoreBindings.hs
- configure.ac
- libraries/ghc-prim/GHC/Types.hs
- rts/CloneStack.c
- rts/Heap.c
- rts/Hpc.c
- rts/Linker.c
- rts/RtsAPI.c
- rts/RtsFlags.c
- rts/RtsMessages.c
- rts/RtsStartup.c
- rts/RtsUtils.h
- rts/StgCRun.c
- rts/include/Rts.h
- rts/include/RtsAPI.h
- rts/include/Stg.h
- rts/include/rts/Main.h
- rts/include/rts/Messages.h
- rts/include/rts/OSThreads.h
- rts/include/rts/Threads.h
- rts/linker/Elf.c
- rts/linker/M32Alloc.h
- rts/linker/elf_reloc_aarch64.c
- rts/linker/elf_tlsgd.c
- rts/posix/OSThreads.c
- rts/posix/Select.c
- testsuite/tests/numeric/should_run/all.T


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e437f7a106655837139bca37e2a1824fd5178ec0...4e93b329148250427bec52030a78a45d683913d1

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e437f7a106655837139bca37e2a1824fd5178ec0...4e93b329148250427bec52030a78a45d683913d1
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/20221102/5e589720/attachment.html>


More information about the ghc-commits mailing list