1. 04 Feb, 2019 1 commit
  2. 02 Feb, 2019 1 commit
  3. 01 Feb, 2019 2 commits
  4. 31 Jan, 2019 3 commits
  5. 30 Jan, 2019 6 commits
    • Zejun Wu's avatar
      Allocate bss section within proper range of other sections · 740534d4
      Zejun Wu authored
      Summary:
      This re-applies {D5195} and {D5235}, they were reverted as part of diff
      stack to unbreak i386. The proper fix is done in {D5289}.
      
      Allocate bss section within proper range of other sections:
      
      * when `+RTS -xp` is passed, allocate it contiguously as we did for
        jump islands
      * when we mmap the code to lower 2Gb, we should allocate bss section
        there too
      
      Test Plan:
      1. `./validate`
      
      2.
      
      with
      
      ```
      DYNAMIC_GHC_PROGRAMS = NO
      DYNAMIC_BY_DEFAULT = NO
      ```
      
      `TEST="T15729" make test` passed in both linux (both i386 and x86_64) and macos.
      
      3.
      
      Also test in a use case where we used to encouter error like:
      
      ```
      ghc-iserv-prof: R_X86_64_PC32 relocation out of range: (noname) =
      b90282ba
      ```
      
      and now, everything works fine.
      
      Reviewers: simonmar, bgamari, angerman, erikd
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15729
      
      Differential Revision: https://phabricator.haskell.org/D5290
      740534d4
    • Alan Zimmerman's avatar
      API Annotations: Parens not attached correctly for ClassDecl · 4bf35da4
      Alan Zimmerman authored
      The parens around the kinded tyvars should be attached to the class
      declaration as a whole, they are attached to the tyvar instead,
      outside the span.
      
      An annotation must always be within or after the span it is contained
      in.
      
      Closes #16212
      4bf35da4
    • Ben Gamari's avatar
      testsuite: Use makefile_test · 513a449c
      Ben Gamari authored
      This eliminates most uses of run_command in the testsuite in favor of the more
      structured makefile_test.
      513a449c
    • Ben Gamari's avatar
      testsuite: Introduce makefile_test · bdb559a6
      Ben Gamari authored
      bdb559a6
    • Ben Gamari's avatar
      Revert "Batch merge" · 172a5933
      Ben Gamari authored
      This reverts commit 76c8fd67.
      172a5933
    • Ben Gamari's avatar
      Batch merge · 76c8fd67
      Ben Gamari authored
      76c8fd67
  6. 28 Jan, 2019 3 commits
  7. 27 Jan, 2019 6 commits
  8. 23 Jan, 2019 3 commits
  9. 21 Jan, 2019 1 commit
  10. 20 Jan, 2019 1 commit
  11. 18 Jan, 2019 1 commit
  12. 17 Jan, 2019 1 commit
  13. 16 Jan, 2019 3 commits
    • Alec Theriault's avatar
      Fix tests for `integer-simple` · d2eb344a
      Alec Theriault authored
      A bunch of tests for `integer-simple` were now broken for a foolish reason:
      unlike the `integer-gmp` case, there is no CorePrep optimization for turning
      small integers directly into applications of `S#`.
      
      Rather than port this optimization to `integer-simple` (which would involve
      moving a bunch of `integer-simple` names into `PrelNames`), I switched
      as many tests as possible to use `Int`.
      
      The printing of `Integer` is already tested in `print037`.
      d2eb344a
    • Alec Theriault's avatar
      Support printing `integer-simple` Integers in GHCi · 582a96f4
      Alec Theriault authored
      This means that `:p` no longer leaks the implementation details of
      `Integer` with `integer-simple`. The `print037` test case should
      exercise all possible code paths for GHCi's code around printing
      `Integer`s (both in `integer-simple` and `integer-gmp`).
      
      `ghc` the package now also has a Cabal `integer-simple` flag (like the
      `integer-gmp` one).
      582a96f4
    • Roland Senn's avatar
  14. 15 Jan, 2019 3 commits
    • Ryan Scott's avatar
      Control validity-checking of type synonym applications more carefully · 9dc56b61
      Ryan Scott authored
      Trac #16059 shows that when validity checking applications of type
      synonyms, GHC sometimes wasn't checking the expanded type enough.
      We must be careful, however, since checking both the expanded type as
      well as the arguments to the type synonym can lead to exponential
      blowup (see https://ghc.haskell.org/trac/ghc/ticket/16059#comment:4).
      Nor can we omit checking either the expanded type or the argument for
      correctness reasons.
      
      The solution here is to introduce a new `ExpandMode` data type that
      is plumbed through all of the type-validity-checking functions in
      `TcValidity`. `ExpandMode` dictates whether we only check the
      expanded type (`Expand`), only check the arguments (`NoExpand), or
      both (`Both`). Importantly, if we check `Both` in the function for
      validity checking type synonym applications, then we switch to
      `NoExpand` when checking the arguments so as to avoid exponential
      blowup. See `Note [Correctness and performance of type synonym validity
      checking]` for the full story.
      9dc56b61
    • Ryan Scott's avatar
      Fix #16116 by removing badAssocRhs · e63518f5
      Ryan Scott authored
      e63518f5
    • Ryan Scott's avatar
      83a22066
  15. 14 Jan, 2019 1 commit
    • Herbert Valerio Riedel's avatar
      Update `Cabal` submodule · cb31b23d
      Herbert Valerio Riedel authored
      This also requires adapting `ghc-pkg` to use the new Cabal parsing API
      as the old ReadP-based one has finally been evicted for good.
      
      Hadrian bit finished by: Ben Gamari <ben@smart-cactus.org>
      cb31b23d
  16. 13 Jan, 2019 2 commits
    • Ömer Sinan Ağacan's avatar
      Refactor GHCi UI to fix #11606, #12091, #15721, #16096 · a34ee615
      Ömer Sinan Ağacan authored
      Instead of parsing and executing a statement or declaration directly we
      now parse them first and then execute in a separate step. This gives us
      the flexibility to inspect the parsed declaration before execution.
      Using this we now inspect parsed declarations, and if it's a single
      declaration of form `x = y` we execute it as `let x = y` instead, fixing
      a ton of problems caused by poor declaration support in GHCi.
      
      To avoid any users of the modules I left `execStmt` and `runDecls`
      unchanged and added `execStmt'` and `runDecls'` which work on parsed
      statements/declarations.
      a34ee615
    • Ryan Scott's avatar
      Don't invoke dataConSrcToImplBang on newtypes · 076f5862
      Ryan Scott authored
      076f5862
  17. 12 Jan, 2019 2 commits
    • Ömer Sinan Ağacan's avatar
      Fix negative mutator time in GC stats in prof builds · 19670bc3
      Ömer Sinan Ağacan authored
      Because garbage collector calls `retainerProfile()` and `heapCensus()`,
      GC times normally include some of PROF times too. To fix this we have
      these lines:
      
          // heapCensus() is called by the GC, so RP and HC time are
          // included in the GC stats.  We therefore subtract them to
          // obtain the actual GC cpu time.
          stats.gc_cpu_ns      -=  prof_cpu;
          stats.gc_elapsed_ns  -=  prof_elapsed;
      
      These variables are later used for calculating GC time excluding the
      final GC (which should be attributed to EXIT).
      
          exit_gc_elapsed      = stats.gc_elapsed_ns - start_exit_gc_elapsed;
      
      The problem is if we subtract PROF times from `gc_elapsed_ns` and then
      subtract `start_exit_gc_elapsed` from the result, we end up subtracting
      PROF times twice, because `start_exit_gc_elapsed` also includes PROF
      times.
      
      We now subtract PROF times from GC after the calculations for EXIT and
      MUT times. The existing assertion that checks
      
          INIT + MUT + GC + EXIT = TOTAL
      
      now holds. When we subtract PROF numbers from GC, and a new assertion
      
          INIT + MUT + GC + PROF + EXIT = TOTAL
      
      also holds.
      
      Fixes #15897. New assertions added in this commit also revealed #16102,
      which is also fixed by this commit.
      19670bc3
    • Ömer Sinan Ağacan's avatar
      Fix raiseAsync() UNDERFLOW_FRAME handling in profiling runtime · 74cd4ec5
      Ömer Sinan Ağacan authored
      UNDERFLOW_FRAMEs don't have profiling headers so we have to use the
      AP_STACK's function's CCS as the new frame's CCS.
      
      Fixes one of the many bugs caught by concprog001 (#15508).
      74cd4ec5