summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix the local type environment of module finalizers.fd/D2519Facundo Domínguez2016-09-094-1/+31
| | | | | | | | | | | | | | | | | | | | | Summary: Before, the local type environment of the finalizer was the one present when the finalizer was added. This ignored the top-level Ids that would be present in the local type environment at the end of type-checking. This behavior was introduced in the fix to #11832. Now the local type environment at the end of type-checking is used to extend the local type environment of the finalizer. Test Plan: ./validate Reviewers: simonpj, bgamari, austin Subscribers: mboes, thomie Differential Revision: https://phabricator.haskell.org/D2519 GHC Trac Issues: #11832
* Don't ignore addTopDecls in module finalizers.Facundo Domínguez2016-09-057-8/+43
| | | | | | | | | | | | | | | | | | | | | | | Summary: Module finalizer could call addTopDecls, however, the declarations added in this fashion were ignored. This patch makes sure to rename, type check and incorporate this declarations. Because a declaration may include a splice which calls addModFinalizer, the list of finalizers is repeteadly checked after adding declarations until no more finalizers remain. Test Plan: ./validate Reviewers: bgamari, goldfire, simonpj, austin Reviewed By: bgamari, simonpj Subscribers: simonmar, mboes, thomie Differential Revision: https://phabricator.haskell.org/D2505 GHC Trac Issues: #12559
* cleanup: drop 11 years old performance hackSergei Trofimovich2016-09-041-8/+2
| | | | | | | | | | | The 'return () >>' hack was added in commit commit ac88f113abdec1edbffb6d2f97323e81f82908e7 Date: Tue Jul 26 12:14:03 2005 +0000 Nowadays it has no effect on generated Core on -O1/-O2 and slightly bloats Core on -O0. Signed-off-by: Sergei Trofimovich <siarheit@google.com>
* accept current (problematic) outputGabor Greif2016-09-041-1/+5
|
* test #12567: add new testcase with expected plugin behaviourGabor Greif2016-09-046-0/+26
|
* Fix comment about resultGabor Greif2016-09-031-1/+1
|
* Typo in commentGabor Greif2016-09-031-1/+1
|
* extend '-fmax-worker-args' limit to specialiser (Trac #11565)Sergei Trofimovich2016-09-022-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a complementary change to a48de37dcca98e7d477040b0ed298bcd1b3ab303 restore -fmax-worker-args handling (Trac #11565) I don't have a small example but I've noticed another discrepancy when was profiling GHC for performance cmmExprNative :: ReferenceKind -> CmmExpr -> CmmOptM CmmExpr was specialised by 'spec_one' down to a function with arity 159. As a result 'perf record' pointed at it as at slowest function in whole ghc library. I've extended -fmax-worker-args effect to 'spec_one' as it does the same worker/wrapper split to push arguments to the heap. The change decreases heap usage on a synth.bash benchmark (Trac #9221) from 67G down to 64G (-4%). Benchmark runtime decreased from 14.5 s down to 14.s (-7%). Signed-off-by: Sergei Trofimovich <siarheit@google.com> Reviewers: ezyang, simonpj, austin, goldfire, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2507 GHC Trac Issues: #11565
* ghc-cabal: accept EXTRA_HC_OPTS make variableSergei Trofimovich2016-09-021-1/+2
| | | | Signed-off-by: Sergei Trofimovich <siarheit@google.com>
* Protect StablPtr dereference with the StaticPtr table lock.Facundo Domínguez2016-09-021-1/+4
| | | | | | | | | | | | | | Summary: Also comment on the need to use stgMallocBytes in StaticPtrTable.c. Test Plan: ./validate Reviewers: erikd, austin, bgamari, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2506
* Typos in notesggreif2016-09-021-1/+1
|
* Fix #10923 by fingerprinting optimization level.Edward Z. Yang2016-09-025-3/+33
| | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonmar, austin, bgamari, thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D2509 GHC Trac Issues: #10923
* configure.ac: fix --host= handlingSergei Trofimovich2016-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following command fails as: $ ./configure --prefix=/usr \ --build=x86_64-pc-linux-gnu \ --host=x86_64-pc-linux-gnu \ --target=x86_64-pc-linux-gnu configure: error: You've selected: BUILD: x86_64-unknown-linux HOST: x86_64-unknown-linux TARGET: x86_64-unknown-linux BUILD must equal HOST; 18f06878ed5d8cb0cf366a876f2bfea29647e5f0 changed native configure $build/$host/$target checks to ghc-mangled ones, but not completely. Signed-off-by: Sergei Trofimovich <siarheit@google.com> Reviewers: rwbarton, erikd, austin, hvr, bgamari, Phyx Reviewed By: Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2508 GHC Trac Issues: #12487
* Added support for deprecated POSIX functions on Windows.Tamar Christina2016-09-0110-52/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With the introduction of 8.0.1 We've stopped supporting in GHCi the use of POSIX functions under their deprecated names on Windows. This to be compatible with object and libraries from the most popular compilers on the platform (Microsoft and Intel compilers). However this brings a confusing disparity between the compiled and interpreted behavior since MingW-W64 does support the deprecated names. Also It seems clear that package writers won't update their packages to properly support Windows. As such I have added redirects in the RTS for the deprecated functions as listed on https://msdn.microsoft.com/en-us/library/ms235384.aspx. This won't export the functions (as in, they won't be in the symbol table of compiled code for the RTS.) but we inject them into the symbol table of the dynamic linker at startup. Test Plan: ./validate and make test TEST="ffi017 ffi021" Reviewers: thomie, simonmar, RyanGlScott, bgamari, austin, hvr, erikd Reviewed By: simonmar, bgamari Subscribers: RyanGlScott, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2500 GHC Trac Issues: #12209, #12497, #12496
* Fix startsVarSym and refactor operator predicates (fixes #4239)Malo Jaffré2016-09-016-32/+26
| | | | | | | | | | | | | | | | | | | startsVarSym used isSymbol which does not recognize valid operators beginning with OtherPunctuation generalCategory (e. g. (·)). Move it to ghc-boot-th for reducing duplication. This patch fixes template-haskell pretty printer, which is used by -ddump-minimal-imports. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2480 GHC Trac Issues: #4239
* Revert "Fix startsVarSym and refactor operator predicates (fixes #4239)"Ben Gamari2016-09-016-26/+32
| | | | | This reverts commit 8d35e18d885e60f998a9dddb6db19762fe4c6d92. arc butchered the authorship on this.
* Fix startsVarSym and refactor operator predicates (fixes #4239)Ben Gamari2016-09-016-32/+26
| | | | | | | | | | | | | | | | | | | startsVarSym used isSymbol which does not recognize valid operators beginning with OtherPunctuation generalCategory (e. g. (·)). Move it to ghc-boot-th for reducing duplication. This patch fixes template-haskell pretty printer, which is used by -ddump-minimal-imports. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2480 GHC Trac Issues: #4239
* Kill vestiages of DEFAULT_TMPDIRBen Gamari2016-09-013-19/+0
| | | | | | | | | | | | | | | | | It was removed long ago in cf403b50900648063d99afa160d2091a7d6f58c1. Thanks for @rwbarton for catching this. Updates nofib submodule. Test Plan: Validate Reviewers: austin, rwbarton Subscribers: thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D2493 GHC Trac Issues: #12443
* restore -fmax-worker-args handling (Trac #11565)Sergei Trofimovich2016-09-013-5/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | maxWorkerArgs handling was accidentally lost 3 years ago in a major update of demand analysis commit 0831a12ea2fc73c33652eeec1adc79fa19700578 Old regression is noticeable as: - code bloat (requires stack reshuffling) - compilation slowdown (more code to optimise/generate) - and increased heap usage (DynFlags unboxing/reboxing?) On a simple compile benchmark this change causes heap allocation drop from 70G don to 67G (ghc perf build). Signed-off-by: Sergei Trofimovich <siarheit@google.com> Reviewers: simonpj, ezyang, goldfire, austin, bgamari Reviewed By: simonpj, ezyang Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2503 GHC Trac Issues: #11565
* users_guide: Move initGhcMonad note to 8.0.2 relnotesBen Gamari2016-09-012-5/+12
|
* users_guide: Move -fdefer-out-of-scope-variables note to 8.0.2 relnotesBen Gamari2016-09-012-3/+3
| | | | It will be included in 8.0.2
* users_guide: Move addModFinalizer mention to 8.0.2 release notesBen Gamari2016-09-012-8/+13
|
* users_guide: Document removal of -Wredundant-constraints from -WallBen Gamari2016-09-011-1/+2
|
* Revert "testsuite: Update bytes allocated of parsing001"Ben Gamari2016-09-011-2/+1
| | | | | | | This reverts commit ca6d0eb0f7d28b0245abc2b0783141101e51945f. I'm really not sure what happened with the test build that lead me to believe that this was necessary. Mysterious.
* LoadIFace: Show known names on inconsistent interface fileBen Gamari2016-08-311-1/+6
| | | | | | | | Reviewers: austin Subscribers: simonpj, ezyang, thomie Differential Revision: https://phabricator.haskell.org/D2466
* RnExpr: Fix ApplicativeDo desugaring with RebindableSyntaxBen Gamari2016-08-314-21/+78
| | | | | | | | | | | | | | | | | | | We need to compare against the local return and pure, not returnMName and pureAName. Fixes #12490. Test Plan: Validate, add testcase Reviewers: austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2499 GHC Trac Issues: #12490
* Remove redundant-constraints from -Wall (#10635)Adam C. Foltzer2016-08-318-9/+33
| | | | | | | | | | | | | | | Removes -Wredundant-constraints from -Wall, as per the discussion in #10635. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2498 GHC Trac Issues: #10635
* Add -fdefer-out-of-scope-variables flag (#12170).Eugene Akentyev2016-08-3112-19/+128
| | | | | | | | | | | | Reviewers: simonpj, thomie, austin, bgamari Reviewed By: simonpj, thomie, bgamari Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2458 GHC Trac Issues: #12170
* testsuite: Update bytes allocated of parsing001Ben Gamari2016-08-311-1/+2
| | | | | Sadly I don't know precisely which commit regressed this, but it was quite recent. I'm not sure how this wasn't caught by my test builds.
* PPC NCG: Implement minimal stack frame header.Peter Trommler2016-08-312-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | According to the ABI specifications a minimal stack frame consists of a header and a minimum size parameter save area. We reserve the minimal size for each ABI. On PowerPC 64-bil Linux and AIX the parameter save area can accomodate up to eight parameters. So calls with eight parameters and fewer can be done without allocating a new stack frame and deallocating that stack frame after the call. On AIX one additional spill slot is available on the stack. Code size for all nofib benchmarks is 0.3 % smaller on powerpc64. Test Plan: validate on AIX Reviewers: hvr!, erikd, austin, simonmar, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2445
* Add -flocal-ghci-history flag (#9089).Eugene Akentyev2016-08-315-4/+33
| | | | | | | | | | | | Reviewers: thomie, bgamari, austin Reviewed By: thomie, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2461 GHC Trac Issues: #9089
* Add Read1/Read2 methods defined in terms of ReadPrecRyan Scott2016-08-318-62/+397
| | | | | | | | | | | | | | | | | This adds new methods `liftReadList(2)` and `liftReadListPrec(2)` to the `Read1`/`Read2` classes which are defined in terms of `ReadPrec` instead of `ReadS`. This also adds related combinators and changes existing `Read1` and `Read2` instances to be defined in terms of the new methods. Reviewers: hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2379 GHC Trac Issues: #12358
* TysWiredIn: Use dataConWorkerUnique instead of incrUniqueBen Gamari2016-08-312-3/+2
| | | | | | | | | | Test Plan: Validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2465
* A failing testcase for T12485Bartosz Nitka2016-08-317-0/+39
| | | | | | | | | | | | Test Plan: it's just a testcase Reviewers: ezyang, simonmar, bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2450 GHC Trac Issues: #12485
* ErrUtils: Expose accessors of ErrDoc and ErrMsgBen Gamari2016-08-311-4/+7
| | | | | | | | | | | | Test Plan: Validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2491 GHC Trac Issues: #12206
* testsuite: Failing testcase for #12091Ben Gamari2016-08-313-0/+6
| | | | | | | | | | | | | | Just as it says on the can Test Plan: validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2489 GHC Trac Issues: #12091
* Clarify scope of `getQ`/`putQ` state.Francesco Mazzoli2016-08-311-2/+4
| | | | | | | | | | | | | The current haddocks do not specify the scope of the state manipulated by `getQ`/`putQ`. Reviewers: austin, goldfire, bgamari, ezyang Reviewed By: ezyang Subscribers: ezyang, thomie Differential Revision: https://phabricator.haskell.org/D2497
* StgCmmPrim: Add missing MO_WriteBarrierBen Gamari2016-08-311-2/+5
| | | | | | | | | | | | | | Test Plan: Good question Reviewers: austin, trommler, simonmar, rrnewton Reviewed By: simonmar Subscribers: RyanGlScott, thomie Differential Revision: https://phabricator.haskell.org/D2495 GHC Trac Issues: #12469
* Bump the default allocation area size to 1MBSimon Marlow2016-08-315-8/+11
| | | | | | | | | | | | | | | | | | This is long overdue. Perhaps 1MB is a little on the skinny size, but this is based on * A lot of commodity dual-core desktop processors have 3MB L3 cache * We're traditionally quite frugal with memory by default Test Plan: validate Reviewers: erikd, bgamari, hvr, austin, rwbarton, ezyang Reviewed By: ezyang Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2496
* iserv: Show usage message on argument parse failureBen Gamari2016-08-312-5/+25
| | | | | | | | | | | | | | Test Plan: validate Reviewers: simonmar, erikd, austin Reviewed By: simonmar, erikd Subscribers: thomie, erikd Differential Revision: https://phabricator.haskell.org/D2494 GHC Trac Issues: #12491
* GHC: Expose installSignalHandlers, withCleanupSessionBen Gamari2016-08-312-3/+9
| | | | | | | | | | | | | | Test Plan: Validate Reviewers: austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2492 GHC Trac Issues: #12398
* users_guide: More capabilities than processors considered harmfulBen Gamari2016-08-311-1/+2
| | | | | | | | | | | | Test Plan: None. Reviewers: austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2487
* Fixes #12504: Double-escape paths used to build call to hsc_lineRichard Cook2016-08-316-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | In outHsLine, paths passed to construct invocations of hsc_line must be escaped twice in order to generate a properly escaped string literal that will end up in the eventual LINE pragma emitted by this code. This is especially important on Windows paths, where backslashes would otherwise be treated as C escape sequences and result in the incorrect Windows paths. Adds test case to verify that hsc2hs properly escapes file paths in LINE pragmas Updates the hsc2hs submodule. See https://ghc.haskell.org/trac/ghc/ticket/12504 Reviewers: erikd, hvr, austin, bgamari, Phyx Reviewed By: erikd, Phyx Subscribers: thomie, Phyx, mpickering Differential Revision: https://phabricator.haskell.org/D2478 GHC Trac Issues: #12504
* Fix handling of package-db entries in .ghc.environment files, etc.Duncan Coutts2016-08-302-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously interpreting the content of the .ghc.env files was done after the step that loaded the available package dbs. This meant that setting the package db flags was ineffective. This patch moves interpreting the env files before loading of the package dbs. Also, the package-db entries refer to files. Allow spaces in these file names. Also treat as comments lines beginning with "--". These are pretty minor fixes in a feature that up 'til now has been essentially unused (witness no bug report about it), so there's very low risk here. If we can get this into 8.0.2 then cabal can start generating the .ghc.environment files, otherwise it cannot as it needs the working package-db entries, to be able to refer to local package dbs in the build tree (or cabal nix store). Test Plan: Manually create example .ghc.env files run ghci; :show packages Done this. It works. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2476
* Tag pointers in interpreted constructorsmniip2016-08-3011-16/+105
| | | | | | | | | | | | | | | | | | | | | Instead of stg_interp_constr_entry there are now 7 functions (one for each value of the tag bits) that tag the constructor pointer before returning. This is consistent with compiled constructors' entry code, and expectations that compiled code places on compiled constructors. The iserv protocol is extended with an extra field that explains what pointer tag the constructor should use. Test Plan: Added tests for #12523 Reviewers: erikd, bgamari, hvr, austin, simonmar Reviewed By: simonmar Subscribers: osa1, thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D2473 GHC Trac Issues: #12523
* Fix binary-trees regression from unnecessary floating in CorePrep.Edward Z. Yang2016-08-304-12/+76
| | | | | | | | | | | | | | | | | | In the previous patch, I handled lazy @(Int -> Int) f x correctly, but failed to handle lazy @Int (f x) (we need to collect arguments in f x). Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari, nomeata Reviewed By: nomeata Subscribers: simonmar, thomie Differential Revision: https://phabricator.haskell.org/D2471
* Clarify pkg selection when multiple versions are availableHarendra Kumar2016-08-302-122/+159
| | | | | | | | | | Reviewers: austin, bgamari, ezyang Reviewed By: ezyang Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2464
* Fix and complete runghc documentationHarendra Kumar2016-08-302-15/+44
| | | | | | | | | | Reviewers: austin, thomie, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D2463 GHC Trac Issues: #12517
* TcGenDeriv: TypofixRyan Scott2016-08-301-1/+1
| | | | I think someone accidentally a word in a Note in TcGenDeriv.
* OccName: Remove unused DrIFT directiveRyan Scott2016-08-301-1/+0
|