Commits on Source (8)
-
593f4e04
-
This delays typechecking the corebindings until the bytecode generation happens. We also avoid allocating a thunk that is retained by `unsafeInterleaveIO`. In general, we shouldn't retain values of the hydrated `Type`, as not evaluating the bytecode object keeps it alive. It is better if we retain the unhydrated `IfaceType`. See Note [Hydrating Modules]
1ba39b05 -
The comments now live in the surrounding location, not inside the Match. Make sure we keep them. Closes #24707
e916fc92 -
This patch forces the driver to always merge objects when building dynamic objects even when ar -L is supported. It is an oversight of !8887: original rationale of that patch is favoring the relatively cheap ar -L operation over object merging when ar -L is supported, which makes sense but only if we are building static objects! Omitting check for whether we are building dynamic objects will result in broken .so files with undefined reference errors at executable link time when building GHC with llvm-ar. Fixes #22210.
d2b17f32 -
Fixes #24682
209d09f5 -
More recent versions of Cabal modify the behaviour of libAbiHash which breaks our usage of registerPackage. It is simpler to inline the part of registerPackage that we need and avoid any additional dependency and complication using the higher-level function introduces.
3fff0977 -
Hannes Siebenhandl authored
The goal is simplifiy adding deduplication tables to `ModIface` interface serialisation. We identify two main points of interest that make this difficult: 1. UserData hardcodes what `Binary` instances can have deduplication tables. Moreover, it heavily uses partial functions. 2. GHC.Iface.Binary hardcodes the deduplication tables for 'Name' and 'FastString', making it difficult to add more deduplication. Instead of having a single `UserData` record with fields for all the types that can have deduplication tables, we allow to provide custom serialisers for any `Typeable`. These are wrapped in existentials and stored in a `Map` indexed by their respective `TypeRep`. The `Binary` instance of the type to deduplicate still needs to explicitly look up the decoder via `findUserDataReader` and `findUserDataWriter`, which is no worse than the status-quo. `Map` was chosen as microbenchmarks indicate it is the fastest for a small number of keys (< 10). To generalise the deduplication table serialisation mechanism, we introduce the types `ReaderTable` and `WriterTable` which provide a simple interface that is sufficient to implement a general purpose deduplication mechanism for `writeBinIface` and `readBinIface`. This allows us to provide a list of deduplication tables for serialisation that can be extended more easily, for example for `IfaceTyCon`, see the issue ghc/ghc#24540 for more motivation. In addition to this refactoring, we split `UserData` into `ReaderUserData` and `WriterUserData`, to avoid partial functions and reduce overall memory usage, as we need fewer mutable variables. Bump haddock submodule to accomodate for `UserData` split. ------------------------- Metric Increase: MultiLayerModulesTH_Make MultiLayerModulesRecomp T21839c -------------------------
d636f6a2 -
Hannes Siebenhandl authored
A `BinHandle` contains too much information for reading data. For example, it needs to keep a `FastMutInt` and a `IORef BinData`, when the non-mutable variants would suffice. Additionally, this change has the benefit that anyone can immediately tell whether the `BinHandle` is used for reading or writing. Bump haddock submodule BinHandle split.
be6836a2
Showing
- compiler/GHC/Driver/Main.hs 5 additions, 5 deletionscompiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Pipeline/Execute.hs 18 additions, 8 deletionscompiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Iface/Binary.hs 277 additions, 73 deletionscompiler/GHC/Iface/Binary.hs
- compiler/GHC/Iface/Ext/Binary.hs 31 additions, 29 deletionscompiler/GHC/Iface/Ext/Binary.hs
- compiler/GHC/Iface/Ext/Fields.hs 6 additions, 6 deletionscompiler/GHC/Iface/Ext/Fields.hs
- compiler/GHC/Iface/Recomp.hs 1 addition, 1 deletioncompiler/GHC/Iface/Recomp.hs
- compiler/GHC/Iface/Recomp/Binary.hs 4 additions, 4 deletionscompiler/GHC/Iface/Recomp/Binary.hs
- compiler/GHC/Iface/Recomp/Flags.hs 3 additions, 3 deletionscompiler/GHC/Iface/Recomp/Flags.hs
- compiler/GHC/Iface/Syntax.hs 8 additions, 7 deletionscompiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Type.hs 7 additions, 7 deletionscompiler/GHC/Iface/Type.hs
- compiler/GHC/Parser.y 1 addition, 1 deletioncompiler/GHC/Parser.y
- compiler/GHC/StgToJS/Object.hs 21 additions, 20 deletionscompiler/GHC/StgToJS/Object.hs
- compiler/GHC/Types/Basic.hs 1 addition, 1 deletioncompiler/GHC/Types/Basic.hs
- compiler/GHC/Types/FieldLabel.hs 1 addition, 3 deletionscompiler/GHC/Types/FieldLabel.hs
- compiler/GHC/Types/Name.hs 4 additions, 4 deletionscompiler/GHC/Types/Name.hs
- compiler/GHC/Utils/Binary.hs 444 additions, 226 deletionscompiler/GHC/Utils/Binary.hs
- compiler/GHC/Utils/Binary/Typeable.hs 2 additions, 2 deletionscompiler/GHC/Utils/Binary/Typeable.hs
- configure.ac 4 additions, 4 deletionsconfigure.ac
- hadrian/src/Hadrian/Haskell/Cabal/Parse.hs 9 additions, 11 deletionshadrian/src/Hadrian/Haskell/Cabal/Parse.hs
- testsuite/tests/perf/compiler/Makefile 6 additions, 0 deletionstestsuite/tests/perf/compiler/Makefile