1. 15 Nov, 2016 3 commits
  2. 14 Nov, 2016 6 commits
    • Sylvain HENRY's avatar
      Skip 64-bit symbol tables · 1b336d90
      Sylvain HENRY authored
      This patch makes the RTS linker skip 64-bit symbol table entries.  See
      https://mail.haskell.org/pipermail/ghc-devs/2016-November/013210.html
      
      Test Plan: validate
      
      Reviewers: austin, erikd, simonmar, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: osa1, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2697
      
      GHC Trac Issues: #12827
      1b336d90
    • Ben Gamari's avatar
      configure: Verify that GCC recognizes -no-pie flag · 011af2bf
      Ben Gamari authored
      It seems like GCC versions prior to 4.8 exit with code 0 when faced with
      an unrecognized flag. Silly compilers.
      
      Test Plan: Validate
      
      Reviewers: hvr, austin, ggreif
      
      Reviewed By: ggreif
      
      Subscribers: thomie, erikd
      
      Differential Revision: https://phabricator.haskell.org/D2707
      
      GHC Trac Issues: #12759
      011af2bf
    • Ben Gamari's avatar
      testsuite: Fix creep of T4029 · cb168900
      Ben Gamari authored
      Ostensibly due to IfaceType rework, but I have my doubts.
      cb168900
    • Simon Marlow's avatar
      Fix numa001 failure with "too many NUMA nodes" · e0ca7ff3
      Simon Marlow authored
      It seems that recent versions of the Linux kernel are using larger NUMA
      bitmasks; I see 1024 on my laptop running a 4.6.5 kernel.  This causes
      the NUMA tests to fail.  I'm fixing it to only fail if we have that many
      actual *nodes*, rather than failing if the size of the mask is too big.
      e0ca7ff3
    • Simon Marlow's avatar
      Accept output for scc003 · 034e01e4
      Simon Marlow authored
      Looks like e3f341f3 broke it, but we
      wouldn't have noticed because the test isn't run in validate.
      
      I think the change is OK.  We don't get a tick for x' any more, because
      it is converted directly to a case instead of a let-binding, but we
      still get a tick for the "pattern binding" (!x').  This could be better
      - f.(...) isn't all that intuitive - but it's not strictly wrong.
      034e01e4
    • Simon Marlow's avatar
      Remove CONSTR_STATIC · 55d535da
      Simon Marlow authored
      Summary:
      We currently have two info tables for a constructor
      
      * XXX_con_info: the info table for a heap-resident instance of the
        constructor, It has type CONSTR, or one of the specialised types like
        CONSTR_1_0
      
      * XXX_static_info: the info table for a static instance of this
        constructor, which has type CONSTR_STATIC or CONSTR_STATIC_NOCAF.
      
      I'm getting rid of the latter, and using the `con_info` info table for
      both static and dynamic constructors.  For rationale and more details
      see Note [static constructors] in SMRep.hs.
      
      I also removed these macros: `isSTATIC()`, `ip_STATIC()`,
      `closure_STATIC()`, since they relied on the CONSTR/CONSTR_STATIC
      distinction, and anyway HEAP_ALLOCED() does the same job.
      
      Test Plan: validate
      
      Reviewers: bgamari, simonpj, austin, gcampax, hvr, niteria, erikd
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2690
      
      GHC Trac Issues: #12455
      55d535da
  3. 13 Nov, 2016 2 commits
    • Ben Gamari's avatar
      Kill Type pretty-printer · 6c0f10fa
      Ben Gamari authored
      Here we consolidate the pretty-printing logic for types in IfaceType. We
      need IfaceType regardless and the printer for Type can be implemented in
      terms of that for IfaceType. See #11660.
      
      Note that this is very much a work-in-progress. Namely I still have yet
      to ponder how to ease the hs-boot file situation, still need to rip out
      more dead code, need to move some of the special cases for, e.g., `*` to
      the IfaceType printer, and need to get it to validate. That being said,
      it comes close to validating as-is.
      
      Test Plan: Validate
      
      Reviewers: goldfire, austin
      
      Subscribers: goldfire, thomie, simonpj
      
      Differential Revision: https://phabricator.haskell.org/D2528
      
      GHC Trac Issues: #11660
      6c0f10fa
    • Ben Gamari's avatar
      rts: Fix references to UChar · 8cb7bc5c
      Ben Gamari authored
      Test Plan: Validate on Windows.
      
      Reviewers: erikd, austin, simonmar
      
      Reviewed By: erikd
      
      Subscribers: Phyx, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2700
      8cb7bc5c
  4. 12 Nov, 2016 7 commits
  5. 11 Nov, 2016 4 commits
    • Ben Gamari's avatar
      Pass -no-pie to GCC · d421a7e2
      Ben Gamari authored
      Certain distributions (e.g. Debian and Ubuntu) have enabled PIE be
      default in their GCC packaging. This breaks our abuse of GCC as a linker
      which requires that we pass -Wl,-r, which is incompatible with
      PIE (since the former implies that we are generating a relocatable
      object file and the latter an executable).
      
      This is a second attempt at D2691. This attempt constrasts with D2691 in that
      it preserves the "does gcc support -no-pie" flag in settings, allowing this to
      be reconfigured by `configure` during installation of a binary distribution.
      Thanks for @rwbarton for drawing attention to this issue.
      
      Test Plan: Validate
      
      Reviewers: austin, hvr, erikd
      
      Reviewed By: erikd
      
      Subscribers: thomie, rwbarton, erikd
      
      Differential Revision: https://phabricator.haskell.org/D2693
      
      GHC Trac Issues: #12759
      d421a7e2
    • Ben Gamari's avatar
      rts: Fix LoadArchive on OS X · ec0bf811
      Ben Gamari authored
      ec0bf811
    • Simon Peyton Jones's avatar
      Revert "Refactor CallStack defaulting slightly" · 7a7bb5d2
      Simon Peyton Jones authored
      This reverts commit 317236db.
      
      I totally missed that in simplifyInfer for local functions
      we must NOT default call stacks.  So I'm reverting this.
      
      Fortunately caught by T10845, which sadly isn't run by
      validate --fast
      7a7bb5d2
    • Ben Gamari's avatar
      Revert "Pass -no-pie to GCC" · 60bb9d1c
      Ben Gamari authored
      This reverts commit bae4a55b.
      
      This will be superceded by D2693.
      60bb9d1c
  6. 10 Nov, 2016 15 commits
    • Ryan Scott's avatar
      Prevent GND from inferring an instance context for method-less classes · 03e8d26f
      Ryan Scott authored
      When `GeneralizedNewtypeDeriving` is used with a type class that has no
      methods, it will generate a redundant context, and as a result, it can
      trigger warnings when compiled with `-Wredundant-constraints`. This is a
      simple change in behavior to check beforehand if a class has methods
      when deriving it with GND, and if it has no methods, avoid inferring the
      redundant context.
      
      Beware that the test for #6088, which used to be expected to fail, now
      compiles without issue since it doesn't infer a problematic instance
      context.
      
      Thanks to Simon Peyton Jones for doing the necessary refactoring in
      f05d685a.
      
      Fixes #12814.
      
      Test Plan: ./validate
      
      Reviewers: goldfire, rwbarton, simonpj, austin, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2692
      
      GHC Trac Issues: #12814
      03e8d26f
    • thomasw's avatar
      Update user's guide after D2490 · e8ae4dc8
      thomasw authored
      D2490 added support for type wildcards in TH pattern splices. The user's
      guide still said that they were not supported, this patch fixes this.
      
      Test Plan: build documentation
      
      Reviewers: goldfire, austin, mvv, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2686
      
      GHC Trac Issues: #12164
      e8ae4dc8
    • Ben Gamari's avatar
      rts/linker: Move loadArchive to new source file · aa10c67e
      Ben Gamari authored
      Test Plan: Validate
      
      Reviewers: DemiMarie, austin, simonmar, erikd
      
      Reviewed By: DemiMarie
      
      Subscribers: Phyx, thomie, hvr
      
      Differential Revision: https://phabricator.haskell.org/D2642
      
      GHC Trac Issues: #12388
      aa10c67e
    • darshan's avatar
      rts: Add api to pin a thread to a numa node but without fixing a capability · 122d826d
      darshan authored
      `rts_setInCallCapability` sets the thread affinity as well as pins the
      numa node. We should also have the ability to set the numa node without
      setting the capability affinity. `rts_pinNumaNodeForCapability` function
      is added and exported via `RtsAPI.h`.
      
      Previous callers of `rts_setInCallCapability` should now also call
      `rts_pinNumaNodeForCapability` to get the same effect as before.
      
      Test Plan:
        ./validate
      
      Reviewers: austin, simonmar, bgamari
      
      Reviewed By: simonmar, bgamari
      
      Subscribers: thomie, niteria
      
      Differential Revision: https://phabricator.haskell.org/D2637
      
      GHC Trac Issues: #12764
      122d826d
    • David Feuer's avatar
      Read parentheses better · bef7e784
      David Feuer authored
      Instead of pulling a token and looking for `'('` or `')'`,
      just look for the character itself. This prevents us from
      lexing every single item twice, once to see if it's a
      left parenthesis and once to actually parse it.
      
      Partially fixes #12665
      
      Make parens faster more aggressively
      
      * Strip spaces before parsing, so we never have to strip
      the same spaces twice.
      
      * String parsers together manually, to try to avoid unnecessary closure
      creation.
      
      Test Plan: Validate
      
      Reviewers: austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2630
      
      GHC Trac Issues: #12665
      bef7e784
    • Ben Gamari's avatar
      Add Richard Eisenberg's new email to mailmap · e06e21af
      Ben Gamari authored
      Reviewers: austin, mpickering
      
      Reviewed By: mpickering
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2689
      e06e21af
    • Ben Gamari's avatar
      0a122a4c
    • Ben Gamari's avatar
      Pass -no-pie to GCC · bae4a55b
      Ben Gamari authored
      Certain distributions (e.g. Debian and Ubuntu) have enabled PIE be
      default in their GCC packaging. This breaks our abuse of GCC as a linker
      which requires that we pass -Wl,-r, which is incompatible with
      PIE (since the former implies that we are generating a relocatable
      object file and the latter an executable).
      
      Test Plan: Validate
      
      Reviewers: hvr, austin
      
      Subscribers: rwbarton, thomie, erikd
      
      Differential Revision: https://phabricator.haskell.org/D2691
      
      GHC Trac Issues: #12759
      bae4a55b
    • Ben Gamari's avatar
      configure: Pass HC_OPTS_STAGEx to build system · 9030d8e4
      Ben Gamari authored
      Test Plan: Try `./configure HC_OPTS_STAGE0=-foobar` and watch it fail
      
      Reviewers: austin, hvr
      
      Subscribers: thomie, erikd
      
      Differential Revision: https://phabricator.haskell.org/D2674
      9030d8e4
    • Ben Gamari's avatar
      build system: Include CONF_LD_LINKER_OPTS in ALL_LD_OPTS · 816d2e41
      Ben Gamari authored
      This ensures that artifacts built with build-prog see these options.
      Also spruce up comments.
      
      Test Plan: Carefully read it.
      
      Reviewers: austin, hvr, erikd
      
      Reviewed By: erikd
      
      Subscribers: thomie, erikd
      
      Differential Revision: https://phabricator.haskell.org/D2673
      816d2e41
    • Ben Gamari's avatar
      ghc-cabal: Use correct name of linker flags env variable · 500d90d2
      Ben Gamari authored
      Currently passing the `CONF_LD_LINKER_OPTS_STAGE0` environment
      variable to `configure` is broken due to this naming inconsistency.
      
      Test Plan: Try passing `CONF_LD_LINKER_OPTS_STAGE0` to `configure`.
      Look at resulting stage0 ghc invocation.
      
      Reviewers: austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2672
      500d90d2
    • Simon Peyton Jones's avatar
      Refactor CallStack defaulting slightly · 317236db
      Simon Peyton Jones authored
      This moves call-stack defaulting from simpl_top to solveWanteds,
      for reasons described in Note [CallStack defaulting].
      
      No change in visible behaviour.
      317236db
    • Simon Peyton Jones's avatar
      Refactoring of mkNewTypeEqn · f05d685a
      Simon Peyton Jones authored
      The refactoring here is very small.  I did it while studying
      Trac #12814.
      
      To implement the change in #12814, we can just un-comment the
      lines at line 1275.  It's ready to go but I didn't want to pull
      the trigger in this commit
      f05d685a
    • Simon Peyton Jones's avatar
      Adapt the (commented out) pprTrace in OccurAnal · 7fe71636
      Simon Peyton Jones authored
      I did this while investigating Trac #12776
      7fe71636
    • Alex Biehl's avatar
      Fix comment about pointer tagging · 2325afe9
      Alex Biehl authored
      `Lcall` enters the closure. If it has tags we jump directly to `Lret`. 
      
      Confirmed with some generated cmm code: 
      
      ```
                 R1 = _s2pP::P64;
                 Sp = Sp - 8;
                 if (R1 & 7 != 0) goto c2x0; else goto c2x1;
             c2x1:
                 call (I64[R1])(R1) returns to c2x0, args: 8, res: 8, upd: 8;
             c2x0:
                 _s2pQ::P64 = R1;
      ```
      2325afe9
  7. 07 Nov, 2016 2 commits
    • Ryan Scott's avatar
      Update 8.0.2 release notes for #12784 · 2e8463b2
      Ryan Scott authored
      Summary:
      The fix for #12220 exposed some ill-typed programs which passed the typechecker
      in GHC 8.0.1 but now fail to typecheck in GHC 8.0.2. It's a bit difficult to
      characterize what exactly triggers this bug, but we at least have a minimal
      example and a simple fix to illustrate the problem and solution, so let's
      add that the the 8.0.2 release notes to advertise this change.
      
      Resolves #12784.
      
      Reviewers: rwbarton, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2682
      
      GHC Trac Issues: #12784
      2e8463b2
    • Simon Marlow's avatar
      Fix hs_try_putmvar003 (#12800) · 91f9e138
      Simon Marlow authored
      Summary:
      There was a race condition on some shared data when creating the
      callback thread.
      
      I couldn't repro the issue without inserting a dummy usleep(100), but
      it's definitely a bug.
      
      Test Plan: validate
      
      Reviewers: bgamari, austin, erikd
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2678
      
      GHC Trac Issues: #12800
      91f9e138
  8. 06 Nov, 2016 1 commit