[Git][ghc/ghc][wip/ghc-9.8] 18 commits: rts: Work around missing prototypes errors

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Mon Jul 10 20:46:32 UTC 2023



Ben Gamari pushed to branch wip/ghc-9.8 at Glasgow Haskell Compiler / GHC


Commits:
242ec490 by Ben Gamari at 2023-07-10T16:46:08-04:00
rts: Work around missing prototypes errors

Darwin's toolchain inexpliciably claims that `write_barrier` and friends
have declarations without prototypes, despite the fact that (a) they are
definitions, and (b) the prototypes appear only a few lines above. Work
around this by making the definitions proper prototypes.

(cherry picked from commit 5b6612bc4f6b0a7ecc9868750bee1c359ffca871)

- - - - -
7985f647 by Ben Gamari at 2023-07-10T16:46:08-04:00
Define FFI_GO_CLOSURES

The libffi shipped with Apple's XCode toolchain does not contain a
definition of the FFI_GO_CLOSURES macro, despite containing references
to said macro. Work around this by defining the macro, following the
model of a similar workaround in OpenJDK [1].

[1] https://github.com/openjdk/jdk17u-dev/pull/741/files

(cherry picked from commit 8b35e8caafeeccbf06b7faa70e807028a3f0ff43)

- - - - -
55421d97 by Ben Gamari at 2023-07-10T16:46:08-04:00
base: Fix incorrect CPP guard

This was guarded on `darwin_HOST_OS` instead of `defined(darwin_HOST_OS)`.

(cherry picked from commit d7ef1704aeba451bd3e0efbdaaab2638ee1f0bc8)

- - - - -
d8f068c7 by Ben Gamari at 2023-07-10T16:46:08-04:00
rts/Trace: Ensure that debugTrace arguments are used

As debugTrace is a macro we must take care to ensure that
the fact is clear to the compiler lest we see warnings.

(cherry picked from commit 7c7d1f66d35f73a2faa898a33aa80cd276159dc2)

- - - - -
809a56d5 by Ben Gamari at 2023-07-10T16:46:08-04:00
rts: Various warnings fixes

(cherry picked from commit cb92051e3d85575ff6abd753c9b135930cc50cf8)

- - - - -
99feb974 by Ben Gamari at 2023-07-10T16:46:08-04:00
hadrian: Ignore warnings in unix and semaphore-compat

(cherry picked from commit dec81dd1fd0475dde4929baae625d155387300bb)

- - - - -
e6856716 by Matthew Pickering at 2023-07-10T16:46:08-04:00
hadrian: Fix dependencies of docs:* rule

For the docs:* rule we need to actually build the package rather than
just the haddocks for the dependent packages. Therefore we depend on the
.conf files of the packages we are trying to build documentation for as
well as the .haddock files.

Fixes #23472

(cherry picked from commit d7f6448aa06bbf26173a06ee5c624f5b734786c5)

- - - - -
ca23ac73 by Ben Gamari at 2023-07-10T16:46:08-04:00
rts: Ensure that pinned allocations respect block size

Previously, it was possible for pinned, aligned allocation requests to
allocate beyond the end of the pinned accumulator block. Specifically,
we failed to account for the padding needed to achieve the requested
alignment in the "large object" check. With large alignment requests,
this can result in the allocator using the capability's pinned object
accumulator block to service a request which is larger than
`PINNED_EMPTY_SIZE`.

To fix this we reorganize `allocatePinned` to consistently account for
the alignment padding in all large object checks. This is a bit subtle
as we must handle the case of a small allocation request filling the
accumulator block, as well as large requests.

Fixes #23400.

(cherry picked from commit fd8c57694a00f6359bd66365f1284388c869ac60)

- - - - -
b2547b7b by Luite Stegeman at 2023-07-10T16:46:08-04:00
Support large stack frames/offsets in GHCi bytecode interpreter

