summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify FFI codeKrzysztof Gogolewski2021-07-271-15/+7
| | | | Remains of the dotnet FFI, see a7d8f43718 and 1fede4bc95
* Re #18087 !6238 Empty line in front of :since:Andreas Abel2021-07-271-0/+3
| | | | Ack. @monoidal
* Issue #18087: :since: for warnings of ghc 6/7/8Andreas Abel2021-07-271-0/+113
| | | | | | | | | | | Added :since: fields to users_guide on warning, for warnings introduced starting GHC 6.0. The data was extracted from the HTML docs on warnings, see https://gitlab.haskell.org/ghc/ghc/-/issues/18087 and partially verified by consulting the change logs.
* Doc: warnings: since: remove minor version number for uniformityAndreas Abel2021-07-271-5/+5
| | | | | New warnings are only released in major versions, it seems. One way or the other, a .1 minor version can always be dropped.
* Doc: tabs to spacesAndreas Abel2021-07-271-2/+2
|
* Parser: suggest TemplateHaskell on $$(...) (#20157)Krzysztof Gogolewski2021-07-276-0/+23
|
* Eliminate unnecessary unsafeEqualityProofSimon Peyton Jones2021-07-274-50/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch addresses #20143, which wants to discard unused calls to unsafeEqualityProof. There are two parts: * In exprOkForSideEffects, we want to know that unsafeEqualityProof indeed terminates, without any exceptions etc * But we can only discard the case if we know that the coercion variable is not used, which means we have to gather accurate occurrence info for CoVars. Previously OccurAnal only did a half hearted job of doing so; this patch finishes the job. See Note [Gather occurrences of coercion variables] in OccurAnal. Because the occurrence analyser does more work, there is a small compile-time cost but it's pretty small. The compiler perf tests are usually 0.0% but occasionally up to 0.3% increase. I'm just going to accept this -- gathering accurate occurrence information really seems like the Right Thing to do. There is an increase in `compile_time/peak_megabytes_allocated`, for T11545, or around 14%; but I can't reproduce it on my machine (it's the same before and after), and the peak-usage stats are vulnerable to when exactly the GC takes place, so I'm just going to accept it. Metric Increase: T11545
* Eta expand through CallStacksSimon Peyton Jones2021-07-276-24/+217
| | | | | | | This patch fixes #20103, by treating HasCallStack constraints as cheap when eta-expanding. See Note [Eta expanding through CallStacks] in GHC.Core.Opt.Arity
* Make CallStacks work better with RebindableSyntaxSimon Peyton Jones2021-07-2713-43/+222
| | | | | | | | | | | | | | | | | | | | As #19918 pointed out, the CallStack mechanism didn't work well with RebindableSyntax. This patch improves matters. See GHC.Tc.Types.Evidence Note [Overview of implicit CallStacks] * New predicate isPushCallStackOrigin distinguishes when a CallStack constraint should be solved "directly" or by pushing an item on the stack. * The constructor EvCsPushCall now has a FastString, which can describe not only a function call site, but also things like "the literal 42" or "an if-then-else expression". * I also fixed #20126 thus: exprCtOrigin (HsIf {}) = IfThenElseOrigin (Previously it was "can't happen".)
* testsuite: Add more debug output on failure to call ghc-pkgMatthew Pickering2021-07-271-1/+1
|
* hadrian: Call ghc-pkg recache after copying package database into bindistMatthew Pickering2021-07-271-0/+5
| | | | | | | | | | | The package.cache needs to have a later mod-time than all of the .conf files. This invariant can be destroyed by `cp -r` and so we run `ghc-pkg recache` to ensure the package database which is distributed is consistent. If you are installing a relocatable bindist, for example, on windows, you should preserve mtimes by using cp -a or run ghc-pkg recache after installing.
* hadrian: Add exe suffix to executables in testsuiteMatthew Pickering2021-07-271-4/+4
|
* hadrian: Install windows bindist by copying in test_hadrianMatthew Pickering2021-07-271-3/+12
|
* packaging: Don't include configure scripts in windows bindistMatthew Pickering2021-07-271-11/+13
| | | | Fixes #19868
* packaging: Add note about wrappersMatthew Pickering2021-07-271-3/+27
|
* packaging: Create both versioned and unversioned executablesMatthew Pickering2021-07-273-6/+67
| | | | | | | | | Before we would just copy the unversioned executable into the bindist. Now the actual executable is copied into the bindist and a version suffix is added. Then a wrapper or symlink is added which points to the versioned executable. Fixes #20074
* hadrian: Remove special haddock copying ruleMatthew Pickering2021-07-271-12/+0
|
* hadrian: Update hsc2hs wrapper to match current masterMatthew Pickering2021-07-271-19/+5
|
* packaging: Give ghc-pkg the same version as ProjectVersionMatthew Pickering2021-07-274-1/+4
|
* packaging: Be more precise about which executables to copy and wrappers to ↵Matthew Pickering2021-07-271-14/+43
| | | | | | | | | | | | | | | | | | | create Exes ---- Before: The whole bin/ folder was copied which could contain random old/stale/testsuite executables After: Be precise Wrappers -------- Before: Wrappers were created for everything in the bin folder, including internal executables such as "unlit" After: Only create wrappers for the specific things which we want to include in the user's path. This makes the hadrian bindists match up more closely with the make bindists.
* validate: Add note for BINDIST variable, GitLab validation; clean up commentsAlina Banerjee2021-07-271-3/+15
|
* validate: check both stage1, stage2 test failures for deciding success of ↵Alina Banerjee2021-07-271-1/+15
| | | | entire test run
* validate: run stage1 tests using stage1 compiler when BINSTIST is falseAlina Banerjee2021-07-271-2/+13
|
* validate: change test ghc based on BINDIST value (YES/NO)Alina Banerjee2021-07-271-1/+7
|
* validate: update quick-validate flavour for validation with --fastAlina Banerjee2021-07-273-20/+28
|
* validate: add a debug flag (in both Hadrian and legacy Make) for running testsAlina Banerjee2021-07-271-1/+12
|
* validate: add flags using Hadrian's user settings for ignoring changes in ↵Alina Banerjee2021-07-271-29/+90
| | | | performance tests
* validate: fix #18477, improve syntax & add if-else checks for test ↵Alina Banerjee2021-07-271-123/+142
| | | | | | | outcomes/validation paths ShellCheck(https://github.com/koalaman/shellcheck/wiki) has been used to check the script.
* doc: fix copy/paste errorFraser Tweedale2021-07-271-2/+2
| | | | | | | | | The `divInt#` implementation note has heading: See Note [divInt# implementation] This seems to be a copy/paste mistake. Remove "See" from the heading.
* rts: Fix inconsistent signatures for collect_pointersBen Gamari2021-07-271-1/+1
| | | | Fixes #20160.
* rts/OSThreads: Improve error handling consistencyBen Gamari2021-07-273-23/+33
| | | | | | | | | | | | Previously we relied on the caller to check the return value from broadcastCondition and friends, most of whom neglected to do so. Given that these functions should not fail anyways, I've opted to drop the return value entirely and rather move the result check into the OSThreads functions. This slightly changes the semantics of timedWaitCondition which now returns false only in the case of timeout, rather than any error as previously done.
* rts/OSThreads: Ensure that we catch failures from pthread_mutex_lockBen Gamari2021-07-271-4/+5
| | | | Previously we would only catch EDEADLK errors.
* Use pthread if available on linuxAndreas Klebinger2021-07-271-4/+2
|
* Rename itimer to ticker in rts/posix for consistency.Andreas Klebinger2021-07-276-23/+26
|
* rts: Don't declare libCffi as bundled when using system libffiBen Gamari2021-07-273-5/+15
| | | | | Previously the rts's cabal file would claim that it bundled libffi, even if we are using the system's libffi. Fixes #19869.
* hadrian: Always specify flag values explicitlyBen Gamari2021-07-273-24/+33
| | | | | Previously we would often allow cabal flags to default, making it harder than necessary to reason about the effective build configuration.
* rts: Drop allocateExec and friendsBen Gamari2021-07-273-110/+0
| | | | All uses of these now use ExecPage.
* rts: Introduce and use ExecPage abstractionBen Gamari2021-07-2717-113/+179
| | | | | Here we introduce a very thin abstraction for allocating, filling, and freezing executable pages to replace allocateExec.
* rts/adjustor: Drop redundant commmentsBen Gamari2021-07-275-15/+0
|
* rts: Break up adjustor logicBen Gamari2021-07-2721-1329/+1583
|
* rts: Move libffi interfaces all to AdjustorBen Gamari2021-07-272-90/+51
| | | | | | | Previously the libffi Adjustor implementation would use allocateExec to create executable mappings. However, allocateExec is also used elsewhere in GHC to allocate things other than ffi_closure, which is a use-case which libffi does not support.
* rts: Document CPP guardsBen Gamari2021-07-271-10/+10
|
* rename: Avoid unnecessary map lookupBen Gamari2021-07-271-2/+2
| | | | | | | | Previously the -Wcompat-unqualified-imports warning would first check whether an import is of a covered module, incurring an map lookup, before checking the simple boolean predicate of whether it is qualified. This is more expensive than strictly necessary (although at the moment the warning is unused, so this will make little difference).
* Remove unused module GHC.Rename.DocFendor2021-07-271-23/+0
|
* RTS: try to fix timer racesSylvain Henry2021-07-262-2/+5
| | | | | | | | | | | | | | | | | | * Pthread based timer was initialized started while some other parts of the RTS assume it is initialized stopped, e.g. in hs_init_ghc: /* Start the "ticker" and profiling timer but don't start until the * scheduler is up. However, the ticker itself needs to be initialized * before the scheduler to ensure that the ticker mutex is initialized as * moreCapabilities will attempt to acquire it. */ * after a fork, don't start the timer before the IOManager is initialized: the timer handler (handle_tick) might call wakeUpRts to perform an idle GC, which calls wakeupIOManager/ioManagerWakeup Found while debugging #18033/#20132 but I couldn't confirm if it fixes them.
* hadrian: Don't add empty -I argumentswip/hadrian/libffi-includesBen Gamari2021-07-251-1/+1
| | | | | | Previously hadrian would add a -I$FfiIncludeDir flag to compiler invocations even if FfiIncludeDir was null, resulting in compilation errors.
* [rts] Untag bq->bh prior to reading the info tableMoritz Angermann2021-07-251-1/+12
| | | | | | | | | | | | | | | | | In `checkBlockingQueues` we must always untag the `bh` field of an `StgBlockingQueue`. While at first glance it might seem a sensible assumption that `bh` will always be a blackhole and therefore never be tagged, the GC could shortcut the indirection and put a tagged pointer into the indirection. This blew up on aarch64-darwin with a misaligned access. `bh` pointed to an address that always ended in 0xa. On architectures that are a little less strict about alignment, this would have read a garbage info table pointer, which very, very unlikely would have been equal to `stg_BLACKHOLE_info` and therefore things accidentally worked. However, on AArch64, the read of the info table pointer resulted in a SIGBUS due to misaligned read. Fixes #20093.
* [CI] absolutely no caching on darwinMoritz Angermann2021-07-252-20/+16
| | | | | | | We failed at doing caching properly, so for now we won't do any caching at all. This is not safe in a concurrent setting, however all our darwin builders run with concurrency 1, and -j8, on 8 core m1 mac minis.
* testsuite: Add test for #20142Ben Gamari2021-07-232-0/+31
|
* Cmm.Opt: Fix type of shift amount in constant foldingBen Gamari2021-07-231-2/+2
| | | | | | | | Previously the `MO_S_Quot` constant folding rule would incorrectly pass the shift amount of the same width as the shifted value. However, the machop's type expects the shift amount to be a Word. Fixes #20142.