summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Runtime linker: Break m32 allocator out into its own filewip/erikd/linkerErik de Castro Lopo2016-05-247-321/+435
| | | | | | | | | | | | | | | | | | | | This makes the code a little more modular and allows the removal of some CPP hackery. By providing dummy implementations of of the `m32_*` functions (which simply call `errorBelch`) it means that the call sites for these functions are syntax checked even when `RTS_LINKER_USE_MMAP` is `0`. Also changes some size parameter types from `unsigned int` to `size_t`. Test Plan: Validate on Linux, OS X and Windows Reviewers: Phyx, hsyl20, bgamari, simonmar, austin Reviewed By: simonmar, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2237
* Comments onlySimon Peyton Jones2016-05-241-1/+2
|
* Remove unused Type.splitFunTysNSimon Peyton Jones2016-05-241-10/+1
|
* Spelling in commentSimon Peyton Jones2016-05-241-1/+1
|
* Don't split the arg types in a PatSyn signatureSimon Peyton Jones2016-05-247-100/+145
| | | | | | | | | | | | | | | | | This patch fixes Trac #11977, and #12108, rather satisfactorily maily by deleting code! pattern P :: Eq a => a -> a -> Int The idea is simply /not/ to split the bit after the '=>' into the pattern argument types, but to keep the (a->a->Int) part un-decomposed, in the patsig_body_ty field of a TcPatSynInfo. There is one awkward wrinkle, which is that we can't split the implicitly-bound type variables into existential and universal until we know which types are arguments and which are part of the result. So we postpone the decision until we have the declaration in hand. See TcPatSyn Note [The pattern-synonym signature splitting rule]
* Suppress the warning about __sync_fetch_and_nand (#9678)Thomas Miedema2016-05-243-0/+9
|
* Revert "compiler/iface: compress .hi files"Ben Gamari2016-05-237-2033/+20
| | | | | | | | | | | | | | | | | | | | | This appears to cause validation issues on, TEST="T11108 T9071 T11076 T7600 T7672 T8329 T10420 T10322 T8308 T4114a T4114c T10602 T10110 T9204 T2435 T9838 T4114d T10233 T8696 T1735 T5281 T6056 T10134 T9580 T6018 T9762 T8103" With compiler panics of the form, Compile failed (status 256) errors were: ghc: panic! (the 'impossible' happened) (GHC version 8.1.20160523 for x86_64-unknown-linux): Binary.readBinMem: decompression failed CallStack (from HasCallStack): error, called at compiler/utils/Binary.hs:192:16 in ghc:Binary Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug This reverts commit d9cb7a8a94daa4d20aa042cd053e20b491315633.
* testsuite: Update max_bytes_used for T4029Ben Gamari2016-05-231-2/+5
|
* Fix build by removing unused import.Matthew Pickering2016-05-231-1/+1
|
* Allow unlifted types in pattern synonym result typeMatthew Pickering2016-05-233-2/+13
| | | | | | | | | | | | | | Fixes #12094 Test Plan: ./validate Reviewers: austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2255 GHC Trac Issues: #12094
* Testsuite: fix T12010 for realThomas Miedema2016-05-223-11/+7
| | | | | | | | | | | | | | | | | * Use `extra_files` instead of (the deprecated) `extra_clean` (#11980). * Don't depend on generated files from build tree (libraries/base/include/HsBaseConfig.h). Running 'make test TEST=T12010' should work, even without building GHC first (it will use the system installed ghc). Test Plan: 'make test TEST=T12010' on Linux and Windows. Reviewed by: Phyx Differential Revision: https://phabricator.haskell.org/D2256 GHC Trac Issues: #12010
* Update format specifiers for Tickey.cTamar Christina2016-05-221-13/+13
| | | | | | | | | | | | | | | | Summary: all `tot_` values in `Tickey.c` are `unsigned long` but are being printed as `%ld` instead of `%lu`. Test Plan: ./validate Reviewers: austin, bgamari, simonmar, erikd Reviewed By: erikd Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2251
* rts/Linker.c: Fix compile error on ArmErik de Castro Lopo2016-05-221-0/+3
| | | | | | | | | | | | | | | Commit da3c1ebb8a left Arm with a compile error. This is a short term fixup pending a much more through fix of removing as much CPP hackery as possible. Test Plan: Validate on arm and x86_64 Reviewers: simonmar, austin, hsyl20, bgamari, Phyx Reviewed By: Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2254
* Use `setSession` instead of `modifySession` when setting `HscEnv`Ömer Sinan Ağacan2016-05-223-10/+10
| | | | | | | | | | Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2253
* Build system: temp solution for parallelisation bug (#11960)Thomas Miedema2016-05-221-1/+2
|
* Fix deriving Ord when RebindableSyntax is enabledAndrew Farmer2016-05-214-5/+29
| | | | | | | | | | | | | | | | | | | | | | | Deriving clauses (Ord especially) generated if-expressions with nlHsIf which were subject to RebindableSyntax. This changes nlHsIf to generate concrete if-expressions. There was also an error about calling tagToEnum# at a polymorphic type, which is not allowed. Fixing nlHsIf didn't fix this for some reason, so I generated a type ascription around the call to tagToEnum#. Not sure why the typechecker could not figure this out. Test Plan: Added a test, ran validate. Reviewers: simonpj, simonmar, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2247 GHC Trac Issues: #12080
* Enable checkProddableBlock on x86_64Simon Marlow2016-05-211-2/+2
| | | | | | | | | | | | | | | | | | We've been seeing some memory corruption after using the linker, and I want to enable this to see if it catches anything. Test Plan: * validate * modified the linker_unload test to remove the performGC calls to use as a benchmark, saw no significant difference after this change. Reviewers: bgamari, erikd, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2245
* users-guide: Fix index in PDF outputBen Gamari2016-05-212-0/+5
| | | | The madness that is latex never ceases to amaze.
* rules/sphinx: Add missing dependency on conf.py for pdf ruleBen Gamari2016-05-211-1/+1
|
* users-guide: Vector version of Thomson-Wheeler logoBen Gamari2016-05-211-0/+0
|
* compiler/iface: compress .hi filesAustin Seipp2016-05-217-20/+2033
| | | | | | | | | | | | | | | | | | | Compress all interface files generated by the compiler with LZ4. While being only a tiny amount of code, LZ4 is both fast at compression and decompression, and has good compression ratios. Non-scientific size test: size of stage2 compiler .hi files: `find ./compiler/stage2 -type f -iname '*.hi' -exec du -ch {} + | grep total$` Without this patch: 22MB of .hi files for stage2. With this patch: 9.2MB of .hi files for stage2. Signed-off-by: Austin Seipp <austin@well-typed.com> Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1159
* Fix failing T12010Tamar Christina2016-05-213-5/+6
| | | | | | | | | | | | | | | | Summary: T12010 seems to be failing because it can't find the correct paths. This gives the test some more qualified paths. Test Plan: make TEST=12010 Reviewers: hvr, bgamari, austin, thomie Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D2252 GHC Trac Issues: #12010
* Testsuite: mark T8761 expect_broken #12077Thomas Miedema2016-05-211-1/+2
|
* Fix Windows build after Ticky changesTamar Christina2016-05-211-4/+4
| | | | | | | | | | | | | | | | Summary: Replace hardcoded ld with FMT_Int for StgInt types. Test Plan: ./validate Reviewers: austin, bgamari, simonmar, erikd Reviewed By: erikd Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2249
* testsuite: add CmmSwitchTest for 32-bit platformsAlex Dzyoba2016-05-204-49/+1148
| | | | | | | | | | | | Move CmmSwitchTest to CmmSwitchTest64, because it's broken on 32-bit platforms. Create CmmSwitchTest32 that repeats CmmSwitchTest64 for platforms with 32-bit wordsize. Reviewed By: nomeata, austin, bgamari, thomie Differential Revision: https://phabricator.haskell.org/D2226 GHC Trac Issues: #11297
* FunDep printer: Fix unicode arrowÖmer Sinan Ağacan2016-05-205-1/+13
| | | | | | | | | | | | | | | The arrow should be printed in unicode arrow syntax when -fprint-unicode-syntax is used. Reviewers: austin, bgamari, thomie Reviewed By: thomie Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2243 GHC Trac Issues: #11825
* Add -XStaticPointers to the flag reference.Facundo Domínguez2016-05-191-0/+7
|
* Use the correct return type for Windows' send()/recv() (Fix #12010)Tamar Christina2016-05-197-29/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: They return signed 32 bit ints on Windows, even on a 64 bit OS, rather than Linux's 64 bit ssize_t. This means when recv() returned -1 to signal an error we thought it was 4294967295. It was converted to an int, -1 and the buffer was memcpy'd which caused a segfault. Other bad stuff happened with send()s. See also note CSsize in System.Posix.Internals. Add a test for #12010 Test Plan: - GHC testsuite (T12010) - http-conduit test (https://github.com/snoyberg/http-client/issues/191) Reviewers: austin, hvr, bgamari, Phyx Reviewed By: Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2170 GHC Trac Issues: #12010
* Give lifted primitive types a representationBen Gamari2016-05-192-2/+3
| | | | | | | | | | | | | | | | As of D1774 everything in GHC.Prim has a representation generated for it by TcTypeable (see #11120). Unfortunately I evidently missed propagating this change to lifted primitive types. This patch fixes this (#12082). Test Plan: Validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2240 GHC Trac Issues: #12082
* testsuite: Add a TypeRep testBen Gamari2016-05-193-1/+74
| | | | | | | | | | | | Test Plan: Validate Reviewers: goldfire, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2239 GHC Trac Issues: #12082, #11120
* {,M}BLOCK_SIZE_W * sizeof(W_) -> {,M}BLOCK_SIZETomas Carnecky2016-05-192-6/+6
| | | | | | | | | | Reviewers: austin, erikd, simonmar, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2241
* Get types in osFreeMBlocks in sync with osGetMBlocksTomas Carnecky2016-05-193-3/+3
| | | | | | | | | | | | | The first argument of 'osFreeMBlocks' ought to have the same type as the return value from 'osGetMBlocks'. Make it so. Reviewers: austin, simonmar, bgamari Reviewed By: bgamari Subscribers: erikd, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D2235
* Remove use of caddr_tTomas Carnecky2016-05-191-4/+4
| | | | | | | | | | | | | | | | | > caddr_t is a legacy BSD type associated with some low level calls like > mmap, and it should never be used in modern code. It was rejected by > the POSIX standard. The standardized mmap uses void *. (http://stackoverflow.com/questions/6381526/what-is-the-significance-of- caddr-t-and-when-is-it-used) Reviewers: austin, simonmar, rwbarton, bgamari, erikd Reviewed By: rwbarton, bgamari, erikd Subscribers: erikd, thomie Differential Revision: https://phabricator.haskell.org/D2234
* Add libraries/ghci/GNUmakefile to .gitignore [skip ci]Thomas Miedema2016-05-191-0/+1
|
* Testsuite: fix T11827 (#11827)Thomas Miedema2016-05-192-2/+12
| | | | It didn't trigger the bug before.
* testsuite: Add expected output for T11108Ben Gamari2016-05-191-0/+10
|
* Comments onlySimon Peyton Jones2016-05-191-0/+1
|
* Comments onlySimon Peyton Jones2016-05-191-0/+3
|
* Improve documentation for type wildcardsSimon Peyton Jones2016-05-191-17/+43
| | | | This docmentation improvement was triggered by Trac #12072
* Improve pretty-printing of equalitiesSimon Peyton Jones2016-05-194-57/+70
| | | | | The previous pretty-printer didn't account for partially applied equalities, causing Trac #12041
* Fix Trac #12051Simon Peyton Jones2016-05-195-37/+57
| | | | | A minor parser issue, allowing a mal-formed data constructor through.
* Kill varEnvElts in tcPragExprBartosz Nitka2016-05-185-19/+29
| | | | | | | | | | | | | | | | | I had to refactor some things to take VarSet instead of [Var], but I think it's more precise this way. Test Plan: ./validate Reviewers: simonmar, simonpj, austin, bgamari, goldfire Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2227 GHC Trac Issues: #4012
* Kill varSetElems in tidyFreeTyCoVarsBartosz Nitka2016-05-1812-188/+188
| | | | | | | | | | | | | | | | | | | | I haven't observed this to have an effect on nondeterminism, but tidyOccName appears to modify the TidyOccEnv in a way dependent on the order of inputs. It's easy enough to change it to be deterministic to be on the safe side. Test Plan: ./validate Reviewers: simonmar, austin, bgamari, simonpj Reviewed By: simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2238 GHC Trac Issues: #4012
* rts: Add missing `const` from HashTable APIErik de Castro Lopo2016-05-192-2/+2
| | | | | | | | | | | | | | Thanks to Tamar Christina (Phyx) for spotting this. Test Plan: Validate Reviewers: simonmar, austin, trofi, bgamari, hsyl20, Phyx Reviewed By: Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2236
* Failing test case for #12076.Edward Z. Yang2016-05-183-0/+19
| | | | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2229 GHC Trac Issues: #12076
* Add (broken) test for #12063.Edward Z. Yang2016-05-184-0/+11
| | | | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2222 GHC Trac Issues: #12063
* CLabel: Catch #11155 during C-- pretty-printingBen Gamari2016-05-181-4/+17
| | | | | | | | | | | | | | | | | | | | | In #11555 we ended up generating references to the non-existence stg_ap_0_upd. Here we add asserts to verify that we don't generate references to non-existent selector or application symbols. It would likely also make sense to add further asserts during code generation, so we can catch the issue even closer to its source. Test Plan: Validate Reviewers: simonmar, austin, ezyang Reviewed By: simonmar, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2230 GHC Trac Issues: #11155
* rts: Add isPinnedByteArray# primopBen Gamari2016-05-1810-0/+62
| | | | | | | | | | | | | | | | | Adds a primitive operation to determine whether a particular `MutableByteArray#` is backed by a pinned buffer. Test Plan: Validate with included testcase Reviewers: austin, simonmar Reviewed By: austin, simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2217 GHC Trac Issues: #12059
* Rework parser to allow use with DynFlagsDave Laing2016-05-1810-119/+222
| | | | | | | | | | | | | | | | | Split out the options needed by the parser from DynFlags, making the parser more friendly to standalone usage. Test Plan: validate Reviewers: simonmar, alanz, bgamari, austin, thomie Reviewed By: simonmar, alanz, bgamari, thomie Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D2208 GHC Trac Issues: #10961
* Add a test for #11108Ben Gamari2016-05-182-0/+79
| | | | | | | | | | | | Reviewers: austin, simonmar, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2196 GHC Trac Issues: #11108