summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* base: Mark unfold as deprecatedBen Gamari2017-04-042-0/+5
| | | | | | | | | | | | Test Plan: Read it Reviewers: austin, hvr, RyanGlScott Reviewed By: RyanGlScott Subscribers: rwbarton, thomie, ekmett Differential Revision: https://phabricator.haskell.org/D3422
* Add Alternative instance for ZipList (fix #13520).Edvard Hübinette2017-04-042-1/+11
| | | | | | | | | | Reviewers: austin, hvr, bgamari, RyanGlScott Reviewed By: RyanGlScott Subscribers: adamse, RyanGlScott, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3416
* Replace Digraph's Node type synonym with a data typeMatthew Pickering2017-04-0417-80/+92
| | | | | | | | | | | | | This refactoring makes it more obvious when we are constructing a Node for the digraph rather than a less useful 3-tuple. Reviewers: austin, goldfire, bgamari, simonmar, dfeuer Reviewed By: dfeuer Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3414
* validate: Clean GMP treesBen Gamari2017-04-041-1/+1
| | | | | | | | | | | | | | | For reasons unknown `validate` passed `NO_CLEAN_GMP=YES` to `maintainer-clean`, leaving a stale `gmp.h` which causes the build to fail in the event that the uses a tree for validating for two different target platforms. This is quite unexpected, don't do it. Reviewers: hvr, austin, rwbarton, dfeuer Reviewed By: dfeuer Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3409
* Add regression test for #7944Ryan Scott2017-04-042-8/+28
| | | | | | | | | | | | | | | | | | Commit b8b3e30a6eedf9f213b8a718573c4827cfa230ba happened to fix the bug reported in #7944. Let's add a regression test so that it stays that way. Fixes #7944. Test Plan: make test TEST=T7944 Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3404
* Use strict types and folds in CoreStatsReid Barton2017-04-041-9/+11
| | | | | | | | | | | | | | | This only has a significant effect when compiling with -v (or -dshow-passes), but still there's no reason not to do it. Test Plan: harbormaster Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3401
* base: Add test for #8684Ben Gamari2017-04-042-0/+17
| | | | | | | | Reviewers: austin, hvr Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3420
* base: Add test for #13525Ben Gamari2017-04-042-0/+8
| | | | | | | | Reviewers: austin, hvr Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3419
* testsuite: Add test for #13524Ben Gamari2017-04-042-0/+28
| | | | | | | | Reviewers: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3418
* testsuite: Bump up timeout multiplier on T11195Ben Gamari2017-04-041-1/+1
| | | | This has been failing a bit too often (on CI machines under load).
* rts: Fix lingering #ifsBen Gamari2017-04-046-9/+9
| | | | These were missed in D3278.
* Enable new warning for fragile/incorrect CPP #if usageErik de Castro Lopo2017-04-0527-113/+167
| | | | | | | | | | | | | | | | The C code in the RTS now gets built with `-Wundef` and the Haskell code (stages 1 and 2 only) with `-Wcpp-undef`. We now get warnings whereever `#if` is used on undefined identifiers. Test Plan: Validate on Linux and Windows Reviewers: austin, angerman, simonmar, bgamari, Phyx Reviewed By: bgamari Subscribers: thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3278
* HACKING: Update for Phabricator patch workflowBen Gamari2017-04-041-24/+9
|
* Revert "Make raiseIO# produce topRes"David Feuer2017-04-032-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit da4687f63ffe5a6162e3d7856aa53de048dd0f42. It's not entirely trivial to clean up the dead code this patch introduced. In particular, when we see ``` case raiseIO# m s of s' -> e ``` we want to know that `e` is dead. For scrutinees that are properly bottom (which we don't want to consider `raiseIO# m s` to be, this is handled by rewriting `bot` to `case bot of {}`. But if we do that for `raiseIO#`, we end up with ``` case raiseIO# m s of {} ``` which looks a lot like bottom and could confuse demand analysis. I think we need to wait with this change until we have a more complete story. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3413
* compact: Clarify mutability restrictionBen Gamari2017-04-031-9/+11
| | | | | | | | | | | | | | Fixes #13508. [skip ci] Test Plan: Read it Reviewers: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3407
* Bump Win32 submoduleBen Gamari2017-04-031-0/+0
| | | | Fixes #13514.
* hp2ps: install shell wrapperSergei Trofimovich2017-04-032-2/+5
| | | | | | | | | | | | | | | | | | Before this change we installed hp2ps both to inplace/bin/ and ${prefix}/bin/ In both cases we added $(CrossCompilePrefix) as a binary prefix. It's incorrect for inplace install as none of inplace binaries are prefixed. The change it to track 'hp2ps' as unprefixed binary. $(CrossCompilePrefix) prefix is only added to the installed shell wrapper. Now 'hp2ps' is handled in a similar way to 'hpc' and 'ghc-pkg'. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Fix validate.Edward Z. Yang2017-04-031-1/+0
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* testsuite: Classify missing expected perf numbers as merely warningsBen Gamari2017-04-022-2/+16
| | | | | | Previously these were considered to be framework failures, meaning that validate would fail. For better or worse, Windows lacks a good number of metrics and I don't see this changing any time soon. Let's consider these to be non-fatal.
* Various testsuite fixes for 32-bit WindowsBen Gamari2017-04-028-7/+62
|
* rts: Make out-of-memory errors more consistentBen Gamari2017-04-025-5/+5
| | | | This will make it a bit easier to maintain consistent output in the testsuite.
* array: Clear up inconsistency in T9220 outputBen Gamari2017-04-022-0/+7
| | | | | | | ghc-8.2 and master disagreed on the order of the instances. Normalise this difference away. Updates array submodule.
* Correctly handle wired in unit IDs in -instantiated-withEdward Z. Yang2017-04-027-20/+88
| | | | | | | | | | | | | | | | | | | Summary: To handle wired in packages, we must rewrite all occurrences of unit ids like base-4.9.0.0 to base. However, I forgot to do this on unit ids that occurred in unit identifiers passed via -instantiated-with. This patch handles that case, plus a test. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3385
* Better test coverage for module reexports in signatures.Edward Z. Yang2017-04-0210-0/+73
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Extra docs on tcg_imports.Edward Z. Yang2017-04-021-1/+25
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Extra docs on exports_from_avail.Edward Z. Yang2017-04-021-0/+3
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Add more documentation on mergeSignatures.Edward Z. Yang2017-04-021-18/+80
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* mk/boilerplate.mk defines STAGE1_GHC, not GHC_STAGE1.Edward Z. Yang2017-04-021-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Fix recompilation avoidance bug for implementor of hsig.Edward Z. Yang2017-04-0217-20/+122
| | | | | | | | | | | | | | | | | | | | | Summary: I observed a bug where if I modified the module which implemented an hsig in another package, GHC would not recompile the signature in this situation. The root cause was that we were conflating modules from user imports, and "system" module dependencies (from signature merging and instantiation.) So this patch handles them separately. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, bgamari, austin Subscribers: rwbarton, thomie, snowleopard Differential Revision: https://phabricator.haskell.org/D3381
* Minor comment updates on CSE.Edward Z. Yang2017-04-021-3/+13
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Derive the definition of nullDavid Feuer2017-04-027-40/+218
| | | | | | | | | | | | | | | | | | | | | | | We can sometimes produce much better code by deriving the definition of `null` rather than using the default. For example, given data SnocList a = Lin | Snoc (SnocList a) a the default definition of `null` will walk the whole list, but of course we can stop as soon as we see `Snoc`. Similarly, if a constructor contains some other `Foldable` type, we want to use its `null` rather than folding over the structure. Partially fixes Trac #13280 Reviewers: austin, bgamari, RyanGlScott Reviewed By: RyanGlScott Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3402
* configure.ac: add aarch64 to list of registerisedSergei Trofimovich2017-04-021-1/+1
| | | | | | | Similar to 'arm' 'aarch64' has working llvm codegen, no need to fallback to unregisterised buld by default. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* configure.ac: fix NCG support in --target=Sergei Trofimovich2017-04-021-1/+1
| | | | | | | | | | | | | | | Before this change attempt to build a crosscompiler on registerised platform (--host=x86_64-pc-linux-gnu) targeting UNREG platform failed: $ ./configure --target=ia64-unknown-linux-gnu utils/genapply/../../includes/stg/MachRegs.h:608:2: error: #error Cannot find platform to give register info for The change is to check --target= for NCG availability, not --host=. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Update containers submodule to official 0.5.10.2David Feuer2017-04-021-0/+0
| | | | | | | | | | Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3406
* Add a perf test for deriving nullDavid Feuer2017-04-023-0/+32
| | | | | | | | | | | | | | | Deriving null even helps for a simple list-like type, presumably because we don't perform the static argument transformation. Adding this test before the null deriving patch should give a proper baseline. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3408
* testsuite: Fix GhciCurDir testBen Gamari2017-04-021-1/+2
| | | | This was horribly, horribly wrong.
* :cd affects the iserv process tooSimon Marlow2017-04-023-0/+13
| | | | | | | | | | | | Test Plan: validate Reviewers: angerman, austin, bgamari, erikd Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3395
* Report heap overflow in the same way as stack overflowSimon Marlow2017-04-0211-31/+35
| | | | | | | | | | | | | | | | | | | | | | | Now that we throw an exception for heap overflow, we should only print the heap overflow message in the main thread when the HeapOverflow exception is caught, rather than as a side effect in the GC. Stack overflows were already done this way, I just made heap overflow consistent with stack overflow, and did some related cleanup. Fixes broken T2592(profasm) which was reporting the heap overflow message twice (you would only notice when building with profiling libs enabled). Test Plan: validate Reviewers: bgamari, niteria, austin, DemiMarie, hvr, erikd Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3394
* FastMutInt: fix Int and Ptr sizes when crosscompilingSergei Trofimovich2017-04-022-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to https://ghc.haskell.org/trac/ghc/ticket/13491 https://phabricator.haskell.org/D3122 SIZEOF_HSINT and SIZEOF_VOID_P are sizes of target platform. These values are usually not correct when stage1 is built. It means the code ```haskell newFastMutInt = IO $ \s -> case newByteArray# size s of { (# s, arr #) -> (# s, FastMutInt arr #) } where !(I# size) = SIZEOF_HSINT ``` would try to allocate only 4 bytes on 64-bit-host targeting 32-bit system. It does not matter in practice as newByteArray# implementation rounds up passed value to host's word size. But one day it might not. To prevent this class of problems in compiler/ directory 'MachDeps.h' contents is hidden when ghc-stage1 (-DSTAGE=1) is built. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Reviewers: austin, rwbarton, simonmar, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3405
* compiler/ghc.mk: fix GhcWithInterpreter=NO build failureSergei Trofimovich2017-04-021-5/+5
| | | | | | | | | | | | When GhcWithInterpreter=NO is set in mk/build.mk build fails as: $ inplace/bin/dll-split compiler/stage2/build/.depend-v-dyn.haskell "DynFlags" ... Reachable modules from DynFlags out of date Please fix compiler/ghc.mk, or building DLLs on Windows may break (#7780) Extra modules: ByteCodeTypes InteractiveEvalTypes Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Stamp out space leaks from demand analysisReid Barton2017-04-013-4/+25
| | | | | | | | | | | | | | | | This reduces peak memory usage by ~30% on my test case (DynFlags), and (probably as a result of reduced GC work) decreases compilation time by a few percent as well. Also fix a bug in seqStrDmd so that demeand info is fully evaluated. Reviewers: simonpj, austin, bgamari Reviewed By: bgamari Subscribers: dfeuer, thomie Differential Revision: https://phabricator.haskell.org/D3400
* Optimise common cases of GHC.setProgramDynFlagsSimon Marlow2017-04-015-41/+94
| | | | | | | | | | | | | | | | | | * If the package flags haven't changed, don't do initPackages (which might take multiple seconds in extreme cases) * Provide a way to change the log_action without invalidating the summary cache. Test Plan: validate Reviewers: niteria, bgamari, austin, erikd, ezyang Reviewed By: bgamari Subscribers: mpickering, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3392
* Don't derive showListDavid Feuer2017-04-013-11/+3
| | | | | | | | | | | | | | | | | There's no obvious reason to derive the definition of `showList`, manually inlining the default definition. Let's just use the default definition in the usual manner. Garbage collect a few unused `RdrNames` from `PrelNames`: `showList`, `showList__`, and `/=`. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: RyanGlScott, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3403
* testsuite: Add regression test for #13474Ben Gamari2017-04-012-0/+14
|
* rts: print incorrect prev_what_nextSergei Trofimovich2017-04-011-1/+1
| | | | | | | | | | Moritz Angermann reports mysterious rts crash: A: link: internal error: schedule: invalid what_next field A: (GHC version 8.3.20170321 for arm_none_linux_android) This change prints actual prev_what_next value. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* UNREG: ignore -fllvm (Trac #13495)Sergei Trofimovich2017-04-011-1/+1
| | | | | | | | | | | | | | | | | | Unregisterised GHC can only use C as a target backend (option used to be called -fvia-C). -fasm option was ignored with a warhing, but not -fllvm. jms noticed the failure when tried to use quick-cross build flavour. quick-cross enables -fllvm in makefile. "inplace/bin/ghc-stage1" ... -fllvm ghc-stage1: panic! (the 'impossible' happened) (GHC version 8.0.2 for powerpc-unknown-linux): LlvmCodeGen.Ppr: Cross compiling without valid target info. This change ignores -fllvm as well. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Remove Core Lint pass on occurrence analysis output (#13220)Reid Barton2017-03-312-8/+5
| | | | | | | | | | | | | | | It was expensive, as the simplifier runs for many iterations, and probably not very useful. Test Plan: harbormaster Reviewers: austin, bgamari, dfeuer Reviewed By: dfeuer Subscribers: dfeuer, thomie Differential Revision: https://phabricator.haskell.org/D3391
* askCc should be using the linker, not the compilerSimon Marlow2017-03-312-7/+8
| | | | | | | | | | | | | | | | | When GHCi tries to find a shared lib, it calls "gcc --print-file-name" to ask gcc where to find it. But since we're looking for libraries, we're really using the linker here, not the C compiler, so we should be respecting the values of -pgml and -optl rather than -pgmc and -optc. Test Plan: validate Reviewers: bgamari, niteria, austin, hvr, erikd Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3393
* testsuite: Update Windows allocations for T12234Ben Gamari2017-03-311-2/+3
|
* Fix space leaks in simplifier (#13426)Reid Barton2017-03-312-6/+14
| | | | | | | | | | | | | | | | | | | The Join points commit (8d5cf8bf) introduced a space leak somewhere in the simplifier. The extra strictness added in this commit fixes the leak. Unfortunately I don't really understand the details. Unfortunately, the extra strictness appears to result in more overall allocations in some cases, even while the peak heap size decreases in others. Test Plan: harbormaster Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3399