summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rts: Fix #include of <linker/PEi386.h>Ben Gamari2016-11-111-1/+1
| | | | | | | | | | Test Plan: Validate on Windows Reviewers: austin, erikd, simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2696
* rts: Fix build when linked with goldBen Gamari2016-11-111-11/+2
| | | | | | | | | | | | | | | | | | As reported in #12812, the runtime system fails to build when linked with gold due to a missing dependency on libpthread. Additionally, rts/package.conf.in uses the WORD_SIZE_IN_BITS macro defined by MachDeps.h, which it does not #include. Fix this. Test Plan: Validate with gold linker Reviewers: hsyl20, austin, erikd, simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2695 GHC Trac Issues: #12816
* ghc-pkg: Munge dynamic library directoriesBen Gamari2016-11-111-0/+1
| | | | | | | | | | | | | | | Otherwise we end up looking in the wrong place for dynamic libraries on Windows. This addresses a regression introduced by D2611. See #12479. Test Plan: validate across platforms Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2640 GHC Trac Issues: #12479
* testsuite: Lower allocations for T876Ben Gamari2016-11-111-1/+2
| | | | | | If only we knew why... [skip-ci]
* Pass -no-pie to GCCBen Gamari2016-11-117-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | Certain distributions (e.g. Debian and Ubuntu) have enabled PIE be default in their GCC packaging. This breaks our abuse of GCC as a linker which requires that we pass -Wl,-r, which is incompatible with PIE (since the former implies that we are generating a relocatable object file and the latter an executable). This is a second attempt at D2691. This attempt constrasts with D2691 in that it preserves the "does gcc support -no-pie" flag in settings, allowing this to be reconfigured by `configure` during installation of a binary distribution. Thanks for @rwbarton for drawing attention to this issue. Test Plan: Validate Reviewers: austin, hvr, erikd Reviewed By: erikd Subscribers: thomie, rwbarton, erikd Differential Revision: https://phabricator.haskell.org/D2693 GHC Trac Issues: #12759
* rts: Fix LoadArchive on OS XBen Gamari2016-11-113-7/+20
|
* Revert "Refactor CallStack defaulting slightly"Simon Peyton Jones2016-11-111-35/+39
| | | | | | | | | | This reverts commit 317236db308d9bd497a11fa4c455428fc7477405. I totally missed that in simplifyInfer for local functions we must NOT default call stacks. So I'm reverting this. Fortunately caught by T10845, which sadly isn't run by validate --fast
* Revert "Pass -no-pie to GCC"Ben Gamari2016-11-105-44/+0
| | | | | | This reverts commit bae4a55b1fb403f610b4b55a1b6fb3f03e9c2026. This will be superceded by D2693.
* Prevent GND from inferring an instance context for method-less classesRyan Scott2016-11-1011-22/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `GeneralizedNewtypeDeriving` is used with a type class that has no methods, it will generate a redundant context, and as a result, it can trigger warnings when compiled with `-Wredundant-constraints`. This is a simple change in behavior to check beforehand if a class has methods when deriving it with GND, and if it has no methods, avoid inferring the redundant context. Beware that the test for #6088, which used to be expected to fail, now compiles without issue since it doesn't infer a problematic instance context. Thanks to Simon Peyton Jones for doing the necessary refactoring in f05d685ae05ec293083f2fa7ec7ba057fbe64869. Fixes #12814. Test Plan: ./validate Reviewers: goldfire, rwbarton, simonpj, austin, bgamari Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2692 GHC Trac Issues: #12814
* Update user's guide after D2490Thomas Winant2016-11-101-3/+8
| | | | | | | | | | | | | | | | | D2490 added support for type wildcards in TH pattern splices. The user's guide still said that they were not supported, this patch fixes this. Test Plan: build documentation Reviewers: goldfire, austin, mvv, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2686 GHC Trac Issues: #12164
* rts/linker: Move loadArchive to new source fileBen Gamari2016-11-103-526/+567
| | | | | | | | | | | | | | Test Plan: Validate Reviewers: DemiMarie, austin, simonmar, erikd Reviewed By: DemiMarie Subscribers: Phyx, thomie, hvr Differential Revision: https://phabricator.haskell.org/D2642 GHC Trac Issues: #12388
* rts: Add api to pin a thread to a numa node but without fixing a capabilityDarshan Kapashi2016-11-102-5/+37
| | | | | | | | | | | | | | | | | | | | | | | `rts_setInCallCapability` sets the thread affinity as well as pins the numa node. We should also have the ability to set the numa node without setting the capability affinity. `rts_pinNumaNodeForCapability` function is added and exported via `RtsAPI.h`. Previous callers of `rts_setInCallCapability` should now also call `rts_pinNumaNodeForCapability` to get the same effect as before. Test Plan: ./validate Reviewers: austin, simonmar, bgamari Reviewed By: simonmar, bgamari Subscribers: thomie, niteria Differential Revision: https://phabricator.haskell.org/D2637 GHC Trac Issues: #12764
* Read parentheses betterDavid Feuer2016-11-101-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of pulling a token and looking for `'('` or `')'`, just look for the character itself. This prevents us from lexing every single item twice, once to see if it's a left parenthesis and once to actually parse it. Partially fixes #12665 Make parens faster more aggressively * Strip spaces before parsing, so we never have to strip the same spaces twice. * String parsers together manually, to try to avoid unnecessary closure creation. Test Plan: Validate Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2630 GHC Trac Issues: #12665
* Add Richard Eisenberg's new email to mailmapBen Gamari2016-11-101-1/+2
| | | | | | | | | | Reviewers: austin, mpickering Reviewed By: mpickering Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2689
* testsuite: Update allocation numbers for T5631Ben Gamari2016-11-101-1/+3
|
* Pass -no-pie to GCCBen Gamari2016-11-105-0/+44
| | | | | | | | | | | | | | | | | | Certain distributions (e.g. Debian and Ubuntu) have enabled PIE be default in their GCC packaging. This breaks our abuse of GCC as a linker which requires that we pass -Wl,-r, which is incompatible with PIE (since the former implies that we are generating a relocatable object file and the latter an executable). Test Plan: Validate Reviewers: hvr, austin Subscribers: rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D2691 GHC Trac Issues: #12759
* configure: Pass HC_OPTS_STAGEx to build systemBen Gamari2016-11-102-0/+7
| | | | | | | | | | Test Plan: Try `./configure HC_OPTS_STAGE0=-foobar` and watch it fail Reviewers: austin, hvr Subscribers: thomie, erikd Differential Revision: https://phabricator.haskell.org/D2674
* build system: Include CONF_LD_LINKER_OPTS in ALL_LD_OPTSBen Gamari2016-11-102-7/+22
| | | | | | | | | | | | | | | This ensures that artifacts built with build-prog see these options. Also spruce up comments. Test Plan: Carefully read it. Reviewers: austin, hvr, erikd Reviewed By: erikd Subscribers: thomie, erikd Differential Revision: https://phabricator.haskell.org/D2673
* ghc-cabal: Use correct name of linker flags env variableBen Gamari2016-11-101-1/+1
| | | | | | | | | | | | | | Currently passing the `CONF_LD_LINKER_OPTS_STAGE0` environment variable to `configure` is broken due to this naming inconsistency. Test Plan: Try passing `CONF_LD_LINKER_OPTS_STAGE0` to `configure`. Look at resulting stage0 ghc invocation. Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2672
* Refactor CallStack defaulting slightlySimon Peyton Jones2016-11-101-39/+35
| | | | | | | This moves call-stack defaulting from simpl_top to solveWanteds, for reasons described in Note [CallStack defaulting]. No change in visible behaviour.
* Refactoring of mkNewTypeEqnSimon Peyton Jones2016-11-101-18/+19
| | | | | | | | | The refactoring here is very small. I did it while studying Trac #12814. To implement the change in #12814, we can just un-comment the lines at line 1275. It's ready to go but I didn't want to pull the trigger in this commit
* Adapt the (commented out) pprTrace in OccurAnalSimon Peyton Jones2016-11-101-2/+3
| | | | I did this while investigating Trac #12776
* Fix comment about pointer taggingAlex Biehl2016-11-101-1/+1
| | | | | | | | | | | | | | | `Lcall` enters the closure. If it has tags we jump directly to `Lret`. Confirmed with some generated cmm code: ``` R1 = _s2pP::P64; Sp = Sp - 8; if (R1 & 7 != 0) goto c2x0; else goto c2x1; c2x1: call (I64[R1])(R1) returns to c2x0, args: 8, res: 8, upd: 8; c2x0: _s2pQ::P64 = R1; ```
* Update 8.0.2 release notes for #12784Ryan Scott2016-11-071-0/+4
| | | | | | | | | | | | | | | | | | | | | Summary: The fix for #12220 exposed some ill-typed programs which passed the typechecker in GHC 8.0.1 but now fail to typecheck in GHC 8.0.2. It's a bit difficult to characterize what exactly triggers this bug, but we at least have a minimal example and a simple fix to illustrate the problem and solution, so let's add that the the 8.0.2 release notes to advertise this change. Resolves #12784. Reviewers: rwbarton, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2682 GHC Trac Issues: #12784
* Fix hs_try_putmvar003 (#12800)Simon Marlow2016-11-071-1/+1
| | | | | | | | | | | | | | | | | | | Summary: There was a race condition on some shared data when creating the callback thread. I couldn't repro the issue without inserting a dummy usleep(100), but it's definitely a bug. Test Plan: validate Reviewers: bgamari, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2678 GHC Trac Issues: #12800
* Fix broken validate build.Tamar Christina2016-11-061-1/+1
|
* Some minor linker cleanups.Tamar Christina2016-11-063-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Just some cleanups to some oddities I've noticed while investigating a linker issue. Particularly the dll name returned by `findSysDll` was decorated. So foo.dll is returned. We make it `foo.dll.dll` and later drop one `.dll` when passed to `addDll` which expects it without extension, but still tries the name *as is* which is why it worked. This should be slightly faster, since we don't try 4 loads before we succeed. Test Plan: ./validate Reviewers: austin, hvr, erikd, simonmar, bgamari Reviewed By: bgamari Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2680
* Describe symptoms of (and the cure for) #12768 in 8.0.2 release notesRyan Scott2016-11-061-0/+17
| | | | | | | | | | | | | | GHC 8.0.2 introduced a bugfix involving GeneralizedNewtypeDeriving in 96d451450923a80b043b5314c5eaaa9d0eab7c56. This made typechecking of GND-produced code a bit stricter, and an unfortunate side effect of this was that there were a couple of corner-case programs that stopped compiling when transitioning from GHC 8.0.1 to 8.0.2. Since the number of affected programs seems quite small, and since the fix is so straightforward, we opt to simply note this discrepancy in the 8.0.2 release notes. Resolves #12768.
* Allow GeneralizedNewtypeDeriving for classes with associated type familiesRyan Scott2016-11-0620-90/+569
| | | | | | | | | | | | | | | | | | | | | | Summary: This implements the ability to derive associated type family instances for newtypes automatically using `GeneralizedNewtypeDeriving`. Refer to the users' guide additions for how this works; I essentially follow the pattern laid out in https://ghc.haskell.org/trac/ghc/ticket/8165#comment:18. Fixes #2721 and #8165. Test Plan: ./validate Reviewers: simonpj, goldfire, austin, bgamari Reviewed By: simonpj Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2636 GHC Trac Issues: #2721, #8165
* Add tracing infrastructure to pattern match checkerMatthew Pickering2016-11-065-4/+75
| | | | | | | | | | | | | | | | Summary: This is the start of some tracing infrastructure which I found useful when working through how the pattern match checker worked. It adds the flag -ddump-ec-trace in order to turn on the trace. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2658
* Stop -dno-debug-output suppressing -ddump-tc-traceMatthew Pickering2016-11-062-7/+9
| | | | | | | | | | | | | | | | | | | | | | Summary: The user manual states that -dno-debug-output should suppress *unsolicited* debugging output which essentially amounts to calls to `pprTrace`. Before I unified the interface of `traceTc` and `traceRn`, the flag suppressed calls to `traceTc` but not to `traceRn` or any other tracing function already controlled by a flag. Thus, in order to make the behaviour more uniform, it seemed best to remove this one special case. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2628 GHC Trac Issues: #12691
* Update release notes for type sigs in TH patterns patchMatthew Pickering2016-11-051-0/+2
| | | | [skip ci]
* Handle types w/ type variables in signatures inside patterns (DsMeta)Mikhail Vorozhtsov2016-11-0511-24/+101
| | | | | | | | | | | | | | | | | | The comment indicated that scoping of type variables was a large problem but Simon fixed it in e21e13fb52b99b14770cc5857df57bbcc9c85102. Thus, we can implement repP for signatures very easily in the usual way now. Reviewers: goldfire, simonpj, austin, bgamari Reviewed By: simonpj Subscribers: mpickering, simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2490 GHC Trac Issues: #12164
* Take account of injectivity when doing fundepsSimon Peyton Jones2016-11-047-33/+94
| | | | | | This fixes Trac #12803. Yikes! See Note [Care with type functions].
* Remove a debug traceSimon Peyton Jones2016-11-041-1/+0
| | | | | | I added this when debugging something else, but in general it doesn't work (with -ddump-tc-trace) because of typecking recursive groups of TyCons. So removing it again.
* Add comments from Trac #12768Simon Peyton Jones2016-11-041-0/+28
|
* Omit unnecessary linker flagsSimon Marlow2016-11-033-27/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This omits -L and -l flags from the linker command line that shouldn't be necessary because GHC will already add them via the -package-id flags we pass. This also reverts part of 90538d86af579595987826cd893828d6f379f35a that rearranges the linker command line and causes some knock-on problems (see D2618). Test Plan: validate (need to validate on Windows too) Reviewers: Phyx, bgamari, niteria, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2639 GHC Trac Issues: #12738
* API Annotations: make all ModuleName LocatedAlan Zimmerman2016-11-0312-27/+23
| | | | | | | | | | | | | | | | | | Summary: This also changes the backpack Renaming type to use a Maybe for the renameTo field, to more accurately reflect the parsed source. Updates haddock submodule to match AST changes Test Plan: ./validate Reviewers: ezyang, bgamari, austin Reviewed By: bgamari Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D2670
* Add test for #12788Ryan Scott2016-11-034-0/+36
| | | | | Commit bce99086e9f54909f51ff5a74cb8c666083bb021 (#12584) fixed #12788. Let's add a test to make sure it stays fixed.
* testsuite: Update T10858 allocationsBen Gamari2016-11-021-1/+1
|
* Merge cpe_ExprIsTrivial and exprIsTrivialBen Gamari2016-11-022-28/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Strangely my previous attempts at resolving this all seemed to end in perplexing segmentation faults in the GHC testsuite (including some rather recent attempts). Somehow this attempt miraculously works. However, there was one wrinkle that I still need to work out fully: we need to consider Lits as non-trivial in cpeArg. Failure to do this means that we would transform something like, $trModule = TrModule "HelloWorld"# into $trModule = case "HelloWorld"# of x { __DEFAULT -> TrModule x } Which then fails the consistentStgInfo check in CoreToStg for reasons that I am still trying to work out. Mark T12757 as fixed Reviewers: simonmar, simonpj, austin Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2666 GHC Trac Issues: #11158
* Add testcase for #12757Ben Gamari2016-11-023-0/+33
| | | | | | | | | | | | Test Plan: Validate, expected to fail Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2665 GHC Trac Issues: #12757
* Add notes describing SRT conceptsBen Gamari2016-11-022-1/+40
| | | | | | | | | | | | Test Plan: Read it Reviewers: austin, erikd, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2663
* Hoopl/Dataflow: make the module more self-containedMichal Terepeta2016-11-025-52/+82
| | | | | | | | | | | | | | | | | | | | | | | | | This makes the GHC's Dataflow module more self-contained by also forking the `DataflowLattice` (instead of only the analysis algorithm). Effects/benefits: - We no longer need to use the deprecated Hoopl functions (and can remove `-fno-warn-warnings-deprecations` from two modules). - We can remove the unnecessary `Label` parameter of `JoinFun` (already ignored in all our implementations). - We no longer mix Hoopl's `Dataflow` module and GHC's one. - We can replace some calls to lazy folds in Hoopl with the strict ones (see `joinOutFacts` and `mkFactBase`). Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com> Test Plan: validate Reviewers: austin, simonmar, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2660
* linker: Move ARM interworking note to SymbolExtras.cBen Gamari2016-11-022-24/+28
|
* linker: Split ELF implementation into separate source fileBen Gamari2016-11-024-1709/+1743
| | | | | | | | | | | | Test Plan: Validate Reviewers: erikd, austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2650
* linker: Split MachO implementation into new source fileBen Gamari2016-11-023-1226/+1266
| | | | | | | | | | | | Test Plan: Validate Reviewers: erikd, austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2649
* linker: Split PEi386 implementation into new source fileBen Gamari2016-11-024-1717/+1798
| | | | | | | | | | | | Test Plan: Validate Reviewers: erikd, austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2648
* Shuffle declarations into LinkerInternals.hBen Gamari2016-11-023-30/+37
| | | | | | | | | | | | | | Summary: These will be needed across source files shortly. Test Plan: Validate Reviewers: erikd, austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2647
* linker: Split symbol extras logic into new source fileBen Gamari2016-11-023-200/+240
| | | | | | | | | | | | Test Plan: Validate Reviewers: erikd, austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2646