summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* PPC NCG: Rename constructorswip/T15916Peter Trommler2019-01-151-28/+29
| | | | | Rename constructors in calling convention data type to reflect the fact that they represent an ELF ABI not only a Linux ABI.
* Fix tab and improve whitespacePeter Trommler2019-01-151-7/+8
|
* PPC NCG: Register definitions for all 64-bit systemsPeter Trommler2019-01-151-7/+3
|
* PPC NCG: GOT declaration for all 64-bit ELF systemsPeter Trommler2019-01-151-5/+3
|
* PPC NCG: Make `stackHeaderSize` more generalPeter Trommler2019-01-151-7/+6
|
* PPC NCG: Make calling convention more generalPeter Trommler2019-01-151-6/+5
| | | | | All operating systems except AIX and Darwin follow the ELF specification.
* RTS: Use ELF v1 convention on all powerpc64 systemsPeter Trommler2019-01-151-5/+0
|
* Fix #16114 by adding a validity check to rnClsInstDeclRyan Scott2019-01-156-27/+35
|
* gitlab-ci: Cleanup Windows buildsBen Gamari2019-01-141-0/+30
| | | | See Note [Cleanup on Windows].
* Document the Shake Lint feature.Andrey Mokhov2019-01-141-0/+5
|
* Clarify when to follow the instructions in doc/windows.md.Andrey Mokhov2019-01-141-4/+8
| | | | See https://gitlab.haskell.org/ghc/ghc/merge_requests/100#note_2349.
* Hadrian: Update README.mdAndrey Mokhov2019-01-141-90/+91
| | | | | | | * Update or remove a few outdated paragraphs * Use consistent naming (e.g. "Stage1" instead of occasionally "stage1") * Rewrite acknowledgements * Some more minor revisions
* testsuite: Show both test name and way in JUnit outputBen Gamari2019-01-141-6/+6
|
* Update `Cabal` submoduleHerbert Valerio Riedel2019-01-147-181/+158
| | | | | | | This also requires adapting `ghc-pkg` to use the new Cabal parsing API as the old ReadP-based one has finally been evicted for good. Hadrian bit finished by: Ben Gamari <ben@smart-cactus.org>
* rts: Use always-available locking operations in pthread Itimer implementationBen Gamari2019-01-141-6/+6
| | | | | | Previously we ACQUIRE_LOCK and RELEASE_LOCK but these compile to a noop in the non-threaded RTS, as noted in #16150. Use OS_ACQUIRE_LOCK and OS_RELEASE_LOCK instead.
* itimer: Don't free condvar until we know ticker is stoppedBen Gamari2019-01-141-2/+2
| | | | | | | | | | | When we are shutting down the pthread ticker we signal the start_cond condition variable to ensure that the ticker thread wakes up and exits in a reasonable amount of time. Previously, when the ticker thread would shut down it was responsible for freeing the start_cond condition variable. However, this would lead to a race wherein the ticker would free start_cond, then the main thread would try to signal it in an effort to wake the ticker (#16150). Avoid this by moving the mutex destruction to the main thread.
* PPC NCG: Reduce memory consumption emitting string literalsPeter Trommler2019-01-134-66/+55
|
* Refactor GHCi UI to fix #11606, #12091, #15721, #16096Ömer Sinan Ağacan2019-01-1316-76/+246
| | | | | | | | | | | | | Instead of parsing and executing a statement or declaration directly we now parse them first and then execute in a separate step. This gives us the flexibility to inspect the parsed declaration before execution. Using this we now inspect parsed declarations, and if it's a single declaration of form `x = y` we execute it as `let x = y` instead, fixing a ton of problems caused by poor declaration support in GHCi. To avoid any users of the modules I left `execStmt` and `runDecls` unchanged and added `execStmt'` and `runDecls'` which work on parsed statements/declarations.
* Fix checkPtrInArenaÖmer Sinan Ağacan2019-01-131-2/+11
| | | | (See comments)
* Don't invoke dataConSrcToImplBang on newtypesRyan Scott2019-01-123-7/+55
|
* Fix negative mutator time in GC stats in prof buildsÖmer Sinan Ağacan2019-01-126-49/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because garbage collector calls `retainerProfile()` and `heapCensus()`, GC times normally include some of PROF times too. To fix this we have these lines: // heapCensus() is called by the GC, so RP and HC time are // included in the GC stats. We therefore subtract them to // obtain the actual GC cpu time. stats.gc_cpu_ns -= prof_cpu; stats.gc_elapsed_ns -= prof_elapsed; These variables are later used for calculating GC time excluding the final GC (which should be attributed to EXIT). exit_gc_elapsed = stats.gc_elapsed_ns - start_exit_gc_elapsed; The problem is if we subtract PROF times from `gc_elapsed_ns` and then subtract `start_exit_gc_elapsed` from the result, we end up subtracting PROF times twice, because `start_exit_gc_elapsed` also includes PROF times. We now subtract PROF times from GC after the calculations for EXIT and MUT times. The existing assertion that checks INIT + MUT + GC + EXIT = TOTAL now holds. When we subtract PROF numbers from GC, and a new assertion INIT + MUT + GC + PROF + EXIT = TOTAL also holds. Fixes #15897. New assertions added in this commit also revealed #16102, which is also fixed by this commit.
* Fix raiseAsync() UNDERFLOW_FRAME handling in profiling runtimeÖmer Sinan Ağacan2019-01-122-8/+8
| | | | | | | UNDERFLOW_FRAMEs don't have profiling headers so we have to use the AP_STACK's function's CCS as the new frame's CCS. Fixes one of the many bugs caught by concprog001 (#15508).
* Documentation and refactoring in CCS related codeÖmer Sinan Ağacan2019-01-124-69/+56
| | | | | | | | | - Remove REGISTER_CC and REGISTER_CCS macros, add functions registerCC and registerCCS to Profiling.c. - Reduce scope of symbols: CC_LIST, CCS_LIST, CC_ID, CCS_ID - Document CC_LIST and CCS_LIST
* More minor comment improvementsRichard Eisenberg2019-01-112-12/+8
| | | | [skip ci]
* Run typed splices in the zonkerMatthew Pickering2019-01-1113-44/+209
| | | | | | | | | | | | | | | | | Summary: This fixes #15471 In the typechecker we check that the splice has the right type but we crucially don't zonk the generated expression. This is because we might end up unifying type variables from outer scopes later on. Reviewers: simonpj, goldfire, bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15471 Differential Revision: https://phabricator.haskell.org/D5286
* Implement a sanity check for CCS fields in profiling buildsÖmer Sinan Ağacan2019-01-105-0/+44
| | | | | This helped me debug one of the bugs in #15508. I'm not sure if this is a good idea, but it worked for me, so wanted to submit this as a MR.
* Hadrian: Add support for building stage3Matthew Pickering2019-01-0919-101/+130
| | | | | | | | | | | | | | | | This ticket enables the building of a `stage3` compiler by making the build logic more consistent and predictable in Hadrian. Two of the main changes are: 1. In order to build anything at stageN we use the package database present at stageN. Fixing #16069 2. `haddock` and `ghc-tags` are built as stage1 executables (with the stage1 compiler) rather than as stage2 compiler. Fixing [hadrian#661](https://github.com/snowleopard/hadrian/issues/661) In order to build a stage3 compiler, you have to set the new `finalStage` hadrian option to `Stage3`.
* Be pickier about unsaturated synonyms in :kindRyan Scott2019-01-087-11/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We currently permit any and all uses of unsaturated type synonyms and type families in GHCi's `:kind` command, which allows strange interactions like this one: ``` > :set -XTypeFamilies -XPolyKinds > type family Id (a :: k) > type instance Id a = a > type Foo x = Maybe > :kind! Id Foo ``` This is probably a stretch too far, so this patch moves to disallow unsaturated synonyms that aren't at the top level (we still want to allow `:kind Id`, for instance). We do this by augmenting `GhciCtxt` with an additional `Bool` field to indicate if we are at the outermost level of the type being passed to `:kind` or not. See `Note [Unsaturated type synonyms in GHCi]` in `TcValidity` for the full story. Test Plan: make test TEST=T16013 Reviewers: goldfire, bgamari Reviewed By: goldfire Subscribers: simonpj, goldfire, rwbarton, carter GHC Trac Issues: #16013 Differential Revision: https://phabricator.haskell.org/D5471
* Check that libs found by GCC aren't foldersAlec Theriault2019-01-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We use 'gcc -B<base-location> --print-file-name mylib.a' as a way of checking if 'gcc' can discover 'mylib.a' at the given location. However, this can break down if there is a folder caller 'mylib.a' that 'gcc' can discover. We can guard against this by explicitly checking that the path returned by 'gcc' is a file. This may seem like a far-fetched scenario, but since 3d17f1f10fc00540ac052f2fd03182906aa47e35, we look for libraries without any prefix or suffix (ie. 'extra-libraries: softfloat', we look for just 'softfloat' as well as 'softloat.a', 'softfloat.dll.a', etc.) which means that there might actusally be a folder of that name in one of the base locations. Reviewers: Phyx, bgamari, hvr, angerman Reviewed By: Phyx, angerman Subscribers: angerman, rwbarton, carter GHC Trac Issues: #16063 Differential Revision: https://phabricator.haskell.org/D5462
* fix-submodules: Rip out typingBen Gamari2019-01-071-3/+2
| | | | Debian Jessie only runs Python 3.4, whereas typing was introduced in Python 3.5.
* gitlab-ci: Clone haddock from its upstream repositoryBen Gamari2019-01-072-2/+48
| | | | This ensures that changes requiring haddock changes can be built under CI.
* Hadrian: merge sections in profiling _p.a to .p_o for ghciZejun Wu2019-01-064-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the hadrain version of {D5169} * We build squashed .o and .p_o for ghci when `dynamicGhcPrograms` is `False` * We no longer build them for rts as ghci never loads it we need https://github.com/haskell/cabal/pull/5592 for cabal to copy the built `.p_o` file. Test Plan: ``` $ grep dynamicGhc hadrian/UserSettings.hs , dynamicGhcPrograms = return False $ touch ... $ hadrian/build.sh --flavour=user -j --digest-or $ find _build/stage1/libraries/ -name 'HS*-*.*o' | wc 62 62 3664 ``` ``` $ grep -C3 dynamicGhc hadrian/UserSettings.hs userFlavour :: Flavour userFlavour = performanceFlavour { name = "user" , dynamicGhcPrograms = return False } $ hadrian/build.sh -j --flavour=user test --verbose Unexpected results from: TEST="T3807 T9208 T9293 annth_make ghci057 haddock.Cabal haddock.base haddock.compiler" SUMMARY for test run started at Wed Dec 5 17:45:39 2018 PST 0:03:16 spent to go through 6708 total tests, which gave rise to 26015 test cases, of which 19290 were skipped 29 had missing libraries 6600 expected passes 88 expected failures 3 caused framework failures 0 caused framework warnings 1 unexpected passes 7 unexpected failures 0 unexpected stat failures $ find _build -name 'HSbase*.*o' _build/stage1/lib/x86_64-linux-ghc-8.7.20181204/base-4.12.0.0/HSbase-4.1 2.0.0.o _build/stage1/lib/x86_64-linux-ghc-8.7.20181204/base-4.12.0.0/HSbase-4.1 2.0.0.p_o _build/stage1/libraries/base/build/HSbase-4.12.0.0.o _build/stage1/libraries/base/build/HSbase-4.12.0.0.p_o ``` Reviewers: bgamari, simonmar, snowleopard Reviewed By: snowleopard Subscribers: alpmestan, rwbarton, carter GHC Trac Issues: #15779 Differential Revision: https://phabricator.haskell.org/D5270
* Fix #16133 by checking for TypeApplications in rnExprRyan Scott2019-01-067-9/+38
|
* Fix bindist for ghci libraryZejun Wu2019-01-062-6/+9
| | | | | | | | | | | | | | | | | | | | Summary: https://phabricator.haskell.org/D5169 built libghci for both vanilla way and profiling way. We need to include both in the bindist list so they will be installed. Test Plan: ``` $ grep '^BuildFlavour' mk/build.mk BuildFlavour=perf $ make test_bindist $ grep HSghc-prim bindist-list.uniq ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.o ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/HSghc-prim-0.5.3.p_o ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3.a ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3-ghc8.7.20190101.so ghc-8.7.20190101/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.5.3_p.a ```
* make: Silence some xelatex outputBen Gamari2019-01-061-4/+9
| | | | | | | | | | Currently build logs from GitLab CI around around 7 megabytes each. Of this, around 2 megabytes is latex output. This is quite silly as essentially all of this output is unresolved references in the early latex iterations. Here we silence this output. However, to make sure that we don't silence errors we allow each xelatex invocation besides the last to fail.
* Remove OPTIONS_HADDOCK hide in favour for not-homeAdam Sandberg Eriksson2019-01-0649-49/+49
| | | | GHC Trac Issues: #15447
* gitlab-ci: Try reenabling PDF documentation on DarwinBen Gamari2019-01-061-2/+0
| | | | Carter says that the builder issues have now been sorted.
* Add entry for #16031 to base/changelog.mdSven Tennie2019-01-061-0/+5
|
* Fix precedence handling for Data.Fixed's Show instance (#16031)Sven Tennie2019-01-063-1/+9
| | | | | Use `showsPrec` instead of `show` to respect the precedence of the surrounding context.
* Add -Wmissing-deriving-strategieschessai2019-01-0613-1/+96
| | | | | | | | | | | | | | | Warn users when -XDerivingStrategies is enabled but not used, at each potential use site. add -Wmissing-deriving-strategies Reviewers: bgamari, RyanGlScott Subscribers: andrewthad, rwbarton, carter GHC Trac Issues: #15798 Differential Revision: https://phabricator.haskell.org/D5451
* Respect prompt in GhciSettingsZejun Wu2019-01-061-2/+2
| | | | | | | | Summary: This was broken when PromptFunction was introduced that the settings are ignored and default values are always used. Test Plan: ./validate
* Fix broken links (#16125)Sven Tennie2019-01-051-6/+7
|
* Dump Cmm with -ddump-cmm when building .cmm filesÖmer Sinan Ağacan2019-01-051-0/+1
| | | | Fixes #16131
* Mark GHC.Maybe as not-home for haddockSimon Jakobi2019-01-041-0/+1
| | | | | Previously haddock would link 'Maybe' to GHC.Maybe. Now it links to Data.Maybe.
* Fix some typos, etc., in comments.Richard Eisenberg2019-01-032-6/+9
| | | | [ci skip]
* Visible kind applicationmynguyen2019-01-03141-1204/+3059
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements visible kind application (GHC Proposal 15/#12045), as well as #15360 and #15362. It also refactors unnamed wildcard handling, and requires that type equations in type families in Template Haskell be written with full type on lhs. PartialTypeSignatures are on and warnings are off automatically with visible kind application, just like in term-level. There are a few remaining issues with this patch, as documented in ticket #16082. Includes a submodule update for Haddock. Test Plan: Tests T12045a/b/c/TH1/TH2, T15362, T15592a Reviewers: simonpj, goldfire, bgamari, alanz, RyanGlScott, Iceland_jack Subscribers: ningning, Iceland_jack, RyanGlScott, int-index, rwbarton, mpickering, carter GHC Trac Issues: `#12045`, `#15362`, `#15592`, `#15788`, `#15793`, `#15795`, `#15797`, `#15799`, `#15801`, `#15807`, `#15816` Differential Revision: https://phabricator.haskell.org/D5229
* Minor refactoring and documentation in profiling RTS codeÖmer Sinan Ağacan2019-01-032-46/+29
|
* stg-spec: Modify `.lhs` to `.hs`Takenobu Tani2019-01-031-10/+10
| | | | | | | | | | Modify old filename `.lhs` to `.hs` in the following file: * docs/stg-spec/StgSyn.ott Since PDF has not been registered in the past, I have not committed generated PDF(`stg-spec.pdf`). [ci skip]
* core-spec: Modify `.lhs` to `.hs` (generated PDF)Takenobu Tani2019-01-021-0/+0
| | | | | | | | Modify old filename `.lhs` to `.hs` in following file: * docs/core-spec/core-spec.pdf (generated PDF) [ci skip]
* core-spec: Modify `.lhs` to `.hs` (source files)Takenobu Tani2019-01-024-80/+80
| | | | | | | | | | | Modify old filename `.lhs` to `.hs` in following files: * docs/core-spec/README * docs/core-spec/CoreLint.ott * docs/core-spec/CoreSyn.ott * docs/core-spec/core-spec.mng [ci skip]