summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "disable shared libs on sparc (linux/solaris) (fixes #8857)"Sergei Trofimovich2014-08-271-3/+1
| | | | | | | | | | | | This reverts commit 623883f1ed0ee11cc925c4590fb09565403fd231. The commit a93ab43ab5f40cadbedea2f6342b93c245e91434 driver: pass '-fPIC' option to assembler as well fixes shared libraries on sparc at least on linux. Properly fixes Issue #8857 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* driver: pass '-fPIC' option to assembler as wellSergei Trofimovich2014-08-271-0/+44
| | | | | | | | | | | | | | | | | | | | | | | Summary: Before the patch '-fPIC' was passed only to C compiler, but not to assembler itself. It led to runtime crash in GHC_DYNAMIC_PROGRAMS=YES mode on sparc32. Technical details are in 'Note [-fPIC for assembler]'. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Test Plan: validate on sparc Reviewers: simonmar, austin, kgardas Reviewed By: austin Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D177
* UNREG: fix emission of large Integer literals in C codegenSergei Trofimovich2014-08-261-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: On amd64/UNREG build there is many failing tests trying to deal with 'Integer' types. Looking at 'integerConversions' test I've observed invalid C code generated by GHC. Cmm code CInt a = -1; (a == -1) yields 'False' with optimisations enabled via the following C code: StgWord64 a = (StgWord32)0xFFFFffffFFFFffffu; (a == 0xFFFFffffFFFFffffu) The patch fixes it by shrinking emitted literals to required sizes: StgWord64 a = (StgWord32)0xFFFFffffu; (a == 0xFFFFffffu) Thanks to Reid Barton for tracking down and fixing the issue. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Test Plan: validate on UNREG build (amd64, x86) Reviewers: simonmar, rwbarton, austin Subscribers: hvr, simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D173
* Improve documentation of record wildcardsSimon Peyton Jones2014-08-251-3/+13
| | | | | | In particular mention that they aren't allowed for record updates. Triggered by Trac #9437
* Two buglets in record wild-cards (Trac #9436 and #9437)Simon Peyton Jones2014-08-258-14/+53
| | | | | | | of named fields, whereas the code in RnPat.rnHsRecFields is much better set up to do so. Both easily fixed.
* Check for un-saturated type family applicationsSimon Peyton Jones2014-08-254-1/+25
| | | | | | | | | | | | | | | | | | | | This patch corrects an egregious error introduced by: commit 022f8750edf6f413fba31293435dcc62600eab77 Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Thu May 15 16:07:04 2014 +0100 Refactoring around TyCon.isSynTyCon * Document isSynTyCon better * Add isTypeSyonymTyCon for regular H98 type synonyms * Use isTypeSynonymTyCon rather than isSynTyCon where the former is really intended At this particular spot in TcValidity we really do mean isSynTyCon and not isTypeSynonymTyCon. Fixes Trac #9433
* Make Core Lint check for un-saturated type applicationsSimon Peyton Jones2014-08-251-4/+11
| | | | | | | | | Un-saturated type-family and type-synonym applications are detected in the front end, but for some reason Lint wasn't looking for them. I came across this when wondering why Trac #9433 didn't give a Core Lint error
* More refactoring in SpecConstrSimon Peyton Jones2014-08-251-49/+73
| | | | | | | | | | | This patch should make no change in behaviour. * Make RhsInfo into a record * Include ri_rhs_usg, which previously travelled around separately * Introduce specRec, specNonRec, and make them return [OneSpec] rather than SpecInfo
* Do not duplicate call information in SpecConstr (Trac #8852)Simon Peyton Jones2014-08-251-23/+49
| | | | | | | | | | This long-standing and egregious bug meant that call information was being gratuitously copied, leading to an exponential blowup in the number of calls to be examined when function definitions are deeply nested. That is what has been causing the blowup in SpecConstr's running time, not (as I had previously supposed) generating very large code. See Note [spec_usg includes rhs_usg]
* Introduce the Call data typesSimon Peyton Jones2014-08-251-3/+16
| | | | | This is just a small refactoring that makes the code a bit clearer, using a data type instead of a triple. We get better pretty-printing too.
* Use DumpStyle rather than UserStyle for pprTrace outputSimon Peyton Jones2014-08-251-2/+2
| | | | | | | | The main motivation is that user-style output assumes that everything has been tidied, not enough uniques are printed by default. The downside is that pprTrace output now has module prefixes which can be overwhelming, but -dsuppress-module-prefixes will suppress them.
* testsuite: add 16-byte case for T9329Sergei Trofimovich2014-08-251-1/+7
| | | | | | Exposes Issue #9512 on amd64 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Declare official GitHub home of libraries/{directory,process}Herbert Valerio Riedel2014-08-251-2/+2
| | | | | | | Effective immediately, pushing to libraries/{directory,process} requires pushing to ssh://git@github.com/haskell/{directory.process}.git. This has been done now even though there's no scripted tooling yet as the GitHub repo was already getting issues filed.
* testsuite: added 'bytes allocated' for T9339 wordsize(32)Sergei Trofimovich2014-08-241-1/+2
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Add MO_AddIntC, MO_SubIntC MachOps and implement in X86 backendReid Barton2014-08-239-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | Summary: These MachOps are used by addIntC# and subIntC#, which in turn are used in integer-gmp when adding or subtracting small Integers. The following benchmark shows a ~6% speedup after this commit on x86_64 (building GHC with BuildFlavour=perf). {-# LANGUAGE MagicHash #-} import GHC.Exts import Criterion.Main count :: Int -> Integer count (I# n#) = go n# 0 where go :: Int# -> Integer -> Integer go 0# acc = acc go n# acc = go (n# -# 1#) $! acc + 1 main = defaultMain [bgroup "count" [bench "100" $ whnf count 100]] Differential Revision: https://phabricator.haskell.org/D140
* rts/Linker.c: declare 'deRefStablePtr' as an exported 'rts' symbolSergei Trofimovich2014-08-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | $ inplace/bin/ghc-stage2 -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -optc-fno-builtin -fno-ghci-history \ testsuite/tests/ffi/should_run/T4038.hs --interactive -v0 -ignore-dot-ghci +RTS -I0.1 -RTS *Main> main <interactive>: /tmp/ghc16668_0/ghc16668_5.o: unknown symbol `deRefStablePtr' The reference to 'deRefStablePtr' is generated by 'compiler/deSugar/DsForeign.lhs': the_cfun = case maybe_target of Nothing -> text "(StgClosure*)deRefStablePtr(the_stableptr)" Just hs_fn -> char '&' <> ppr hs_fn <> text "_closure" Patch fixes all broken tests using 'import wrapper': TEST="ffi013 ffi010 ffi011 ffi005 ffi020 ffi006 ffi019 fed001 T1679 T4038" Tests manifested as broken only in DYNAMIC_GHC_PROGRAMS=NO builds, where GHCi's custom linker is used instead of system's linker. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* testsuite: mark testwsdeque mark as faulty on NOSMP buildsSergei Trofimovich2014-08-231-0/+1
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* testsuite: disable memcpy asm comparison tests on UNREGSergei Trofimovich2014-08-231-8/+9
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* testsuite: disable gcc's warnings about casts of incompatible prototypes in ↵Sergei Trofimovich2014-08-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | UNREG Haskell's 'foreign import' declaraion does not have a way to extress exact C prototypes (it ignores 'const' modifiers, exact pointer types, etc.) which leads to warnings when C backend generates calls to such functions: /tmp/ghc32698_0/ghc32698_10.hc:52:5: warning: conflicting types for built-in function ‘strlen’ [enabled by default] EF_(strlen); ^ Patch disables builtin functions for UNREG build to workaround test failures due to stderr mismatch. Fixes the following test failures: TEST="safePkg01 T5423 T7574 T3736" Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* testsuite: T7815 requires SMP support from ghcSergei Trofimovich2014-08-231-0/+1
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Enable GHC API tests by default.Edward Z. Yang2014-08-223-5/+5
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Normalise GHC version number to make tests less fragile.Edward Z. Yang2014-08-224-13/+16
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Revert "rts/base: Fix #9423"Austin Seipp2014-08-229-92/+51
| | | | | | | | | This should fix the Windows fallout, and hopefully this will be fixed once that's sorted out. This reverts commit f9f89b7884ccc8ee5047cf4fffdf2b36df6832df. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Do not zero out version number when processing wired-in packages.Edward Z. Yang2014-08-2227-47/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, GHC would look for instances of wired-in packages in the in-memory package database and null out the version number. This was necessary when the sourcePackageId was used to determine the linker symbols; however, we now use a package key, so only that needs to be updated. Long-term, we can remove this hack by ensuring that Cabal actually records the proper package key in the database. This will also fix an unrelated hack elsewhere. Keeping version numbers means that wired in packages get rendered differently when output by GHC. This is the source of all the test-case output changes. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: hvr, austin Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D170
* submodule update hpc/stm with gitignore.Edward Z. Yang2014-08-222-0/+0
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* gitignore: Ignore tests/rts/rdynamicEdward Z. Yang2014-08-221-0/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Fix #9465.Gabor Pali2014-08-221-1/+1
| | | | | | It turned out the sed(1) expressions are not fully portable. So revist my earlier attempt for getting GHC_LDFLAGS in the configure script and rewrite it in Perl instead.
* T8832: fix no newline at end of file warningKarel Gardas2014-08-211-1/+1
|
* includes: detabify/dewhitespace rts/storage/ClosureMacros.hAustin Seipp2014-08-201-44/+44
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace rts/storage/InfoTables.hAustin Seipp2014-08-201-34/+34
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace rts/storage/Block.hAustin Seipp2014-08-201-4/+4
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace rts/storage/GC.hAustin Seipp2014-08-201-27/+27
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace rts/storage/Closures.hAustin Seipp2014-08-201-17/+17
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace rts/storage/TSO.hAustin Seipp2014-08-201-13/+13
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace rts/storage/MBlock.hAustin Seipp2014-08-201-3/+3
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace rts/prof/LDV.hAustin Seipp2014-08-201-1/+1
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace rts/prof/CCS.hAustin Seipp2014-08-201-35/+34
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace rts/Hpc.hAustin Seipp2014-08-201-3/+3
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace rts/OSThreads.hAustin Seipp2014-08-201-10/+10
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace rts/Stable.hAustin Seipp2014-08-201-3/+3
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace rts/Threads.hAustin Seipp2014-08-201-4/+4
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace rts/Ticky.hAustin Seipp2014-08-201-8/+7
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace stg/Types.hAustin Seipp2014-08-201-20/+20
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace stg/SMP.hAustin Seipp2014-08-201-21/+21
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace stg/Regs.hAustin Seipp2014-08-201-52/+52
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace Cmm.hAustin Seipp2014-08-201-117/+117
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace HsFFI.hAustin Seipp2014-08-201-84/+84
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace Rts.hAustin Seipp2014-08-201-10/+10
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace RtsAPI.hAustin Seipp2014-08-201-9/+9
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] includes: detabify/dewhitespace Stg.hAustin Seipp2014-08-201-1/+1
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>