summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add lexerDbg to dump the tokens fed to the parserwip/lexer-dbgVladislav Zavialov2020-01-022-2/+10
| | | | | This a small utility function that comes in handy when debugging the lexer and the parser.
* Tweak Cmm dumps to avoid generating sections for empty groupsÖmer Sinan Ağacan2019-12-311-15/+20
| | | | | | | | | | When dumping Cmm groups check if the group is empty, to avoid generating empty sections in dump files like ==================== Output Cmm ==================== [] Also fixes a few bad indentation in the code around changes.
* Fix some sloppy indentationKevin Buhr2019-12-311-3/+3
|
* Add additional Note explaining the -Iw flagKevin Buhr2019-12-311-2/+49
|
* Add "-Iw" RTS flag for minimum wait between idle GCs (#11134)Kevin Buhr2019-12-314-20/+63
|
* Testsuite: update some Haddock testsVladislav Zavialov2019-12-3112-8/+60
| | | | | | | | | | | | Fixed tests: * haddockA039: added to all.T * haddockE004: replaced with T17561 (marked as expect_broken) New tests: * haddockA040: deriving clause for a data instance * haddockA041: haddock and CPP #include
* Module hierarchy (#13009): StgSylvain Henry2019-12-3146-228/+226
|
* testsuite: Enlarge acceptance window for T1969Ben Gamari2019-12-301-1/+1
| | | | | | | | As noted in #17624, it's quite unstable, especially, for some reason, on i386 and armv7 (something about 32-bit platforms perhaps?). Metric Increase: T1969
* perf_notes: Add --zero-y argumentBen Gamari2019-12-301-12/+25
| | | | | This makes it easier to see the true magnitude of fluctuations. Also do some house-keeping in the argument parsing department.
* TcIface: Fix inverted logic in typechecking of source ticksBen Gamari2019-12-301-1/+1
| | | | | | | | | | | | | Previously we would throw away source ticks when the debug level was non-zero. This is precisely the opposite of what was intended. Fixes #17616. Metric Decrease: T13056 T9020 T9961 T12425
* hadrian: Track hash of Cabal Setup builder argumentsBen Gamari2019-12-301-1/+6
| | | | Lest we fail to rebuild when they change. Fixes #17611.
* testsuite: Disable derefnull when built with LLVMBen Gamari2019-12-301-4/+4
| | | | | | LLVM does not guarantee any particular semantics when dereferencing null pointers. Consequently, this test actually passes when built with the LLVM backend.
* rts: Fix --debug-numa mode under DockerBen Gamari2019-12-302-0/+3
| | | | | | | | | As noted in #17606, Docker disallows the get_mempolicy syscall by default. This caused numerous tests to fail under CI in the `debug_numa` way. Avoid this by disabling the NUMA probing logic when --debug-numa is in use, instead setting n_numa_nodes in RtsFlags.c. Fixes #17606.
* rts: Error on invalid --numa flagsBen Gamari2019-12-301-1/+6
| | | | | Previously things like `+RTS --numa-debug` would enable NUMA support, despite being an invalid flag.
* llvmGen: Drop old fix for #11649Ben Gamari2019-12-301-36/+1
| | | | | This was a hack which is no longer necessary now since we introduce a dedicated entry block for each procedure.
* llvmGen: Ensure that entry labels don't have predecessorsBen Gamari2019-12-301-7/+14
| | | | | | | | | | The LLVM IR forbids the entry label of a procedure from having any predecessors. In the case of a simple looping function the LLVM code generator broke this invariant, as noted in #17589. Fix this by moving the function prologue to its own basic block, as suggested by @kavon in #11649. Fixes #11649 and #17589.
* rts: Ensure that nonmoving gc isn't used with profilingBen Gamari2019-12-302-2/+7
|
* driver: Include debug level in the recompilation check hashBen Gamari2019-12-305-1/+19
| | | | Fixes #17586.
* use shell variable CcLlvmBackend for testGabor Greif2019-12-271-1/+1
| | | Previously we used `AC_DEFINE`d variable `CC_LLVM_BACKEND` which has an empty shell expansion.
* testsuite: Mark cgrun057 as fragile on ARMBen Gamari2019-12-271-0/+1
| | | | | As reported in #17554. Only marking on ARM for now although there is evidence to suggest that the issue may occur on other platforms as well.
* while at it rename XCode to the official XcodeGabor Greif2019-12-274-17/+17
|
* suppress popup dialog about missing Xcode at configureGabor Greif2019-12-271-1/+1
| | | | tested with `bash` and `zsh`.
* testsuite: Skip T17499 when built against integer-simpleBen Gamari2019-12-271-1/+3
| | | | Since it routinely times out in CI.
* Replace panic/notHandled with noExtCon in DsMetaRyan Scott2019-12-261-35/+42
| | | | | | | There are many spots in `DsMeta` where `panic` or `notHandled` is used after pattern-matching on a TTG extension constructor. This is overkill, however, as using `noExtCon` would work just as well. This patch switches out these panics for `noExtCon`.
* Minor refactor in ghc.cabal.in:Ömer Sinan Ağacan2019-12-263-15/+3
| | | | | | - Remove outdated comments - Move cutils.c from parser to cbits - Remove unused cutils.h
* Fix comment about minimal gcc versionGabor Greif2019-12-251-1/+1
| | | to be consistent what FP_GCC_VERSION requires
* Fix copy-paste error in commentGabor Greif2019-12-251-1/+1
|
* Switch to ReadTheDocs theme for the user-guideSylvain Henry2019-12-2528-53/+3294
|
* Remove outdated commentSylvain Henry2019-12-241-4/+2
|
* fixup! Fix endian handling w.r.t. CPP macro WORDS_BIGENDIANStefan Schulze Frielinghaus2019-12-243-3/+3
|
* Fix endian handling w.r.t. CPP macro WORDS_BIGENDIANStefan Schulze Frielinghaus2019-12-243-0/+10
| | | | | | Include header file `ghcautoconf.h` where the CPP macro `WORDS_BIGENDIAN` is defined. This finally fixes #17337 (in conjunction with commit 6c59cc71dc).
* lookupBindGroupOcc: recommend names in the same namespace (#17593)Ryan Scott2019-12-206-9/+35
| | | | | | | | | | | Previously, `lookupBindGroupOcc`'s error message would recommend all similar names in scope, regardless of whether they were type constructors, data constructors, or functions, leading to the confusion witnessed in #17593. This is easily fixed by only recommending names in the same namespace, using the `nameSpacesRelated` function. Fixes #17593.
* Deduplicate copied monad failure handler codeJohn Ericson2019-12-203-26/+12
|
* Handle large ARR_WORDS in heap census (fix #17572)Sylvain Henry2019-12-194-0/+35
| | | | | | | | We can do a heap census with a non-profiling RTS. With a non-profiling RTS we don't zero superfluous bytes of shrunk arrays hence a need to handle the case specifically to avoid a crash. Revert part of a586b33f8e8ad60b5c5ef3501c89e9b71794bbed
* Avoid race condition in hDuplicateToMoritz Kiefer2019-12-191-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In our codebase we have some code along the lines of ``` newStdout <- hDuplicate stdout stderr `hDuplicateTo` stdout ``` to avoid stray `putStrLn`s from corrupting a protocol (LSP) that is run over stdout. On CI we have seen a bunch of issues where `dup2` returned `EBUSY` so this fails with `ResourceExhausted` in Haskell. I’ve spent some time looking at the docs for `dup2` and the code in `base` and afaict the following race condition is being triggered here: 1. The user calls `hDuplicateTo stderr stdout`. 2. `hDuplicateTo` calls `hClose_help stdout_`, this closes the file handle for stdout. 3. The file handle for stdout is now free, so another thread allocating a file might get stdout. 4. If `dup2` is called while `stdout` (now pointing to something else) is half-open, it returns EBUSY. I think there might actually be an even worse case where `dup2` is run after FD 1 is fully open again. In that case, you will end up not just redirecting the original stdout to stderr but also the whatever resulted in that file handle being allocated. As far as I can tell, `dup2` takes care of closing the file handle itself so there is no reason to do this in `hDuplicateTo`. So this PR replaces the call to `hClose_help` by the only part of `hClose_help` that we actually care about, namely, `flushWriteBuffer`. I tested this on our codebase fairly extensively and haven’t been able to reproduce the issue with this patch.
* Add GHC-API logging hooksSylvain Henry2019-12-1837-193/+323
| | | | | | | | | | | | | | | | | | | | | | | * Add 'dumpAction' hook to DynFlags. It allows GHC API users to catch dumped intermediate codes and information. The format of the dump (Core, Stg, raw text, etc.) is now reported allowing easier automatic handling. * Add 'traceAction' hook to DynFlags. Some dumps go through the trace mechanism (for instance unfoldings that have been considered for inlining). This is problematic because: 1) dumps aren't written into files even with -ddump-to-file on 2) dumps are written on stdout even with GHC API 3) in this specific case, dumping depends on unsafe globally stored DynFlags which is bad for GHC API users We introduce 'traceAction' hook which allows GHC API to catch those traces and to avoid using globally stored DynFlags. * Avoid dumping empty logs via dumpAction/traceAction (but still write empty files to keep the existing behavior)
* Use *Mode suffix instead of *MJosh Meredith2019-12-173-17/+17
|
* Rename SphinxMode constructorsJosh Meredith2019-12-173-18/+18
|
* Fix ambiguous occurence error when building HadrianJosh Meredith2019-12-171-1/+1
|
* testsuite: Mark print002 as fragile on ARMBen Gamari2019-12-171-1/+1
| | | | | | | | | Due to #17557. Also accepting spurious performance change. Metric Decrease: T1969
* Revert "testsuite: Mark cgrun057 as broken on ARMv7"Ben Gamari2019-12-171-1/+0
| | | | This reverts commit 6cfc47ec8a478e1751cb3e7338954da1853c3996.
* gitlab-ci: Don't allow armv7 jobs to failBen Gamari2019-12-171-1/+0
|
* testsuite: Mark T5435_* tests as broken on ARMBen Gamari2019-12-171-6/+16
| | | | | `T5435_v_asm_a`, `T5435_v_asm_b`, and `T5435_v_gcc` all fail on ARMv7. See #17559.
* testsuite: Make ghc_built_by_llvm check more preciseBen Gamari2019-12-173-11/+11
| | | | | | | | | | Previously it would hackily look at the flavour name to determine whether LLVM was used to build stage2 ghc. However, this didn't work at all with Hadrian and would miss cases like ARM where we use the LLVM backend by default. See #16087 for the motivation for why ghc_built_by_llvm is needed at all. This should catch one of the ARMv7 failures described in #17555.
* testsuite: Mark T14028 as broken on ARMv7Ben Gamari2019-12-171-0/+1
| | | | Due to #17558.
* testsuite: Mark T13825-debugger as broken on ARMv7Ben Gamari2019-12-171-1/+3
| | | | Due to #17557.
* testsuite: Mark T10272 as broken on ARMv7Ben Gamari2019-12-171-3/+4
| | | | Due to #17556.
* testsuite: Mark prog001 as fragile on ARMv7Ben Gamari2019-12-171-0/+1
| | | | Due to #17555.
* testsuite: Mark cgrun057 as broken on ARMv7Ben Gamari2019-12-171-0/+1
| | | | | Due to #17554. It's very surprising that this only occurs on ARMv7 but this is the only place I've seen this failure thusfar.
* gitlab-ci: Drop redundant release-x86_64-linux-deb9 jobBen Gamari2019-12-161-14/+0
|