| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This avoids class instances such as:
> instance (b <= a) => F a b where
from needing -XUndecidableInstances to compile.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As pointed out in #21575, it is not sufficient to set withDict to inline
after the typeclass specialiser, because we might inline withDict in one
module and then import it in another, and we run into the same problem.
This means we could still end up with incorrect runtime results because
the typeclass specialiser would assume that distinct typeclass evidence
terms at the same type are equal, when this is not necessarily the case
when using withDict.
Instead, this patch introduces a new magicId, 'nospec', which is only
inlined in CorePrep. We make use of it in the definition of withDict
to ensure that the typeclass specialiser does not common up distinct
typeclass evidence terms.
Fixes #21575
|
|
|
|
|
|
|
|
| |
When growing the Census array ProfHeap previously neglected to
zero the new part of the array. Consequently `freeEra` would attempt to
free random words that often looked suspiciously like pointers.
Fixes #21880.
|
|
|
|
|
|
|
| |
We were failing to stop before running the assembler so the object file
was also created.
Fixes #21869
|
|
|
|
|
|
|
|
| |
Previously we used AC_PATH_PROG which, as noted by #21601, does not
look for tools with a target prefix,
breaking cross-compilation.
Fixes #21601.
|
|
|
|
|
| |
Approved by Core Libraries Committee in
https://github.com/haskell/core-libraries-committee/issues/65#issuecomment-1186275433
|
|
|
|
|
|
|
|
|
| |
While GHC's own aclocal.m4 is generated by the aclocal tool, other
packages' aclocal.m4 are committed in the repository. Previously
`.gitignore` included an entry which covered *any* file named
`aclocal.m4`, which lead to quite some confusion (e.g. see #21740).
Fix this by modifying GHC's `.gitignore` to only cover GHC's own
`aclocal.m4`.
|
|
|
|
|
|
|
|
| |
If the nonmoving gc is enabled and we are using a threaded RTS,
we now try to grab the collector mutex to avoid memInventory and
the collection racing.
Before memInventory was disabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename GHC.Core.Opt.WorkWrap.Utils.wantToUnboxArg to canUnboxArg
and similarly wantToUnboxResult to canUnboxResult.
* Add GHC.Core.Opt.DmdAnal.wantToUnboxArg as a wrapper for
the (new) GHC.Core.Opt.WorkWrap.Utils.canUnboxArg,
avoiding some yukky duplication.
I decided it was clearer to give it a new data type for its
return type, because I nedeed the FD_RecBox case which was not
otherwise readiliy expressible.
* Add dcpc_args to WorkWrap.Utils.DataConPatContext for the payload
* Get rid of the Unlift constructor of UnboxingDecision, eliminate
two panics, and two arguments to canUnboxArg (new name). Much
nicer now.
|
|
|
|
|
|
|
|
| |
This fix, in the definition of profitableFloat,
is just for consistency. `floatConsts` should
do what it says!
I don't think it'll affect anything much, though.
|
|
|
|
|
|
|
|
|
| |
This function is called in inner loops in the compiler, and it's
overloaded and higher order. Best just to inline it.
This popped up when I was looking at something else. I think
perhaps GHC is delicately balanced on the cusp of inlining this
automatically.
|
|
|
|
| |
I don't know why this hasn't bitten us before, but it was plain wrong.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch, provoked by #21457, simplifies SpecConstr by treating
top-level and nested bindings uniformly (see the new scBind).
* Eliminates the mysterious scTopBindEnv
* Refactors scBind to handle top-level and nested definitions
uniformly.
* But, for now at least, continues the status quo of not doing
SpecConstr for top-level non-recursive bindings. (In contrast
we do specialise nested non-recursive bindings, although the
original paper did not; see Note [Local let bindings].)
I tried the effect of specialising top-level non-recursive
bindings (which is now dead easy to switch on, unlike before)
but found some regressions, so I backed off. See !8135.
It's a pure refactoring. I think it'll do a better job in a few
cases, but there is no regression test.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support to hadrian for starting a multi-repl containing
all the packages which stage0 can build. In particular, there is the new
user-facing command:
```
./hadrian/ghci-multi
```
which when executed will start a multi-repl containing the `ghc` package
and all it's dependencies.
This is implemented by two new hadrian targets:
```
./hadrian/build multi:<pkg>
```
Construct the arguments for a multi-repl session where the top-level
package is <pkg>. For example, `./hadrian/ghci-multi` is implemented
using `multi:ghc` target.
There is also the `multi` command which constructs a repl for everything
in stage0 which we can build.
|
| |
|
|
|
|
|
|
|
| |
* Rename `docs` to `doc`
* Place pdf documentation in `doc/` instead of `doc/pdfs/`
Fixes #21164.
|
|
|
|
|
|
| |
It appears that Centos 7 has a more strict C++ compiler than most
distributions since std::runtime_error is defined in <stdexcept> rather
than <exception>. In T11829 we mistakenly imported the latter.
|
| |
|
| |
|
|
|
|
| |
Darwin expects a leading underscore.
|
| |
|
|
|
|
|
|
|
| |
It appears that GCC 6t (at least on i386) fails to give
init_array/fini_array sections the correct SHT_INIT_ARRAY/SHT_FINI_ARRAY
section types, instead marking them as SHT_PROGBITS. This caused T20494
to fail on Debian.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
RtlDeleteFunctionTable expects a pointer to the .pdata section
yet we passed it the .xdata section.
Happily, this fixes #21354.
|
| |
|
|
|
|
|
|
|
| |
Previously we would run constructors and destructors in arbitrary order
despite explicit priorities.
Fixes #21847.
|
|
|
|
|
|
|
|
| |
It turns out that PE objects may have multiple `.ctors`/`.dtors`
sections but the RTS linker had assumed that there was only one. Fix
this.
Fixes #21618.
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately on Windows we have no RPATH-like facility, making dynamic
linking extremely fragile. Since we cannot assume that the user will
add their GHC installation to `$PATH` (and therefore their DLL
search path) we cannot assume that the loader will be able to locate our
`libc++.dll`. To avoid this, we instead statically link against `libc++.a` on
Windows.
Fixes #21435.
|
|
|
|
|
|
| |
Gnu ld allows `-l` to be passed an absolute file path,
signalled by a `:` prefix. Implement this in the GHC's
loader search logic.
|
|
|
|
|
|
| |
This implements #20494 for the PEi386 linker.
Happily, this also appears to fix `T9405`, resolving #21361.
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would free oc->info after running initializers. However,
we can't do this is we want to also run finalizers.
Moreover, freeing oc->info so early was wrong for another reason:
we will need it in order to unregister the exception tables (see the
call to `RtlDeleteFunctionTable`).
In service of #20494.
|
|
|
|
| |
fini is short for "finalizer", which does not contain a "t".
|
| |
|
|
|
|
| |
Addresses #20494.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At some point we used the clang distribution from msys2's `MINGW64`
environment for our Windows toolchain. This defaulted to using libgcc
and libstdc++ for its runtime library. However, we found for a variety
of reasons that compiler-rt, libunwind, and libc++ were more reliable,
consequently we explicitly overrode the CXXFLAGS to use these.
However, since then we have switched to use the `CLANG64` packaging,
which default to these already. Consequently we can drop these
arguments, silencing some redundant argument warnings from clang.
Fixes #21669.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Here we reorganize `GHC.Cmm` to eliminate the orphan `Outputable` and
`OutputableP` instances for the Cmm AST. This makes it significantly
easier to use the Cmm pretty-printers in tracing output without
incurring module import cycles.
|
|
|
|
| |
Fixes #21824
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before the behaviour of `dopt` and `logHasDumpFlag` (and the underlying
function `log_dopt`) were different as the latter did not take the
verbosity level into account. This led to problems during the
refactoring as we cannot simply replace calls to `dopt` with calls to
`logHasDumpFlag`.
In addition to that a subtle bug in the GHC module was fixed:
`setSessionDynFlags` did not update the logger and as a consequence the
verbosity value of the logger was not set appropriately.
Fixes #21861
|
|
|
|
| |
Since we have backported the fix to 9.4.1.
|
| |
|