Bytecode instructions like PUSH_L (push a local variable) contain
an operand that refers to the stack slot. Before this patch, the
operand type was SmallOp (Word16), limiting the maximum stack
offset to 65535 words. This could cause compiler panics in some
cases (See #22888).

This patch changes the operand type for stack offsets from
SmallOp to Op, removing the stack offset limit.

Fixes #22888

(cherry picked from commit 564164ef323a9f2cdeb8c69dcb2cf6df6382de4e)

- - - - -
e9d60ded by Torsten Schmits at 2023-07-10T16:46:08-04:00
Substitute free variables captured by breakpoints in SpecConstr

Fixes #23267

(cherry picked from commit 40f4ef7c40e747dfea491d297475458d2ccaf860)

- - - - -
ac34de33 by Torsten Schmits at 2023-07-10T16:46:08-04:00
Filter out nontrivial substituted expressions in substTickish

Fixes #23272

(cherry picked from commit 6fdcf969db85f3fe64123ba150e9226a0d2995cd)

- - - - -
51192fc9 by Ben Bellick at 2023-07-10T16:46:08-04:00
Add some structured diagnostics in Tc/Validity.hs

This addresses the work of ticket #20118
Created the following constructors for TcRnMessage
 - TcRnInaccessibleCoAxBranch
 - TcRnPatersonCondFailure

(cherry picked from commit 03f941f45607a5ee52ca53a358333bbb41ddb1bc)

- - - - -
2f5f8714 by aadaa_fgtaa at 2023-07-10T16:46:08-04:00
Optimise ELF linker (#23464)

- cache last elements of `relTable`, `relaTable` and `symbolTables` in `ocInit_ELF`
- cache shndx table in ObjectCode
- run `checkProddableBlock` only with debug rts

(cherry picked from commit b3e1436f968c0c36a27ea0339ee2554970b329fe)

- - - - -
a5ac7bde by Moisés Ackerman at 2023-07-10T16:46:08-04:00
Add failing test case for #23492

(cherry picked from commit 6074cc3cda9b9836c784942a1aa7f766fb142787)

- - - - -
f5e42371 by Moisés Ackerman at 2023-07-10T16:46:08-04:00
Use generated src span for catch-all case of record selector functions

This fixes #23492. The problem was that we used the real source span
of the field declaration for the generated catch-all case in the
selector function, in particular in the generated call to
`recSelError`, which meant it was included in the HIE output. Using
`generatedSrcSpan` instead means that it is not included.

(cherry picked from commit 356a269258a50bf67811fe0edb193fc9f82dfad1)

- - - - -
d1314153 by Moisés Ackerman at 2023-07-10T16:46:08-04:00
Introduce genLHsApp and genLHsLit helpers in GHC.Rename.Utils

(cherry picked from commit 3efe7f399a53ec7930c8a333ad2c114d956f0c2a)

- - - - -
ec90f619 by Moisés Ackerman at 2023-07-10T16:46:08-04:00
Construct catch-all default case using helpers

GHC.Rename.Utils concrete helpers instead of wrapGenSpan + HS AST constructors

(cherry picked from commit dd782343f131cfd983a7fb2431d9d4a9ae497551)

- - - - -
1c1d7a9f by Ben Gamari at 2023-07-10T16:46:08-04:00
Fix breakpoint

- - - - -


30 changed files:

- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/Driver/CodeOutput.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/Types/Error/Codes.hs
- docs/users_guide/debugging.rst
- docs/users_guide/using-optimisation.rst
- hadrian/src/Flavour.hs
- hadrian/src/Rules/Documentation.hs
- libraries/base/include/HsBase.h
- libraries/base/tests/IO/all.T
- libraries/base/tests/all.T
- libraries/ghci/GHCi/FFI.hsc
- rts/Disassembler.c
- rts/Interpreter.c
- rts/Linker.c
- rts/LinkerInternals.h


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e8ed0c85072b8f5aad730506e79f41c66705c4fe...1c1d7a9f003ed2a9e85b83722c52de1d0c40f096

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e8ed0c85072b8f5aad730506e79f41c66705c4fe...1c1d7a9f003ed2a9e85b83722c52de1d0c40f096
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/20230710/8927646e/attachment-0001.html>


More information about the ghc-commits mailing list