| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This allows the global 'flip' variable not to be exported. This allows a
future commit to also make it part of the traversalState struct.
|
|
|
|
|
| |
Having a union in the closure profiling header really just complicates
things so get back to basics, we just have a single StgWord there for now.
|
|
|
|
| |
data_out was renamed to child_data at some point
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The callback 'return_cb' allows users to be perform additional accounting
when the traversal of a subtree is completed. This is needed for example to
determine the number or total size of closures reachable from a given
closure.
This commit also makes the lifetime increase of stackElements from commit
"rts: TraverseHeap: Increase lifetime of stackElements" optional based on
'return_cb' being set enabled or not.
Note that our definition of "subtree" here includes leaf nodes. So the
invariant is that return_cb is called for all nodes in the traversal
exactly once.
|
|
|
|
|
|
|
|
|
| |
The new 'sep' field links a stackElement to it's "parent". That is the
stackElement containing it's parent closure.
Currently not all closure types create long lived elements on the stack so
this does not cover all parents along the path to the root but that is
about to change in a future commit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This modifies the lifetime of stackElements such that they stay on the
stack until processing of all child closures is complete. Currently the
stackElement representing a set of child closures will be removed as soon
as processing of the last closure _starts_.
We will use this in a future commit to allow storing information on the
stack which should be accumulated in a bottom-up manner along the closure
parent-child relationship.
Note that the lifetime increase does not apply to 'type == posTypeFresh'
stack elements. This is because they will always be pushed right back onto
the stack as regular stack elements anyways.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new `otycon` production to the parser that allows for type
constructor names that are either alphanumeric (`tycon`) or symbolic
(`tyconsym`), where the latter must be parenthesized appropriately.
`otycon` is much like the existing `oqtycon` production, except that it does
not permit qualified names. The parser now uses `otycon` to parse type
constructor names in `ANN type` declarations, which fixes #19374.
To make sure that all of this works, I added three test cases:
* `should_compile/T19374a`: the original test case from #19374
* `should_fail/T19374b`: a test that makes sure that an `ANN` with a qualified
name fails to parse
* `should_fail/T19374c`: a test that makes sure that an `ANN type` with a
qualified name fails to parse
|
|
|
|
|
| |
Fixes #17853. We mustn't discard the result of pickGREs, because doing
so might lead to incorrect redundant import warnings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is just a tidy-up for the post-strictness-analysis
worker wrapper split. Consider
f x = x
Strictnesss analysis does not lead to a w/w split, so the
obvious thing is to leave it 100% alone. But actually, because
the RHS is small, we ended up adding a StableUnfolding for it.
There is some reason to do this if we choose /not/ do to w/w
on the grounds that the function is small. See
Note [Don't w/w inline small non-loop-breaker things]
But there is no reason if we would not have done w/w anyway.
This patch just moves the conditional to later. Easy.
This does move some -ddump-simpl printouts around a bit.
I also discovered that the previous code was overwritten an
InlineCompulsory with InlineStable, which is utterly wrong. That in
turn meant that some default methods (marked InlineCompulsory)
were getting their InlineCompulsory squashed. This patch fixes
that bug --- but of course that does mean a bit more inlining!
Metric Decrease:
T9233
T9675
Metric Increase:
T12707
T11374
T3064
T4029
T9872b
T9872d
haddock.Cabal
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
We don't need to compile/link an additional empty C file when it is not
needed.
This patch may also fix #18938 by avoiding trying to lookup the RTS unit
when there is none (yet) in the unit database.
|
|
|
|
|
|
| |
This is a small fix that depends on the previous commit, because it
corrected the rnExpr free variable calculation for HsVars which refer
to ambiguous fields. Fixes #19213.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #5972. This adds an extension NoFieldSelectors to disable the generation
of selector functions corresponding to record fields. When this extension is
enabled, record field selectors are not accessible as functions, but users are
still able to use them for record construction, pattern matching and updates.
See Note [NoFieldSelectors] in GHC.Rename.Env for details.
Defining the same field multiple times requires the DuplicateRecordFields
extension to be enabled, even when NoFieldSelectors is in use.
Along the way, this fixes the use of non-imported DuplicateRecordFields in GHCi
with -fimplicit-import-qualified (fixes #18729).
Moreover, it extends DisambiguateRecordFields to ignore non-fields when looking
up fields in record updates (fixes #18999), as described by
Note [DisambiguateRecordFields for updates].
Co-authored-by: Simon Hafner <hafnersimon@gmail.com>
Co-authored-by: Fumiaki Kinoshita <fumiexcel@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Alignments passed to alloca and friends must be a power of two for the code
in allocatePinned to work properly. Commit 41230e2601 ("Zero out pinned
block alignment slop when profiling") introduced an ASSERT for this but
this test was still violating it.
|
|
|
|
|
|
|
| |
Previously the Hadrian codepath of `validate` inverted the logic which
decides whether the test build of `xhtml` should be built with
`--enable-shared`. This resulted in validate failures on Windows, which
does not support dynamic linkage of Haskell code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In GHC.Core.SimpleOpt, I found that its inlining could duplicate
an arbitary redex inside a lambda! Consider (\xyz. x+y). The
occurrence-analysis treats the lamdda as a group, and says that
both x and y occur once, even though the occur under the lambda-z.
See Note [Occurrence analysis for lambda binders] in OccurAnal.
When the lambda is under-applied in a call, the Simplifier is
careful to zap the occ-info on x,y, because they appear under the \z.
(See the call to zapLamBndrs in simplExprF1.) But SimpleOpt
missed this test, resulting in #19347.
So this patch
* commons up the binder-zapping in GHC.Core.Utils.zapLamBndrs.
* Calls this new function from GHC.Core.Opt.Simplify
* Adds a call to zapLamBndrs to GHC.Core.SimpleOpt.simple_app
This change makes test T12990 regress somewhat, but it was always
very delicate, so I'm going to put up with that.
In this voyage I also discovered a small, rather unrelated infelicity
in the Simplifier:
* In GHC.Core.Opt.Simplify.simplNonRecX we should apply isStrictId
to the OutId not the InId. See Note [Dark corner with levity polymorphism]
It may never "bite", because SimpleOpt should have inlined all
the levity-polymorphic compulsory inlnings already, but somehow
it bit me at one point and it's generally a more solid thing
to do.
Fixing the main bug increases runtime allocation in test
perf/should_run/T12990, for (acceptable) reasons explained in a
comement on
Metric Increase:
T12990
|
|
|
|
|
|
|
| |
This previously supported the ghc-in-ghci script which has been since
dropped. Hadrian's ghci support does not need this macro (which disabled
uses of UnboxedTuples) since it uses `-fno-code` rather than produce
bytecode.
|
|
|
|
|
| |
isovector recently noticed that it is broken and regardless it is
superceded by `hadrian/ghci`.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This will be needed shortly.
|
| |
|
|
|
|
| |
Teach it to use unsafeWithForeignPtr where appropriate.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Fix the following rule:
"fromIntegral/Int->Natural" fromIntegral = naturalFromWord . fromIntegral
Its type wasn't constrained to Int hence #19345.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The roughMatchTcs function enables a quick definitely-no-match test
in lookupInstEnv. Unfortunately, it didn't account for type families.
This didn't matter when type families were flattened away, but now
they aren't flattened it matters a lot.
The fix is very easy. See INVARIANT in GHC.Core.InstEnv
Note [ClsInst laziness and the rough-match fields]
Fixes #19336
The change makes compiler perf worse on two very-type-family-heavy
benchmarks, T9872{a,d}:
T9872a(normal) ghc/alloc 2172536442.7 2216337648.0 +2.0%
T9872d(normal) ghc/alloc 614584024.0 621081384.0 +1.1%
(Everything else is 0.0% or at most 0.1%.)
I think we just have to put up with this. Some cases were being
wrongly filtered out by roughMatchTcs that might actually match, which
could lead to false apartness checks. And it only affects these very
type-family-heavy cases.
Metric Increase:
T9872a
T9872d
|
|
|
|
|
| |
They have no effect since 2011 (GHC 7.2/7.4),
commits cb698570b2b and 49dbe60558.
|
|
|
|
|
|
|
| |
Merge requests !4464 and !4474 fixed the Lint problems.
Closes #5777.
Closes #15175.
|
|
|
|
|
|
| |
Bumps the binary and deepseq submodules.
Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/15028.
|
|
|
|
|
|
|
| |
I think it is worth to say that closeFd is interruptible by asynchronous
exceptions.
And also fix indentation of closeFd_.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
closeFdWith is accessing shared TMVar - the IO manager callbak table
var. It might be concurrently used by different threads: either becuase
it contains information about different file descriptors or a single
file descriptor is accessed from different threads. For this reason
`takeMVar` might block, although for a very short time as all the
IO operations are using epoll (or its equivalent).
This change makes hClose and Network.Socket.close safe in presence of
asynchronous exceptions. This is especailly important in the context of
`bracket` which expects uninterruptible close handler.
|
|
|
|
|
|
|
| |
When separating operators from identifiers in a `:complete` command
take advantage from the different character sets of the two items:
* operators contain only specialSymbol characters.
* Identifiers don't contain specialSymbol characters, with the exception of dots.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
previously, `safeFlagCheck` would be happy to switch the `safeFlag` to
`False`, but not the other way around. This meant that after
:set -XGeneralizedNewtypeDeriving
:set -XNoGeneralizedNewtypeDeriving
in GHCi all loaded files would be still be infered as unsafe.
This fixes #19243.
This is a corner case, but somewhat relevant once ghci by default starts
with `GeneralizedNewtypeDeriving` on (due to GHC2021).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch, the only way to override GHC's default logging
behavior was to set `log_action`, `dump_action` and `trace_action`
fields in DynFlags. This patch introduces a new Logger abstraction and
stores it in HscEnv instead.
This is part of #17957 (avoid storing state in DynFlags). DynFlags are
duplicated and updated per-module (because of OPTIONS_GHC pragma), so
we shouldn't store global state in them.
This patch also fixes a race in parallel "--make" mode which updated
the `generatedDumps` IORef concurrently.
Bump haddock submodule
The increase in MultilayerModules is tracked in #19293.
Metric Increase:
MultiLayerModules
|
| |
|