summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in pattern synonym documentation.HEADMatthew Pickering2015-08-301-2/+2
| | | | | | | | | | | | | `MkT` is the name of the constructor whilst `T` is the name of the type. Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1191 GHC Trac Issues: #10787
* Fix 7.10 validateMatthew Pickering2015-08-301-1/+1
| | | | | | | | | | Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1190
* StgCmmHeap: Re-add check for large static allocationsBen Gamari2015-08-291-0/+9
| | | | | | | This should at least help alleviate the annoyance of #4505. This reintroduces a compile-time check originally added in a278f3f02d09bc32b0a75d4a04d710090cde250f but dropped with the new code generator.
* integer-gmp: optimise bitBigNatHerbert Valerio Riedel2015-08-291-1/+18
| | | | | | | | | | | | | This is a somewhat minor optimisation exploiting the static knowledge of the operands involved allowing to save a few allocations. Reviewers: austin, rwbarton, goldfire, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1179
* ghc-pkg --enable-multi-instance should not complain about case sensitivity.Edward Z. Yang2015-08-291-1/+2
| | | | | | | | | | | | Test Plan: validate Reviewers: simonmar, bgamari, austin Reviewed By: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1177
* Fix identifier parsing in hp2psYuras Shumovich2015-08-292-22/+23
| | | | | | | | | | | | | | | | | Now identifiers can start with a package key, which is a hash, so they may also start with a digit. Identifiers always appear at the beginning of a line, and numbers never appear here, soit's safe to allow identifiers to start with a digit. Test Plan: `concprog002` passes under `threaded2_hT` way Reviewers: austin, bgamari, thomie Reviewed By: austin, bgamari, thomie Differential Revision: https://phabricator.haskell.org/D1175 GHC Trac Issues: #10661
* Dwarf: Produce .dwarf_aranges sectionBen Gamari2015-08-293-21/+77
| | | | | | | | | | Test Plan: Check with `readelf --debug-dump=ranges` Reviewers: scpmw, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1174
* Dwarf: Produce {low,high}_pc attributes for compilation unitsBen Gamari2015-08-292-2/+13
| | | | | | | | | | | | | Some libraries (e.g. elfutils) need these otherwise they ignore our DWARF annotations. Test Plan: Test with elfutils' `readelf --debug-dump=cu_index` Reviewers: scpmw, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1173
* Dwarf: Fix DW_AT_use_UTF8 attributeBen Gamari2015-08-292-5/+6
| | | | | | | | | | | | | Previously this was given in the body but not in the abbreviation table. Who knows what sort of havoc this was wrecking. Test Plan: Verify against DWARF4 specification Reviewers: scpmw, austin Subscribers: Tarrasch, thomie Differential Revision: https://phabricator.haskell.org/D1172
* Respect GHC_CHARENC environment variable #10762Michael Snoyman2015-08-291-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only supports UTF-8 as a value right now. I expect some discussion to go on around the naming of this variable and whether it's valid to backport it to GHC 7.10 (which would be my preference). The motivation here is that, when capturing the output of GHC to a file, we often want to ensure that the output is UTF-8, regardless of the actual character encoding of the terminal/console. On the other hand, we don't want to necessary change the terminal/console encoding. The reason being: * On Windows, this requires a global-esque change to the console codepage, which adversely affects other processes in the same console * On all OSes, this can break features like smart quote auto-detection. Test Plan: Set LANG to C, GHC_CHARENC to UTF-8, and compile a Haskell source file with a non-ASCII warning produced. The output who include the UTF-8 sequence instead of replacing it with ?. Reviewers: austin, rwbarton, bgamari Reviewed By: bgamari Subscribers: hsyl20, thomie Differential Revision: https://phabricator.haskell.org/D1167 GHC Trac Issues: #10762
* Make Generic (Proxy t) instance poly-kinded (fixes #10775)RyanGlScott2015-08-292-19/+22
| | | | | | | | | | | | | | | | | | | | | | | This amounts to enabling PolyKinds in GHC.Generics. However, explicit kind signatures must be applied to the datatypes and typeclasses in GHC.Generics to ensure that the Core which TcGenGenerics generates is properly kinded. Several of the typeclasses in GHC.Generics could be poly-kinded, but this differential does not attempt to address this, since D493 already addresses this. Test Plan: ./validate Reviewers: hvr, austin, dreixel, bgamari Reviewed By: austin, dreixel, bgamari Subscribers: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D1166 GHC Trac Issues: #10775
* Add testcase for #7411Ben Gamari2015-08-293-0/+8
|
* RTS: Reduce MBLOCK_SPACE_SIZE on AArch64Erik de Castro Lopo2015-08-291-0/+5
| | | | | | | | | | | | | | | | | | | Commit 0d1a8d09f4 added a two step allocator for 64 bit systems. This allocator mmaps a huge (1 TB) chunk of memory out of which it does smaller allocations. On AArch64/Arm64 linux, this mmap was failing due to the Arm64 Linux kernel parameter CONFIG_ARM64_VA_BITS defaulting to 39 bits. Therefore reducing the AArch64 value for MBLOCK_SPACE_SIZE to make this allocation 1/4 TB while remaining 1 TB for other archs. Reviewers: ezyang, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1171 GHC Trac Issues: #10682
* base: Remove a redundant 'return'Simon Peyton Jones2015-08-271-2/+1
|
* TysWiredIn: Shuffle code aroundBen Gamari2015-08-271-73/+71
|
* MkIface: Introduce PatSynId, ReflectionId, DefMethIdBen Gamari2015-08-272-3/+29
| | | | | Currently we don't persist these three "advisory" IdInfos through interface files. We easily could if needed.
* IfaceEnv: Clean up updNameCache a bitBen Gamari2015-08-272-14/+15
|
* Move newImplicitBinder to from IfaceEnv to BuildTyClBen Gamari2015-08-272-19/+19
|
* PrelNames: introduce dcQual in place of conNameBen Gamari2015-08-271-20/+18
|
* Revert "Clean up handling of knownKeyNames"Ben Gamari2015-08-272-56/+56
| | | | | | | This reverts commit 792446906c718a08f0870b58acbdf2cfdeb77770. This commit was a failed part of an effort to split up D757. I'll need to try again and make sure I build-test next time.
* Clean up handling of knownKeyNamesBen Gamari2015-08-262-56/+56
|
* BinIface: Clean up whitespaceBen Gamari2015-08-261-3/+2
|
* PrelNames: Clean up list a bitBen Gamari2015-08-261-10/+11
|
* TcDeriv: Kill dead codeBen Gamari2015-08-261-76/+10
|
* tcRnDeclsi can use tcRnSrcDeclsSimon Peyton Jones2015-08-261-38/+3
| | | | | I'm not sure why tcRnDeclsi didn't call tcRnSrcDecls before, but now it does. About 20 lines of code vanish. Hooray.
* Implement lookupGlobal in TcEnv, and use itSimon Peyton Jones2015-08-263-12/+33
| | | | | This localises the (revolting) initTcForLookup function, exposing instead the more civilised interface for lookupGlobal
* Comments and white spaceSimon Peyton Jones2015-08-263-5/+6
|
* Fix algorithm.tex build and update with some new info.Edward Z. Yang2015-08-261-8/+77
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* configure.ac: Allow disabling of large-address-spaceErik de Castro Lopo2015-08-261-16/+26
| | | | | | | | | | | | | | | | | | Recent changes (commit 0d1a8d09f4) for 64 bit platforms allowed GHC to mmap one huge (currently 1 terrabyte) memory region from which to do its own allocations. This is enabled by default, but it would be nice (even just from the point of view of testing) to be able to disable this at configure time. Test Plan: configure and grep mk/config.h for USE_LARGE_ADDRESS_SPACE Reviewers: austin, ezyang, bgamari, rwbarton Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1170 GHC Trac Issues: #10791
* fix 64bit two-stage allocator on Solaris/AMD64 platform (#10790)Karel Gardas2015-08-251-1/+1
| | | | | | | | | | Test Plan: tested on Solaris 11/AMD64 when previous build failed Reviewers: bgamari, austin, simonmar, gcampax, ezyang Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1169
* Delete ExtsCompat46 (#8330)Thomas Miedema2015-08-247-327/+24
| | | | | | We require ghc-7.8 to build HEAD (ghc-7.11). Differential Revision: https://phabricator.haskell.org/D1165
* Check options before warning about source imports.Alex Rozenshteyn2015-08-229-6/+18
| | | | | | | | | | | | Summary: Fixes T10637 Reviewers: austin, bgamari, thomie Subscribers: dfordivam, simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1157 GHC Trac Issues: #10637
* Build system: delete unused distrib/MakefileThomas Miedema2015-08-211-73/+0
|
* Build system: simplify install.mk.inThomas Miedema2015-08-2110-53/+47
| | | | | | | | | | This will allow fixing #1851 more easily ("make install-strip" should work). This reverts 57e2a81c589103b50da80a9e378b1a11285bd521: "On Cygwin, use a Cygwin-style path for /bin/install's destination" Update submodule haddock and hsc2hs.
* Refactor: delete most of the module FastTypesThomas Miedema2015-08-2127-537/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverses some of the work done in #1405, and goes back to the assumption that the bootstrap compiler understands GHC-haskell. In particular: * use MagicHash instead of _ILIT and _CLIT * pattern matching on I# if possible, instead of using iUnbox unnecessarily * use Int#/Char#/Addr# instead of the following type synonyms: - type FastInt = Int# - type FastChar = Char# - type FastPtr a = Addr# * inline the following functions: - iBox = I# - cBox = C# - fastChr = chr# - fastOrd = ord# - eqFastChar = eqChar# - shiftLFastInt = uncheckedIShiftL# - shiftR_FastInt = uncheckedIShiftRL# - shiftRLFastInt = uncheckedIShiftRL# * delete the following unused functions: - minFastInt - maxFastInt - uncheckedIShiftRA# - castFastPtr - panicDocFastInt and pprPanicFastInt * rename panicFastInt back to panic# These functions remain, since they actually do something: * iUnbox * bitAndFastInt * bitOrFastInt Test Plan: validate Reviewers: austin, bgamari Subscribers: rwbarton Differential Revision: https://phabricator.haskell.org/D1141 GHC Trac Issues: #1405
* Delete FastBoolThomas Miedema2015-08-2115-216/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverses some of the work done in Trac #1405, and assumes GHC is smart enough to do its own unboxing of booleans now. I would like to do some more performance measurements, but the code changes can be reviewed already. Test Plan: With a perf build: ./inplace/bin/ghc-stage2 nofib/spectral/simple/Main.hs -fforce-recomp +RTS -t --machine-readable before: ``` [("bytes allocated", "1300744864") ,("num_GCs", "302") ,("average_bytes_used", "8811118") ,("max_bytes_used", "24477464") ,("num_byte_usage_samples", "9") ,("peak_megabytes_allocated", "64") ,("init_cpu_seconds", "0.001") ,("init_wall_seconds", "0.001") ,("mutator_cpu_seconds", "2.833") ,("mutator_wall_seconds", "4.283") ,("GC_cpu_seconds", "0.960") ,("GC_wall_seconds", "0.961") ] ``` after: ``` [("bytes allocated", "1301088064") ,("num_GCs", "310") ,("average_bytes_used", "8820253") ,("max_bytes_used", "24539904") ,("num_byte_usage_samples", "9") ,("peak_megabytes_allocated", "64") ,("init_cpu_seconds", "0.001") ,("init_wall_seconds", "0.001") ,("mutator_cpu_seconds", "2.876") ,("mutator_wall_seconds", "4.474") ,("GC_cpu_seconds", "0.965") ,("GC_wall_seconds", "0.979") ] ``` CPU time seems to be up a bit, but I'm not sure. Unfortunately CPU time measurements are rather noisy. Reviewers: austin, bgamari, rwbarton Subscribers: nomeata Differential Revision: https://phabricator.haskell.org/D1143 GHC Trac Issues: #1405
* Implement getSizeofMutableByteArrayOp primopBen Gamari2015-08-214-30/+58
| | | | | | | | | | | | | | | Now since ByteArrays are mutable we need to be more explicit about when the size is queried. Test Plan: Add testcase and validate Reviewers: goldfire, hvr, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1139 GHC Trac Issues: #9447
* Bag: Add Foldable instanceBen Gamari2015-08-211-0/+4
|
* GhcMake: Fix spelling in commentBen Gamari2015-08-211-1/+1
|
* Delete sync-allThomas Miedema2015-08-211-1023/+0
|
* Build system: delete half-baked Cygwin supportThomas Miedema2015-08-208-107/+15
| | | | | | | | | | | | | | | | | | | We only support building GHC on mys2 nowadays, see https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows. This (partially) reverts various commits from a few years ago, among which: * 5775d5142da227d65fb86994d363eb16841ee642 "Add OSTYPE build-system variable, and use it" * 3fb8c431824aa2f3bd979e35d1a283546fcfbe74 "Fix building libgmp on cygwin" * cdbb4720c424500adb57cbbef69721d0b039fa46 "Fix cmd invocation by libffi cuild system on Windows 7 cygwin" * e8121501ee3549a35e954726ccfd871ac9d51f83 "Fix dblatex and xml* tool detection on Windows" Reviewed by: austin, Phyx Differential Revision: https://phabricator.haskell.org/D1155
* Comments reformating/correctionsDivam2015-08-183-25/+26
| | | | | | | | | | Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1145
* Add selectors for common fields (DataCon/PatSyn) to ConLikeMatthew Pickering2015-08-188-25/+65
| | | | | | | | | | | | | When pattern synonyms were introduced a new sum type was used in places where DataCon used to be used. PatSyn and DataCon share many of the same fields, this patch adds selectors to ConLike for these fields. Reviewers: austin, goldfire, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1154
* rts/Printer.c: speed up '-Da' printer for 'LIBBFD' buildSergei Trofimovich2015-08-181-81/+11
| | | | | | | | | | | | | | | | | Patch switches from linear lookup in unordered array to a hash table lookup. When debugging GHC array contains 658_445 elements. Found performance gap when tried to debug blackholes. Signed-off-by: Sergei Trofimovich <siarheit@google.com> Reviewers: simonmar, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1150
* Fix rdynamic flag and test on WindowsTamar Christina2015-08-183-4/+9
| | | | | | | | | | | | | | | | | | | | | | | The rdynamic tests and feature are marked broken on windows. This is because the flag used doesn't exist and the symbol lookup in the test did not account for platform differences in name mangling. This commit fixes the flag and tests for rdynamic on windows. Test Plan: make TEST="rdynamic" on both x86 and x86_64 Reviewers: austin, thomie, bgamari Reviewed By: thomie, bgamari Subscribers: #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D1149 GHC Trac Issues: #9381
* Dump files always use UTF8 encoding #10762Michael Snoyman2015-08-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | When the Windows codepage or *nix LANG variable is something besides UTF-8, dumping to file can cause GHC to exit currently. This changes the output encoding for files to match the defined input encoding for Haskell source code (UTF-8), making it easier for users and build tools to capture this output. Test Plan: Create a Haskell source file with non-Latin characters for identifier names and compile with: LANG=C ghc -ddump-to-file -ddump-hi filename.hs -fforce-recomp Without this patch, it will fail. With this patch, it succeeds Reviewers: austin, rwbarton, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1151 GHC Trac Issues: #10762
* Transliterate unknown characters at outputMichael Snoyman2015-08-183-1/+20
| | | | | | | | | | | | | | | | | | | This avoids the compiler from crashing when, for example, a warning contains a non-Latin identifier and the LANG variable is set to C. Fixes #6037. Test Plan: Create a Haskell source file containing an identifier with non-Latin characters and no type signature. Compile with `LANG=C ghc -Wall foo.hs`, and it should fail. With this patch, it will succeed. Reviewers: austin, rwbarton, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1153 GHC Trac Issues: #6037, #10762
* Make rts/ThreadLabels.c threadsafe for debug runtime.Sergei Trofimovich2015-08-171-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rts/ThreadLabels.c has a global hashtable for each running haskell thread. It's not synchronized across OS threads. Was discovered when ran -debug build of ghc itself as: $ ghc-stage2 -j8 +RTS -A256M -l and glibc detected double-free corruption: #2 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7fe0bcebf368 "*** Error in `%s': %s: 0x%s ***\n") #3 in malloc_printerr (action=3, str=0x7fe0bcebf4c0 "double free or corruption (fasttop)", ptr=<optimized out>) #4 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) #5 in stgFree (p=0x7fe060001820) at rts/RtsUtils.c:108 #6 in freeHashTable (table=0x5929320, freeDataFun=0x36374df <stgFree>) at rts/Hash.c:360 #7 in freeThreadLabelTable () at rts/ThreadLabels.c:37 #8 in hs_exit_ (wait_foreign=rtsFalse) at rts/RtsStartup.c:403 #9 in shutdownHaskellAndExit (n=0, fastExit=0) at rts/RtsStartup.c:481 #10 in hs_main (...) at rts/RtsMain.c:91 #11 in main (...) at ghc/hschooks.c:63 Exposed itself after commit: > commit f6866824ce5cdf5359f0cad78c49d65f6d43af12 > Author: Sergei Trofimovich <slyfox@gentoo.org> > Date: Mon Aug 4 08:10:33 2014 -0500 > > ghc --make: add nicer names to RTS threads (threaded IO manager, make workers) Signed-off-by: Sergei Trofimovich <siarheit@google.com> Reviewers: austin, simonmar, ezyang, bgamari Reviewed By: ezyang, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1146
* Travis: prevent 10' no output, by setting VERBOSE=2Thomas Miedema2015-08-173-8/+12
|
* Testsuite: speedup running a single testThomas Miedema2015-08-151-1/+3
| | | | | | Benchmark: in rootdirectory, run `time make test TEST=dummy VERBOSE=0` Before this commit: 2.6s After this commit: 0.7s