Skip to content
Snippets Groups Projects
  1. Mar 24, 2021
  2. Mar 23, 2021
    • Sylvain Henry's avatar
      Move loader state into Interp · 05c5c054
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      The loader state was stored into HscEnv. As we need to have two
      interpreters and one loader state per interpreter in #14335, it's
      natural to make the loader state a field of the Interp type.
      
      As a side effect, many functions now only require a Interp parameter
      instead of HscEnv. Sadly we can't fully free GHC.Linker.Loader of HscEnv
      yet because the loader is initialised lazily from the HscEnv the first
      time it is used. This is left as future work.
      
      HscEnv may not contain an Interp value (i.e. hsc_interp :: Maybe Interp).
      So a side effect of the previous side effect is that callers of the
      modified functions now have to provide an Interp. It is satisfying as it
      pushes upstream the handling of the case where HscEnv doesn't contain an
      Interpreter. It is better than raising a panic (less partial functions,
      "parse, don't validate", etc.).
      05c5c054
    • Ben Gamari's avatar
      rts: Use long-path-aware stat · 7a657751
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Previously `pathstat` relied on msvcrt's `stat` implementation, which was
      not long-path-aware. It should rather be defined in terms of the `stat`
      implementation provided by `utils/fs`.
      
      Fixes #19541.
      7a657751
    • Peter Trommler's avatar
      PPC NCG: Fix int to float conversion · 26ba86f7
      Peter Trommler authored and Marge Bot's avatar Marge Bot committed
      In commit 540fa6b2 integer to float conversions were changed to round to
      the nearest even. Implement a special case for 64 bit integer to single
      precision floating point numbers.
      
      Fixes #19563.
      26ba86f7
    • Simon Peyton Jones's avatar
      More improvement to MonoLocalBinds documentation · 26dd1f88
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      26dd1f88
  3. Mar 22, 2021
  4. Mar 21, 2021
    • Ryan Scott's avatar
      Remove unnecessary extendTyVarEnvFVRn function · adbaa9a9
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      The `extendTyVarEnvFVRn` function does the exact same thing as
      `bindLocalNamesFV`. I see no meaningful distinction between the two functions,
      so let's just remove the former (which is only used in a handful of places) in
      favor of the latter.
      
      Historical note: `extendTyVarEnvFVRn` and `bindLocalNamesFV` used to be
      distinct functions, but their implementations were synchronized in 2004 as a
      part of commit 20e39e0e.
      adbaa9a9
  5. Mar 20, 2021
    • Ryan Scott's avatar
      Bump template-haskell version to 2.18.0.0 · 6a375b53
      Ryan Scott authored
      This requires bumping the `exceptions` and `text` submodules to bring in
      commits that bump their respective upper version bounds on `template-haskell`.
      
      Fixes #19083.
      6a375b53
    • Ryan Scott's avatar
      91ddac2f
    • Ben Gamari's avatar
      Clean up TBDs in changelog · c53faa0c
      Ben Gamari authored and Ryan Scott's avatar Ryan Scott committed
      (cherry picked from commit 4f334120c8e9cc4aefcbf11d99f169f648af9fde)
      c53faa0c
    • Ben Gamari's avatar
      gitlab-ci: Always start with fresh clone · fb939498
      Ben Gamari authored
      Currently we are suffering from issues that appear to be 
      caused by non-hermetic builds.  Try avoiding this by setting
      `GIT_STRATEGY` to `clone`.
      fb939498
    • Moritz Angermann's avatar
      Add error information to osCommitMemory on failure. · 71e609fb
      Moritz Angermann authored and Marge Bot's avatar Marge Bot committed
      71e609fb
    • Sebastian Graf's avatar
      Remove outdated Vagrantfile · fa499356
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      fa499356
    • vdukhovni's avatar
      Add fold vs. mconcat test T17123 · e84e2805
      vdukhovni authored and Marge Bot's avatar Marge Bot committed
      e84e2805
    • Sylvain Henry's avatar
      Fix fake import in GHC.Exception.Type boot module · 226cefd0
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      It seems like I imported "GHC.Types ()" thinking that it would
      transitively import GHC.Num.Integer when I wrote that module; but it
      doesn't.
      
      This led to build failures.
      See https://mail.haskell.org/pipermail/ghc-devs/2021-March/019641.html
      226cefd0
    • John Ericson's avatar
      Fix literals for unregisterized backend of small types · 8e054ff3
      John Ericson authored and Marge Bot's avatar Marge Bot committed
      All credit to @hsyl20, who in
      ghc/ghc!4717 (comment 338560)
      
      
      figured out this was a problem.
      
      To fix this, we use casts in addition to the shrinking and suffixing
      that is already done. It might make for more verbose code, I don't think
      that matters too much.
      
      In the future, perhaps some of the shrinking and suffixing can be
      removed for being redundant. That proved less trivial than it sounds, so
      this wasn't done at this time.
      
      Progress towards #19026
      
      Metric Increase:
          T12707
          T13379
      
      Co-authored-by: default avatarSylvain Henry <hsyl20@gmail.com>
      8e054ff3
    • John Ericson's avatar
      Add more boundary checks for `rem` and `mod` · 3fa3fb79
      John Ericson authored and Marge Bot's avatar Marge Bot committed
      It's quite backend-dependent whether we will actually handle that case
      right, so let's just always do this as a precaution.
      
      In particular, once we replace the native primops used here with the new
      sized primops, the 16-bit ones on x86 will begin to use 16-bit sized
      instructions where they didn't before.
      
      Though I'm not sure of any arch which has 8-bit scalar instructions, I
      also did those for consistency. Plus, there are *vector* 8-bit ops in
      the wild, so if we ever got into autovectorization or something maybe
      it's prudent to put this here as a reminder not to forget about
      catching overflows.
      
      Progress towards #19026
      3fa3fb79
    • Simon Peyton Jones's avatar
      Fix an levity-polymorphism error · d4605e7c
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      As #19522 points out, we did not account for visible type
      application when trying to reject naked levity-polymorphic
      functions that have no binding.
      
      This patch tidies up the code, and fixes the bug too.
      d4605e7c
    • Simon Jakobi's avatar
      Add compiler perf regression test for #9198 · 8592a246
      Simon Jakobi authored and Marge Bot's avatar Marge Bot committed
      8592a246
    • Sebastian Graf's avatar
      Nested CPR light (#19398) · 044e5be3
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      While fixing #19232, it became increasingly clear that the vestigial
      hack described in `Note [Optimistic field binder CPR]` is complicated
      and causes reboxing. Rather than make the hack worse, this patch
      gets rid of it completely in favor of giving deeply unboxed parameters
      the Nested CPR property. Example:
      ```hs
      f :: (Int, Int) -> Int
      f p = case p of
       (x, y) | x == y    = x
              | otherwise = y
      ```
      Based on `p`'s `idDemandInfo` `1P(1P(L),1P(L))`, we can see that both
      fields of `p` will be available unboxed. As a result, we give `p` the
      nested CPR property `1(1,1)`. When analysing the `case`, the field
      CPRs are transferred to the binders `x` and `y`, respectively, so that
      we ultimately give `f` the CPR property.
      
      I took the liberty to do a bit of refactoring:
      
      - I renamed `CprResult` ("Constructed product result result") to plain
        `Cpr`.
      - I Introduced `FlatConCpr` in addition to (now nested) `ConCpr` and
        and according pattern synonym that rewrites flat `ConCpr` to
        `FlatConCpr`s, purely for compiler perf reasons.
      - Similarly for performance reasons, we now store binders with a
        Top signature in a separate `IntSet`,
        see `Note [Efficient Top sigs in SigEnv]`.
      - I moved a bit of stuff around in `GHC.Core.Opt.WorkWrap.Utils` and
        introduced `UnboxingDecision` to replace the `Maybe DataConPatContext`
        type we used to return from `wantToUnbox`.
      - Since the `Outputable Cpr` instance changed anyway, I removed the
        leading `m` which we used to emit for `ConCpr`. It's just noise,
        especially now that we may output nested CPRs.
      
      Fixes #19398.
      044e5be3
    • Andreas Klebinger's avatar
      Make the simplifier slightly stricter. · 62b0e1bc
      Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
      This commit reduces allocations by the simplifier by 3% for the
      Cabal test at -O2.
      
      We do this by making a few select fields, bindings and arguments strict
      which reduces allocations for the simplifier by around 3% in total
      for the Cabal test. Which is about 2% fewer allocations in total at
      -O2.
      
      -------------------------
      Metric Decrease:
          T18698a
          T18698b
          T9233
          T9675
          T9872a
          T9872b
          T9872c
          T9872d
          T10421
          T12425
          T13253
          T5321FD
          T9961
      -------------------------
      62b0e1bc
    • Luite Stegeman's avatar
      Generate GHCi bytecode from STG instead of Core and support unboxed · 1f94e0f7
      Luite Stegeman authored and Marge Bot's avatar Marge Bot committed
      tuples and sums.
      
      fixes #1257
      1f94e0f7
    • Luite Stegeman's avatar
      Transfer tickish things to GHC.Types.Tickish · 7de3532f
      Luite Stegeman authored and Marge Bot's avatar Marge Bot committed
      Metric Increase:
          MultiLayerModules
      7de3532f
    • Luite Stegeman's avatar
      rename Tickish to CoreTickish · 0107f356
      Luite Stegeman authored and Marge Bot's avatar Marge Bot committed
      0107f356
    • Luite Stegeman's avatar
      remove superfluous 'id' type parameter from GenTickish · 26328a68
      Luite Stegeman authored and Marge Bot's avatar Marge Bot committed
      The 'id' type is now determined by the pass, using the XTickishId
      type family.
      26328a68
    • Luite Stegeman's avatar
      Save the type of breakpoints in the Breakpoint tick in STG · dd11f2d5
      Luite Stegeman authored and Marge Bot's avatar Marge Bot committed
      GHCi needs to know the types of all breakpoints, but it's
      not possible to get the exprType of any expression in STG.
      
      This is preparation for the upcoming change to make GHCi
      bytecode from STG instead of Core.
      dd11f2d5
    • GHC GitLab CI's avatar
      testsuite: Normalise slashes · ceef490b
      GHC GitLab CI authored and Marge Bot's avatar Marge Bot committed
      In the `comments` and `literals` tests, since they contain file paths.
      ceef490b
    • GHC GitLab CI's avatar
      check-ppr,check-exact: Write out result as binary · adf93721
      GHC GitLab CI authored and Marge Bot's avatar Marge Bot committed
      Previously we would use `writeFile` to write the intermediate files to
      check for round-tripping. However, this will open the output handle as a
      text handle, which on Windows will change line endings. Avoid this by
      opening as binary.
      
      Explicitly use utf8 encoding.
      
      This is for tests only, do not need to worry about user compatibility.
      adf93721
    • Alan Zimmerman's avatar
      GHC Exactprint main commit · 95275a5f
      Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
      Metric Increase:
             T10370
             parsing001
      
      Updates haddock submodule
      95275a5f
    • Alan Zimmerman's avatar
      Add the main types to be used for exactprint in the GHC AST · f940fd46
      Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
      The MR introducing the API Annotations, !2418 is huge.
      
      Conceptually it is two parts, the one deals with introducing the new
      types to be used for annotations, and outlining how they will be
      used.  This is a small change, localised to
      compiler/GHC/Parser/Annotation.hs and is contained in this commit.
      
      The follow-up, larger commit deals with mechanically working this
      through the entire AST and updating all the parts affected by it.
      
      It is being split so the part that needs good review feedback can be
      seen in isolation, prior to the rest coming in.
      f940fd46
    • Gaël Deest's avatar
      [skip ci] Fix 'Ord' documentation inconsistency · 7d027433
      Gaël Deest authored and Marge Bot's avatar Marge Bot committed
      Current documentation for the `Ord` typeclass is inconsistent. It
      simultaneously mentions that:
      
      > The 'Ord' class is used for totally ordered datatypes.
      
      And:
      
      > The Haskell Report defines no laws for 'Ord'. However, '<=' is
      > customarily expected to implement a non-strict partial order […]
      
      The Haskell report (both 98 and 2010 versions) mentions total ordering,
      which implicitly does define laws. Moreover, `compare :: Ord a => a -> a
      -> Ordering` and `data Ordering = LT | EQ | GT` imply that the order is
      indeed total (there is no way to say that two elements are not
      comparable). This MR fixes the Haddock comment, and adds a comparability
      law to the list of suggested properties.
      7d027433
Loading