summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Factor JS Rts generation for h$c{_,0,1,2} into h$c{n} and improve name cachingwip/js-rts-fixmesJosh Meredith2023-02-165-121/+107
|
* rts: add the rts_clearMemory functionCheng Shao2023-02-159-4/+118
| | | | | | | This patch adds the rts_clearMemory function that does its best to zero out unused RTS memory for a wasm backend use case. See the comment above rts_clearMemory() prototype declaration for more detailed explanation. Closes #22920.
* Allow failure in nightly-x86_64-linux-deb10-no_tntc-validateBryan Richter2023-02-152-2/+8
| | | | See #22343
* docs: release notes, user guide: add js backenddoyougnu2023-02-152-0/+39
| | | | Follow up from #21078
* compiler: fix generateCgIPEStub for no-tables-next-to-code buildsCheng Shao2023-02-141-14/+14
| | | | | | | | | generateCgIPEStub already correctly implements the CmmTick finding logic for when tables-next-to-code is on/off, but it used the wrong predicate to decide when to switch between the two. Previously it switches based on whether the codegen is unregisterised, but there do exist registerised builds that disable tables-next-to-code! This patch corrects that problem. Fixes #22896.
* fix: Mark ghci Prelude import as implicitromes2023-02-144-5/+11
| | | | | | | | | | Fixes #22829 In GHCi, we were creating an import declaration for Prelude but we were not setting it as an implicit declaration. Therefore, ghci's import of Prelude triggered -Wmissing-import-lists. Adds regression test T22829 to testsuite
* Documentation: Improve Foldable1 documentationmeooow252023-02-141-68/+91
| | | | | | | | | | | | | * Explain foldrMap1, foldlMap1, foldlMap1', and foldrMap1' in greater detail, the text is mostly adapted from documentation of Foldable. * Describe foldr1, foldl1, foldl1' and foldr1' in terms of the above functions instead of redoing the full explanation. * Small updates to documentation of fold1, foldMap1 and toNonEmpty, again adapting from Foldable. * Update the foldMap1 example to lists instead of Sum since this is recommended for lazy right-associative folds. Fixes #22847
* Update outdated references to notesSimon Hengel2023-02-1410-23/+23
|
* rts: make it possible to change mblock size on 32-bit targetsCheng Shao2023-02-143-3/+9
| | | | | | | | The MBLOCK_SHIFT macro must be the single source of truth for defining the mblock size, and changing it should only affect performance, not correctness. This patch makes it truly possible to reconfigure mblock size, at least on 32-bit targets, by fixing places which implicitly relied on the previous MBLOCK_SHIFT constant. Fixes #22901.
* Introduce warning for loopy superclass solvesheaf2023-02-1426-100/+342
| | | | | | | | | | | | | | | | | Commit aed1974e completely re-engineered the treatment of loopy superclass dictionaries in instance declarations. Unfortunately, it has the potential to break (albeit in a rather minor way) user code. To alleviate migration concerns, this commit re-introduces the old behaviour. Any reliance on this old behaviour triggers a warning, controlled by `-Wloopy-superclass-solve`. The warning text explains that GHC might produce bottoming evidence, and provides a migration strategy. This allows us to provide a graceful migration period, alerting users when they are relying on this unsound behaviour. Fixes #22912 #22891 #20666 #22894 #22905
* Fix some correctness issues around tag inference when targeting the bytecode ↵Andreas Klebinger2023-02-149-27/+115
| | | | | | | | | generator. * Let binders are now always assumed untagged for bytecode. * Imported referenced are now always assumed to be untagged for bytecode. Fixes #22840
* nativeGen/AArch64: Emit Atomic{Read,Write} inlineBen Gamari2023-02-143-2/+37
| | | | | | | | | Previously the AtomicRead and AtomicWrite operations were emitted as out-of-line calls. However, these tend to be very important for performance, especially the RELAXED case (which only exists for ThreadSanitizer checking). Fixes #22115.
* base: Move changelog entry to its placeLi-yao Xia2023-02-141-4/+4
|
* RTS linker: Improve compatibility with NetBSDPHO2023-02-142-11/+39
| | | | | | | | | | | | | | 1. Hint address to NetBSD mmap(2) has a different semantics from that of Linux. When a hint address is provided, mmap(2) searches for a free region at or below the hint but *never* above it. This means we can't reliably search for free regions incrementally on the userland, especially when ASLR is enabled. Let the kernel do it for us if we don't care where the mapped address is going to be. 2. NetBSD not only hates to map pages as rwx, but also disallows to switch pages from rw- to r-x unless the intention is declared when pages are initially requested. This means we need a new MemoryAccess mode for pages that are going to be changed to r-x.
* Assume platforms support rpaths if they use either ELF or Mach-OPHO2023-02-141-4/+12
| | | | | Not only Linux, Darwin, and FreeBSD support rpaths. Determine the usability of rpaths based on the object format, not on OS.
* upload_ghc_libs: More control over which packages to operate onBen Gamari2023-02-141-4/+9
| | | | | | Here we add a `--skip` flag to `upload_ghc_libs`, making it easier to limit which packages to upload. This is often necessary when one package is not uploadable (e.g. see #22740).
* Mention new `Foreign.Marshal.Pool` implementation in User's Guideamesgen2023-02-141-5/+3
|
* Add clangd flag to include generated header filesSven Tennie2023-02-141-1/+1
| | | | | This enables clangd to correctly check C files that import Rts.h. (The added include directory contains ghcautoconf.h et. al.)
* Document that -fproc-alignment was introduced only in GHC 8.6Bodigrim2023-02-131-0/+2
|
* docs: Add section about profiling and foreign callswip/profiling-docs-refreshMatthew Pickering2023-02-131-0/+36
| | | | | | | | | Previously there was no documentation for how foreign calls interacted with the profiler. This can be quite confusing for users so getting it into the user guide is the first step to a potentially better solution. See the ticket for more insightful discussion. Fixes #21764
* Refresh profiling docsMatthew Pickering2023-02-132-150/+57
| | | | | | | I went through the whole of the profiling docs and tried to amend them to reflect current best practices and tooling. In particular I removed some old references to tools such as hp2any and replaced them with references to eventlog2html.
* compiler: Use NamedFieldPuns for `ModIface_` and `ModIfaceBackend` `NFData`Zubin Duggal2023-02-101-11/+50
| | | | | | | | | | instances This is a minor refactor that makes it easy to add and remove fields from `ModIface_` and `ModIfaceBackend`. Also change the formatting to make it clear exactly which fields are fully forced with `rnf`
* Testsuite: decrease length001 timeout for JS (#22921)Sylvain Henry2023-02-102-3/+8
|
* Add Lift instance for Fixedparsonsmatt2023-02-102-0/+11
|
* Detect the `mold` linkerRebecca Turner2023-02-102-0/+6
| | | | Enables support for the `mold` linker by rui314.
* Refactor the simplifier a bit to fix #22761Simon Peyton Jones2023-02-1012-183/+314
| | | | | | | | | | | | | | | | | | | | | The core change in this commit, which fixes #22761, is that * In a Core rule, ru_rhs is always occ-analysed. This means adding a couple of calls to occurAnalyseExpr when building a Rule, in * GHC.Core.Rules.mkRule * GHC.Core.Opt.Simplify.Iteration.simplRules But diagosing the bug made me stare carefully at the code of the Simplifier, and I ended up doing some only-loosely-related refactoring. * I think that RULES could be lost because not every code path did addBndrRules * The code around lambdas was very convoluted It's mainly moving deck chairs around, but I like it more now.
* gitlab-template: Emphasize `user facing` labelBen Gamari2023-02-091-8/+10
| | | | | | | | My sense is that the current mention of the ~"user facing" label is overlooked by many MR authors. Let's move this point up in the list to make it more likely that it is seen. Also rephrase some of the points.
* Update `Data.List.singleton` doc commentkonsumlamm2023-02-091-1/+1
|
* Bump transformers to 0.6.1.0sheaf2023-02-091-0/+0
| | | | | | | This allows us to avoid orphans for Foldable1 instances, fixing #22898. Updates transformers submodule.
* JS generated refs: update testsuite conditionsJosh Meredith2023-02-095-6/+6
|
* EPA: Comment between module and where should be in header commentsAlan Zimmerman2023-02-088-70/+287
| | | | | | | Do not apply the heuristic to associate a comment with a prior declaration for the first declaration in the file. Closes #22919
* testsuite: use concurrent.futures.ThreadPoolExecutor in the driverCheng Shao2023-02-083-56/+24
| | | | | | | | | The testsuite driver used to create one thread per test case, and explicitly use semaphore and locks for rate limiting and synchronization. This is a bad practice in any language, and occasionally may result in livelock conditions (e.g. #22889). This patch uses concurrent.futures.ThreadPoolExecutor for scheduling test case runs, which is simpler and more robust.
* testsuite: remove config.use_threadsCheng Shao2023-02-083-25/+13
| | | | | This patch simplifies the testsuite driver by removing the use_threads config field. It's just a degenerate case of threads=1.
* Revert "Don't keep exit join points so much"Matthew Pickering2023-02-0811-300/+98
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit caced75765472a1a94453f2e5a439dba0d04a265. It seems the patch "Don't keep exit join points so much" is causing wide-spread regressions in the bytestring library benchmarks. If I revert it then the 9.6 numbers are better on average than 9.4. See https://gitlab.haskell.org/ghc/ghc/-/issues/22893#note_479525 ------------------------- Metric Decrease: MultiComponentModules MultiComponentModulesRecomp MultiLayerModules MultiLayerModulesRecomp MultiLayerModulesTH_Make T12150 T13386 T13719 T21839c T3294 parsing001 -------------------------
* Fix tyvar scoping within class SPECIALISE pragmassheaf2023-02-083-10/+58
| | | | | | | | | | | | | | Type variables from class/instance headers scope over class/instance method type signatures, but DO NOT scope over the type signatures in SPECIALISE and SPECIALISE instance pragmas. The logic in GHC.Rename.Bind.rnMethodBinds correctly accounted for SPECIALISE inline pragmas, but forgot to apply the same treatment to method SPECIALISE pragmas, which lead to a Core Lint failure with an out-of-scope type variable. This patch makes sure we apply the same logic for both cases. Fixes #22913
* testsuite: Fix Python warnings (#22856)Krzysztof Gogolewski2023-02-072-12/+13
|
* JS: avoid head/tail and unpackFSSylvain Henry2023-02-071-9/+7
|
* Revert "Use fix-sized equality primops for fixed size boxed types"Ben Gamari2023-02-072-12/+12
| | | | | | | | | | This reverts commit 024020c38126f3ce326ff56906d53525bc71690c. This was never applied to master/9.6 originally. See #20405 for why using these primops is a bad idea. (cherry picked from commit b1d109ad542e4c37ae5af6ace71baf2cb509d865)
* Update kinds in comments in GHC.Core.TyConromes2023-02-071-20/+20
| | | | | Use `Type` instead of star kind (*) Fix comment with incorrect kind * to have kind `Constraint`
* Don't allow . in overloaded labelssheaf2023-02-074-9/+10
| | | | | | | | | | This patch removes . from the list of allowed characters in a non-quoted overloaded label, as it was realised this steals syntax, e.g. (#.). Users who want this functionality will have to add quotes around the label, e.g. `#"17.28"`. Fixes #22821
* Remove extraneous word in Roles user guideJan Hrček2023-02-061-1/+1
|
* Fix marking async exceptions in the JS backendLuite Stegeman2023-02-061-1/+2
| | | | | | | | Async exceptions are posted as a pair of the exception and the thread object. This fixes the marking pass to correctly follow the two elements of the pair. Potentially fixes #22836
* JS: replace "js" architecture with "javascript"Sylvain Henry2023-02-0641-91/+92
| | | | | | | | | | | | | | | Despite Cabal supporting any architecture name, `cabal --check` only supports a few built-in ones. Sadly `cabal --check` is used by Hackage hence using any non built-in name in a package (e.g. `arch(js)`) is rejected and the package is prevented from being uploaded on Hackage. Luckily built-in support for the `javascript` architecture was added for GHCJS a while ago. In order to allow newer `base` to be uploaded on Hackage we make the switch from `js` to `javascript` architecture. Fixes #22740. Co-authored-by: Ben Gamari <ben@smart-cactus.org>
* Update JavaScript fileStat to match Emscripten layoutwip/js-fileStatJosh Meredith2023-02-064-22/+65
|
* base changelog: move entries which were not backported to ghc-9.6 to ↵Bodigrim2023-02-041-3/+5
| | | | base-4.19 section
* Fix colors in emacs terminalBodigrim2023-02-042-4/+9
|
* Minor refactorKrzysztof Gogolewski2023-02-0417-65/+52
| | | | | | | | * Introduce refactorDupsOn f = refactorDups (comparing f) * Make mkBigTupleCase and coreCaseTuple monadic. Every call to those functions was preceded by calling newUniqueSupply. * Use mkUserLocalOrCoVar, which is equivalent to combining mkLocalIdOrCoVar with mkInternalName.
* Revert "Use fix-sized bit-fiddling primops for fixed size boxed types"Ben Gamari2023-02-044-153/+154
| | | | | | | | This reverts commit 4512ad2d6a8e65ea43c86c816411cb13b822f674. This was never applied to master/9.6 originally. (cherry picked from commit a44bdc2720015c03d57f470b759ece7fab29a57a)
* Disable several ignore-warning flags in genapply.j2023-02-031-8/+6
|
* Fix CallerCC potentially shadowing other cost centres.Andreas Klebinger2023-02-036-40/+49
| | | | | | Add a CallerCC cost centre flavour for cost centres added by the CallerCC pass. This avoids potential accidental shadowing between CCs added by user annotations and ones added by CallerCC.