[Git][ghc/ghc][wip/semigroup-sdoc] 43 commits: Change zipWith to zipWithEqual in a few places

Vladislav Zavialov gitlab at gitlab.haskell.org
Tue Apr 21 20:58:57 UTC 2020



Vladislav Zavialov pushed to branch wip/semigroup-sdoc at Glasgow Haskell Compiler / GHC


Commits:
0da186c1 by Krzysztof Gogolewski at 2020-04-14T07:55:20-04:00
Change zipWith to zipWithEqual in a few places

- - - - -
074c1ccd by Andreas Klebinger at 2020-04-14T07:55:55-04:00
Small change to the windows ticker.

We already have a function to go from time to ms so use it.
Also expand on the state of timer resolution.

- - - - -
b69cc884 by Alp Mestanogullari at 2020-04-14T07:56:38-04:00
hadrian: get rid of unnecessary levels of nesting in source-dist

- - - - -
d0c3b069 by Julien Debon at 2020-04-14T07:57:16-04:00
doc (Foldable): Add examples to Data.Foldable

See #17929

- - - - -
5b08e0c0 by Ben Gamari at 2020-04-14T23:28:20-04:00
StgCRun: Enable unwinding only on Linux

It's broken on macOS due and SmartOS due to assembler differences
(#15207) so let's be conservative in enabling it. Also, refactor things
to make the intent clearer.

- - - - -
27cc2e7b by Ben Gamari at 2020-04-14T23:28:57-04:00
rts: Don't mark evacuate_large as inline

This function has two callsites and is quite large. GCC consequently
decides not to inline and warns instead. Given the situation, I can't
blame it. Let's just remove the inline specifier.

- - - - -
9853fc5e by Ben Gamari at 2020-04-14T23:29:48-04:00
base: Enable large file support for OFD locking impl.

Not only is this a good idea in general but this should also avoid
issue #17950 by ensuring that off_t is 64-bits.

- - - - -
7b41f21b by Matthew Pickering at 2020-04-14T23:30:24-04:00
Hadrian: Make -i paths absolute

The primary reason for this change is that ghcide does not work with
relative paths. It also matches what cabal and stack do, they always
pass absolute paths.

- - - - -
41230e26 by Daniel Gröber at 2020-04-14T23:31:01-04:00
Zero out pinned block alignment slop when profiling

The heap profiler currently cannot traverse pinned blocks because of
alignment slop. This used to just be a minor annoyance as the whole block
is accounted into a special cost center rather than the respective object's
CCS, cf. #7275. However for the new root profiler we would like to be able
to visit _every_ closure on the heap. We need to do this so we can get rid
of the current 'flip' bit hack in the heap traversal code.

Since info pointers are always non-zero we can in principle skip all the
slop in the profiler if we can rely on it being zeroed. This assumption
caused problems in the past though, commit a586b33f8e ("rts: Correct
handling of LARGE ARR_WORDS in LDV profiler"), part of !1118, tried to use
the same trick for BF_LARGE objects but neglected to take into account that
shrink*Array# functions don't ensure that slop is zeroed when not
compiling with profiling.

Later, commit 0c114c6599 ("Handle large ARR_WORDS in heap census (fix
as we will only be assuming slop is zeroed when profiling is on.

This commit also reduces the ammount of slop we introduce in the first
place by calculating the needed alignment before doing the allocation for
small objects where we know the next available address. For large objects
we don't know how much alignment we'll have to do yet since those details
are hidden behind the allocateMightFail function so there we continue to
allocate the maximum additional words we'll need to do the alignment.

So we don't have to duplicate all this logic in the cmm code we pull it
into the RTS allocatePinned function instead.

Metric Decrease:
    T7257
    haddock.Cabal
    haddock.base

- - - - -
15fa9bd6 by Daniel Gröber at 2020-04-14T23:31:01-04:00
rts: Expand and add more notes regarding slop

- - - - -
caf3f444 by Daniel Gröber at 2020-04-14T23:31:01-04:00
rts: allocatePinned: Fix confusion about word/byte units

- - - - -
c3c0f662 by Daniel Gröber at 2020-04-14T23:31:01-04:00
rts: Underline some Notes as is conventional

- - - - -
e149dea9 by Daniel Gröber at 2020-04-14T23:31:38-04:00
rts: Fix nomenclature in OVERWRITING_CLOSURE macros

The additional commentary introduced by commit 8916e64e5437 ("Implement
shrinkSmallMutableArray# and resizeSmallMutableArray#.") unfortunately got
this wrong. We set 'prim' to true in overwritingClosureOfs because we
_don't_ want to call LDV_recordDead().

The reason is because of this "inherently used" distinction made in the LDV
profiler so I rename the variable to be more appropriate.

- - - - -
1dd3d18c by Daniel Gröber at 2020-04-14T23:31:38-04:00
Remove call to LDV_RECORD_CREATE for array resizing

- - - - -
19de2fb0 by Daniel Gröber at 2020-04-14T23:31:38-04:00
rts: Assert LDV_recordDead is not called for inherently used closures

The comments make it clear LDV_recordDead should not be called for
inhererently used closures, so add an assertion to codify this fact.

- - - - -
0b934e30 by Ryan Scott at 2020-04-14T23:32:14-04:00
Bump template-haskell version to 2.17.0.0

This requires bumping the `exceptions` and `text` submodules to bring
in commits that bump their respective upper version bounds on
`template-haskell`.

Fixes #17645. Fixes #17696.

Note that the new `text` commit includes a fair number of additions
to the Haddocks in that library. As a result, Haddock has to do more
work during the `haddock.Cabal` test case, increasing the number of
allocations it requires. Therefore,

-------------------------
Metric Increase:
    haddock.Cabal
-------------------------

- - - - -
22cc8e51 by Ryan Scott at 2020-04-15T17:48:47-04:00
Fix #18052 by using pprPrefixOcc in more places

This fixes several small oversights in the choice of pretty-printing
function to use. Fixes #18052.

- - - - -
ec77b2f1 by Daniel Gröber at 2020-04-15T17:49:24-04:00
rts: ProfHeap: Fix wrong time in last heap profile sample

We've had this longstanding issue in the heap profiler, where the time of
the last sample in the profile is sometimes way off causing the rendered
graph to be quite useless for long runs.

It seems to me the problem is that we use mut_user_time() for the last
sample as opposed to getRTSStats(), which we use when calling heapProfile()
in GC.c.

The former is equivalent to getProcessCPUTime() but the latter does
some additional stuff:

    getProcessCPUTime() - end_init_cpu - stats.gc_cpu_ns -
    stats.nonmoving_gc_cpu_ns

So to fix this just use getRTSStats() in both places.

- - - - -
85fc32f0 by Sylvain Henry at 2020-04-17T12:45:25-04:00
Hadrian: fix dyn_o/dyn_hi rule (#17534)

- - - - -
bfde3b76 by Ryan Scott at 2020-04-17T12:46:02-04:00
Fix #18065 by fixing an InstCo oversight in Core Lint

There was a small thinko in Core Lint's treatment of `InstCo`
coercions that ultimately led to #18065. The fix: add an apostrophe.
That's it!

Fixes #18065.

Co-authored-by: Simon Peyton Jones <simonpj at microsoft.com>

- - - - -
a05348eb by Cale Gibbard at 2020-04-17T13:08:47-04:00
Change the fail operator argument of BindStmt to be a Maybe

Don't use noSyntaxExpr for it. There is no good way to defensively case
on that, nor is it clear one ought to do so.

- - - - -
79e27144 by John Ericson at 2020-04-17T13:08:47-04:00
Use trees that grow for rebindable operators for `<-` binds

Also add more documentation.

- - - - -
18bc16ed by Cale Gibbard at 2020-04-17T13:08:47-04:00
Use FailOperator in more places, define a couple datatypes (XBindStmtRn and XBindStmtTc) to help clarify the meaning of XBindStmt in the renamer and typechecker

- - - - -
84cc8394 by Simon Peyton Jones at 2020-04-18T13:20:29-04:00
Add a missing zonk in tcHsPartialType

I omitted a vital zonk when refactoring tcHsPartialType in
   commit 48fb3482f8cbc8a4b37161021e846105f980eed4
   Author: Simon Peyton Jones <simonpj at microsoft.com>
   Date:   Wed Jun 5 08:55:17 2019 +0100

   Fix typechecking of partial type signatures

This patch fixes it and adds commentary to explain why.

Fixes #18008

- - - - -
2ee96ac1 by Ben Gamari at 2020-04-18T13:21:05-04:00
gitlab-ci: Bump FreeBSD bootstrap compiler to 8.10.1

- - - - -
434312e5 by Ben Gamari at 2020-04-18T13:21:05-04:00
gitlab-ci: Enable FreeBSD job for so-labelled MRs

- - - - -
ddffb227 by Ben Gamari at 2020-04-18T13:21:05-04:00
gitlab-ci: Use rules syntax for conditional jobs

- - - - -
e2586828 by Ben Gamari at 2020-04-18T13:21:05-04:00
Bump hsc2hs submodule

- - - - -
15ab6cd5 by Ömer Sinan Ağacan at 2020-04-18T13:21:44-04:00
Improve prepForeignCall error reporting

Show parameters and description of the error code when ffi_prep_cif
fails.

This may be helpful for debugging #17018.

- - - - -
3ca52151 by Sylvain Henry at 2020-04-18T20:04:14+02:00
GHC.Core.Opt renaming

* GHC.Core.Op                  => GHC.Core.Opt
* GHC.Core.Opt.Simplify.Driver => GHC.Core.Opt.Driver
* GHC.Core.Opt.Tidy            => GHC.Core.Tidy
* GHC.Core.Opt.WorkWrap.Lib    => GHC.Core.Opt.WorkWrap.Utils

As discussed in:
 * https://mail.haskell.org/pipermail/ghc-devs/2020-April/018758.html
 * https://gitlab.haskell.org/ghc/ghc/issues/13009#note_264650

- - - - -
15312bbb by Sylvain Henry at 2020-04-18T20:04:46+02:00
Modules (#13009)

* SysTools
* Parser
* GHC.Builtin
* GHC.Iface.Recomp
* Settings

Update Haddock submodule

Metric Decrease:
    Naperian
    parsing001

- - - - -
eaed0a32 by Alexis King at 2020-04-19T03:16:44-04:00
Add missing addInScope call for letrec binders in OccurAnal

This fixes #18044, where a shadowed variable was incorrectly substituted
by the binder swap on the RHS of a floated-in letrec. This can only
happen when the uniques line up *just* right, so writing a regression
test would be very difficult, but at least the fix is small and
straightforward.

- - - - -
36882493 by Shayne Fletcher at 2020-04-20T04:36:43-04:00
Derive Ord instance for Extension

Metric Increase:
   T12150
   T12234

- - - - -
b43365ad by Simon Peyton Jones at 2020-04-20T04:37:20-04:00
Fix a buglet in redundant-constraint warnings

Ticket #18036 pointed out that we were reporting a redundant
constraint when it really really wasn't.

Turned out to be a buglet in the SkolemInfo for the
relevant implication constraint.  Easily fixed!

- - - - -
d5fae7da by Ömer Sinan Ağacan at 2020-04-20T14:39:28-04:00
Mark T12010 fragile on 32-bit

- - - - -
bca02fca by Adam Sandberg Ericsson at 2020-04-21T06:38:45-04:00
docs: drop note about not supporting shared libraries on unix systems

[skip ci]

- - - - -
6655f933 by Sylvain Henry at 2020-04-21T06:39:32-04:00
Use ParserFlags in GHC.Runtime.Eval (#17957)

Instead of passing `DynFlags` to functions such as `isStmt` and
`hasImport` in `GHC.Runtime.Eval` we pass `ParserFlags`. It's a much
simpler structure that can be created purely with `mkParserFlags'`.

- - - - -
70be0fbc by Sylvain Henry at 2020-04-21T06:39:32-04:00
GHC.Runtime: avoid DynFlags (#17957)

* add `getPlatform :: TcM Platform` helper
* remove unused `DynFlags` parameter from `emptyPLS`

- - - - -
35e43d48 by Sylvain Henry at 2020-04-21T06:39:32-04:00
Avoid DynFlags in Ppr code (#17957)

* replace `DynFlags` parameters with `SDocContext` parameters for a few
  Ppr related functions: `bufLeftRenderSDoc`, `printSDoc`,
  `printSDocLn`, `showSDocOneLine`.

* remove the use of `pprCols :: DynFlags -> Int` in Outputable. We
  already have the information via `sdocLineLength :: SDocContext ->
  Int`

- - - - -
ce5c2999 by Sylvain Henry at 2020-04-21T06:39:32-04:00
Avoid using sdocWithDynFlags (#17957)

Remove one use of `sdocWithDynFlags` from `GHC.CmmToLlvm.llvmCodeGen'`
and from `GHC.Driver.CodeOutput.profilingInitCode`

- - - - -
f2a98996 by Sylvain Henry at 2020-04-21T06:39:32-04:00
Avoid `sdocWithDynFlags` in `pprCLbl` (#17957)

* add a `DynFlags` parameter to `pprCLbl`
* put `maybe_underscore` and `pprAsmCLbl` in a `where` clause to avoid
  `DynFlags` parameters

- - - - -
747093b7 by Sylvain Henry at 2020-04-21T06:39:32-04:00
CmmToAsm DynFlags refactoring (#17957)

* Remove `DynFlags` parameter from `isDynLinkName`: `isDynLinkName` used
  to test the global `ExternalDynamicRefs` flag. Now we test it outside of
  `isDynLinkName`

* Add new fields into `NCGConfig`: current unit id, sse/bmi versions,
  externalDynamicRefs, etc.

* Replace many uses of `DynFlags` by `NCGConfig`

* Moved `BMI/SSE` datatypes into `GHC.Platform`

- - - - -
0fa28376 by Vladislav Zavialov at 2020-04-21T23:57:54+03:00
Use Semigroup's (<>) for Doc/SDoc

Before this patch, Outputable.hs defined its own (<>) which caused
conflicts with (Data.Semigroup.<>) and thus led to inconvenience.

However, replacing it is not trivial due to a different fixity:

  http://www.haskell.org/pipermail/libraries/2011-November/017066.html

Nevertheless, it is possible to update the pretty-printing code to work
with (<>) of a different fixitiy, and that's what this patch implements.

Now Doc and SDoc are instances of Semigroup.

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- compiler/GHC.hs
- compiler/prelude/PrelNames.hs → compiler/GHC/Builtin/Names.hs
- compiler/prelude/PrelNames.hs-boot → compiler/GHC/Builtin/Names.hs-boot
- compiler/prelude/THNames.hs → compiler/GHC/Builtin/Names/TH.hs
- compiler/prelude/PrimOp.hs → compiler/GHC/Builtin/PrimOps.hs
- compiler/prelude/PrimOp.hs-boot → compiler/GHC/Builtin/PrimOps.hs-boot
- compiler/prelude/TysWiredIn.hs → compiler/GHC/Builtin/Types.hs
- compiler/prelude/TysWiredIn.hs-boot → compiler/GHC/Builtin/Types.hs-boot
- compiler/typecheck/TcTypeNats.hs → compiler/GHC/Builtin/Types/Literals.hs
- compiler/prelude/TysPrim.hs → compiler/GHC/Builtin/Types/Prim.hs
- compiler/prelude/KnownUniques.hs → compiler/GHC/Builtin/Uniques.hs
- compiler/prelude/KnownUniques.hs-boot → compiler/GHC/Builtin/Uniques.hs-boot
- compiler/prelude/PrelInfo.hs → compiler/GHC/Builtin/Utils.hs
- compiler/prelude/primops.txt.pp → compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/Info/Build.hs
- compiler/GHC/Cmm/Lexer.x
- compiler/GHC/Cmm/Monad.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/Config.hs
- compiler/GHC/CmmToAsm/Monad.hs
- compiler/GHC/CmmToAsm/PIC.hs
- compiler/GHC/CmmToAsm/PPC/CodeGen.hs
- compiler/GHC/CmmToAsm/PPC/RegInfo.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e4cf1c5db6135dec71929358f9012d385a7441c1...0fa283769d3427b946dbe7567d24735388897ee1

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e4cf1c5db6135dec71929358f9012d385a7441c1...0fa283769d3427b946dbe7567d24735388897ee1
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200421/5321826d/attachment-0001.html>


More information about the ghc-commits mailing list