summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rts/linker: Only mprotect GOT after it is filledwip/T16779Ben Gamari2019-06-081-2/+5
| | | | | | | | This fixes a regression, introduced by 67c422ca, where we mprotect'd the global offset table (GOT) region to PROT_READ before we had finished filling it, resulting in a linker crash. Fixes #16779.
* rts/linker: Make elf_got.c a bit more legibleBen Gamari2019-06-081-1/+10
|
* gitlab-ci: Create index.html in documentation deploymentBen Gamari2019-06-071-0/+6
| | | | | Otherwise navigating to https://ghc.gitlab.haskell.org/ghc will result in a 404.
* Hadrian: use deb9 Docker images instead of deb8 for CI jobsAlp Mestanogullari2019-06-071-3/+3
| | | | | | | This should fix #16739, where we seem to be getting extra carets in a test's output because of the gcc that ships with the deb8 image, whule we're not observing those extra carets in the deb9-based (Make) jobs.
* base: Export FinalizersBen Gamari2019-06-071-0/+1
| | | | As requested in #16750.
* Pass preprocessor options to C compiler when building foreign C files (#16737)Zejun Wu2019-06-075-4/+54
|
* remove backticks from markup - it doesn't mean what I think it meanscode5hot2019-06-071-1/+1
|
* Used terminology from a paper. Added it as a reference.code5hot2019-06-071-3/+4
|
* Update Traversable.hs with a note about an intuitive lawcode5hot2019-06-071-1/+7
|
* llvm-targets: Add x86_64 android layoutMoritz Angermann2019-06-072-1/+2
|
* Fix isValidNatural: The BigNat in NatJ# must have at least 2 limbsSimon Jakobi2019-06-076-1/+20
| | | | | | Previously the `integer-gmp` variant of `isValidNatural` would fail to detect values `<= maxBound::Word` that were incorrectly encoded using the `NatJ#` constructor.
* Hadrian: Delete target symlink in createFileLinkUntrackedBen Gamari2019-06-071-1/+4
| | | | | Previously createFileLinkUntracked would fail if the symlink already existed.
* Preserve ShadowInfo when rewriting evidenceSimon Peyton Jones2019-06-073-21/+44
| | | | | | | | | | | | | | | When the canonicaliser rewrites evidence of a Wanted, it should preserve the ShadowInfo (ctev_nosh) field. That is, a WDerive should rewrite to WDerive, and WOnly to WOnly. Previously we were unconditionally making a WDeriv, thereby rewriting WOnly to WDeriv. This bit Nick Frisby (issue #16735) in the context of his plugin, but we don't have a compact test case. The fix is simple, but does involve a bit more plumbing, to pass the old ShadowInfo around, to use when building the new Wanted.
* Factor out 'getLibDir' / 'getBaseDir' into a new GHC.BaseDir ghc-boot moduleJohn Ericson2019-06-074-55/+68
| | | | | | | | | | | | | | ghc-pkg and ghc already both needed this. I figure it is better to deduplicate, especially seeing that changes to one (FreeBSD CPP) didn't make it to the other. Additionally in !1090 I make ghc-pkg look up the settings file, which makes it use the top dir a bit more widely. If that lands, any difference in the way they find the top dir would be more noticable. That change also means sharing more code between ghc and ghc-package (namely the settings file parsing code), so I'd think it better to get off the slipperly slope of duplicating code now.
* Fix #16700: Tiny errors in output of GHCi commands :forward and :infoRoland Senn2019-06-077-3/+23
| | | | | | `:info Coercible` now outputs the correct section number of the GHCi User's guide together with the secion title. `:forward x` gives the correct syntax hint.
* Add HEAP_PROF_SAMPLE_END event to mark end of samplesMatthew Pickering2019-06-077-0/+34
| | | | | | | This allows a user to observe how long a sampling period lasts so that the time taken can be removed from the profiling output. Fixes #16697
* TmOracle: Replace negative term equalities by refutable PmAltConsSebastian Graf2019-06-0715-550/+672
| | | | | | | | | | | | | | | | | | | | | | | | | The `PmExprEq` business was a huge hack and was at the same time vastly too powerful and not powerful enough to encode negative term equalities, i.e. facts of the form "forall y. x ≁ Just y". This patch introduces the concept of 'refutable shapes': What matters for the pattern match checker is being able to encode knowledge of the kind "x can no longer be the literal 5". We encode this knowledge in a `PmRefutEnv`, mapping a set of newly introduced `PmAltCon`s (which are just `PmLit`s at the moment) to each variable denoting above inequalities. So, say we have `x ≁ 42 ∈ refuts` in the term oracle context and try to solve an equality like `x ~ 42`. The entry in the refutable environment will immediately lead to a contradiction. This machinery renders the whole `PmExprEq` and `ComplexEq` business unnecessary, getting rid of a lot of (mostly dead) code. See the Note [Refutable shapes] in TmOracle for a place to start. Metric Decrease: T11195
* [skip ci] Improve the documentation of the CNF primops. In this context, the ↵Andrew Martin2019-06-071-23/+40
| | | | term "size" is ambiguous and is now avoided. Additionally, the distinction between a CNF and the blocks that comprise it has been emphasize. The vocabulary has been made more consistent with the vocabulary in the C source for CNF.
* gitlab-ci: Disable darwin hadrian jobMatthew Pickering2019-06-071-1/+2
| | | | | | | | See #16771 We don't have enough capacity for the two jobs currently. [skip ci]
* Hadrian: profiling and debug enabled ways support -eventlog tooAlp Mestanogullari2019-06-041-1/+3
|
* make: Fix bindist installationBen Gamari2019-06-042-6/+5
| | | | | This fixes a few vestigial references to `settings` left over from !655. Fixes #16715.
* gitlab-ci: Run bindisttest during CIBen Gamari2019-06-041-0/+3
|
* Add GHCi :instances commandXavier Denis2019-06-0412-6/+314
| | | | | | | | | | | This commit adds the `:instances` command to ghci following proosal number 41. This makes it possible to query which instances are available to a given type. The output of this command is all the possible instances with type variables and constraints instantiated.
* Hadrian: fix OSX build failure and add an OSX/Hadrian CI jobAlp Mestanogullari2019-06-042-1/+41
| | | | | | | The OSX build failure introduced in 3aa71a22 was due to a change in the glob we use to collect libffi shared libraries in hadrian/src/Rules/Libffi.hs. This commit fixes the problem and adds an OSX CI job that builds GHC with Hadrian, to make sure we don't break it again.
* Use a better strategy for determining the offset applied to foreign function ↵Andrew Martin2019-06-0423-45/+443
| | | | arguments that have an unlifted boxed type. We used to use the type of the argument. We now use the type of the foreign function. Add a test to confirm that the roundtrip conversion between an unlifted boxed type and Any is sound in the presence of a foreign function call.
* TestRunner: Added --chart to display a chart of performance testsDavid Eichmann2019-06-045-124/+354
| | | | | | | | | | | | | This uses the Chart.js javascript library. Everything is put into a standalone .html file and opened with the default browser. I also simplified the text output to use the same data as the chart. You can now use a commit range with git's ".." syntax. The --ci option will use results from CI (you'll need to fetch them first): $ git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/ci/perf $ python3 testsuite/driver/perf_notes.py --ci --chart --test-env x86_64-darwin --test-name T9630 master~500..master
* gitlab-ci: Use GHC 8.6.5 for Windows CI buildsBen Gamari2019-06-021-3/+3
|
* Add `-haddock` to prepare-system.sh and .gitlab-ci.ymlTakenobu Tani2019-06-023-1/+3
| | | | | | To cover ci conditions from ghc8.6 to 8.9, I add `-haddock` option to `.circleci/prepare-system.sh` and .gitlab-ci.yml. after including `mk/flavours/*`.
* Add `-haddock` to perf.mk rather than prepare-system.shTakenobu Tani2019-06-022-2/+1
| | | | | | | | | | To cover ci conditions from ghc8.6 to 8.9, I add `-haddock` option to `mk/flavours/perf.mk` rather than `.circleci/prepare-system.sh`. Because in windows condition of ghc-8.9, `mk/flavours/*` is included after `prepare-system.sh`. In addition, in linux condition of ghc-8.6, `mk/flavors/perf.mk` is used.
* Add `-haddock` option under ci condition to fix #16415Takenobu Tani2019-06-021-0/+1
| | | | | | | | | | | | | | In order to use the `:doc` command in ghci, it is necessary to compile for core libraries with `-haddock` option. Especially, the `-haddock` option is essential for release building. Note: * The `-haddock` option may affect compile time and binary size. * But hadrian has already set `-haddock` as the default. * This patch affects the make-based building. This patch has been split from !532.
* rts: Remove unused decls from CNF.hÖmer Sinan Ağacan2019-06-011-3/+0
|
* Fix rewriting invalid shifts to errorsÖmer Sinan Ağacan2019-06-016-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #16449. 5341edf3 removed a code in rewrite rules for bit shifts, which broke the "silly shift guard", causing generating invalid bit shifts or heap overflow in compile time while trying to evaluate those invalid bit shifts. The "guard" is explained in Note [Guarding against silly shifts] in PrelRules.hs. More specifically, this was the breaking change: --- a/compiler/prelude/PrelRules.hs +++ b/compiler/prelude/PrelRules.hs @@ -474,12 +474,11 @@ shiftRule shift_op ; case e1 of _ | shift_len == 0 -> return e1 - | shift_len < 0 || wordSizeInBits dflags < shift_len - -> return (mkRuntimeErrorApp rUNTIME_ERROR_ID wordPrimTy - ("Bad shift length" ++ show shift_len)) This patch reverts this change. Two new tests added: - T16449_1: The original reproducer in #16449. This was previously casing a heap overflow in compile time when CmmOpt tries to evaluate the large (invalid) bit shift in compile time, using `Integer` as the result type. Now it builds as expected. We now generate an error for the shift as expected. - T16449_2: Tests code generator for large (invalid) bit shifts.
* Fix space leaks in dynLoadObjs (#16708)Ryan Scott2019-05-311-7/+7
| | | | | | | | | | | When running the test suite on a GHC built with the `quick` build flavour, `-fghci-leak-check` noticed some space leaks. Careful investigation led to `Linker.dynLoadObjs` being the culprit. Pattern-matching on `PeristentLinkerState` and a dash of `$!` were sufficient to fix the issue. (ht to mpickering for his suggestions, which were crucial to discovering a fix) Fixes #16708.
* Reject nested foralls in foreign imports (#16702)Ryan Scott2019-05-315-9/+85
| | | | | | | | This replaces a panic observed in #16702 with a simple error message stating that nested `forall`s simply aren't allowed in the type signature of a `foreign import` (at least, not at present). Fixes #16702.
* Improve ThreadId Show instanceNathan Collins2019-05-311-2/+2
| | | | By making it include parens when a derived instance would. For example, this changes the (hypothetical) code `show (Just (ThreadId 3))` to produce `"Just (ThreadId 3)"` instead of the current `"Just ThreadId 3"`.
* Fix and enforce validation of header for .hie filesZubin Duggal2019-05-316-28/+134
| | | | | | | | | | Implements #16686 The files version is automatically generated from the current GHC version in the same manner as normal interface files. This means that clients can first read the version and then decide how to read the rest of the file.
* Implement (Functor.<$) for Data.Functor.{Compose,Product,Sum}Simon Jakobi2019-05-313-0/+5
| | | | | This allows us to make use of the (<$) implementations of the underlying functors.
* Implement (Functor.<$) for ArraySimon Jakobi2019-05-311-0/+9
|
* Put COMPLETE sigs into ModDetails with -fno-code (#16682)Ryan Scott2019-05-314-14/+30
| | | | | | | | | `mkBootModDetailsTc`, which creates a special `ModDetails` when `-fno-code` is enabled, was not properly filling in the `COMPLETE` signatures from the `TcGblEnv`, resulting in incorrect pattern-match coverage warnings. Easily fixed. Fixes #16682.
* Fix arity type of coerced types in CoreArityÖmer Sinan Ağacan2019-05-314-2/+57
| | | | | | | | | | | | | | | | | | | | | Previously if we had f |> co where `f` had arity type `ABot N` and `co` had arity M and M < N, `arityType` would return `ABot M` which is wrong, because `f` is only known to diverge when applied to `N` args, as described in Note [ArityType]: If at = ABot n, then (f x1..xn) definitely diverges. Partial applications to fewer than n args may *or may not* diverge. This caused incorrect eta expansion in the simplifier, causing #16066. We now return `ATop M` for the same expression so the simplifier can't assume partial applications of `f |> co` is divergent. A regression test T16066 is also added.
* Remove unused RTS function 'unmark'Ömer Sinan Ağacan2019-05-311-10/+0
|
* Expose doCppNeil Mitchell2019-05-311-0/+1
|
* support small arrays and CONSTR_NOCAF in ghc-heapDavid Hewson2019-05-313-0/+27
|
* Use types already in AST when making .hie fileMatthew Pickering2019-05-312-1/+3
| | | | | | | These were meant to be added in !214 but for some reason wasn't included in the patch. Update Haddock submodule for new Types.hs hyperlinker output
* powerpc32: fix stack allocation code generationSergei Trofimovich2019-05-311-1/+1
| | | | | | | | | | | | | | | | When ghc was built for powerpc32 built failed as: It's a fallout of commit 3f46cffcc2850e68405a1 ("PPC NCG: Refactor stack allocation code") where word size used to be II32/II64 and changed to II8/panic "no width for given number of bytes" widthFromBytes ((platformWordSize platform) `quot` 8) The change restores initial behaviour by removing extra division. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* powerpc32: fix 64-bit comparison (#16465)Sergei Trofimovich2019-05-311-0/+1
| | | | | | | | | | | | | | | | | | On powerpc32 64-bit comparison code generated dangling target labels. This caused ghc build failure as: $ ./configure --target=powerpc-unknown-linux-gnu && make ... SCCs aren't in reverse dependent order bad blockId n3U This happened because condIntCode' in PPC codegen generated label name but did not place the label into `cmp_lo` code block. The change adds the `cmp_lo` label into the case of negative comparison. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Update `$(TOP)/*.md` documentsTakenobu Tani2019-05-314-35/+36
| | | | | | | | | | | | | | | | | | | | | | | | | I updated the top documents to the latest status: - HACKING.md: - Modify Phabricator to GitLab infomation - Remove old Trac information - Add link to GitLab activity - MAKEHELP.md: - Add link to hadrian wiki - Fix markdown format - INSTALL.md: - Modify boot command to remove python3 - Fix markdown format - README.md: - Modify tarball file suffix - Fix markdown format I checked the page display on the GitHub and GitLab web. [skip ci]
* Eventlog: Document the fact timestamps are nanosecondsMatthew Pickering2019-05-311-0/+4
| | | | [skip ci]
* testsuite: Compile T9630 with +RTS -G1Ben Gamari2019-05-301-1/+4
| | | | | For the reasons described in Note [residency] we run programs with -G1 when we care about the max_bytes_used metric.
* Improve targetContents code docsDaniel Gröber2019-05-303-6/+9
|