| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
This change helps the simplifier eliminate unreachable code, since
retry# technically doesn't return.
This closes ticket #8091.
Authored-by: Patrick Palka <patrick@parcs.ath.cx>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
|
|
|
|
| |
My original change to the calling convention mistakenly used all 6 XMM
registers---which live in the global register table---on x86 (32 bit). This
royally screwed up the floating point code generated for that platform because
floating point arguments were passed in global registers instead of on the
stack!
|
|
|
|
|
| |
We were using SSE is some places and XMM in others. Better to keep a consistent
naming scheme.
|
|
|
|
|
|
|
|
| |
As documented in the users' guide, you can now write
type family Foo a where ..
in a hs-boot file to declare an abstract closed type family.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This check is somewhat subtle. See Note [Checking GADT return types]
in TcTyClsDecls. The new plan is to check *before* desugaring the type
from HsType to Type. This avoids problems with the pattern-match
in rejigConRes.
As a nice side benefit to this, I discovered that Template Haskell
splices were a little conservative in their treatment of valid data
constructors. (For example, a kind signature in the return type caused
failure.) Now, the TH code uses exactly the same function as the
"real" code, which is nice. See hsTyGetAppHead_maybe in HsTypes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Roles are a solution to the GeneralizedNewtypeDeriving type-safety
problem.
Roles were first described in the "Generative type abstraction" paper,
by Stephanie Weirich, Dimitrios Vytiniotis, Simon PJ, and Steve Zdancewic.
The implementation is a little different than that paper. For a quick
primer, check out Note [Roles] in Coercion. Also see
http://ghc.haskell.org/trac/ghc/wiki/Roles
and
http://ghc.haskell.org/trac/ghc/wiki/RolesImplementation
For a more formal treatment, check out docs/core-spec/core-spec.pdf.
This fixes Trac #1496, #4846, #7148.
|
|
|
|
|
|
|
| |
The solution is to use a different notion of apartness. See
http://research.microsoft.com/en-us/um/people/simonpj/papers/ext-f/axioms-extended.pdf
for the gory details. Some comments are also in Notes [Compatibility]
and [Apartness] in FamInstEnv.
|
|
|
|
| |
We now give a warning about enumerations like [5 .. 3] :: Int8.
|
|
|
|
|
|
|
|
|
|
|
| |
I'd been meaning to do this for some time, but finally got around to it
due to the overflowing literals warning. With that enabled, we were
getting a warning for
-128 :: Int8
as that is parsed as
negate (fromInteger 128)
which just happens to do the right thing, as
negate (fromInteger 128) = negate (-128) = -128
|
| |
|
| |
|
|\ |
|
| | |
|
|/
|
|
|
| |
This patch adds rules for converting floating point multiplication
of the form 2.0 * x and x * 2.0 into addition x + x.
|
|
|
|
|
| |
Makes it look less likely that people will confuse what it is for
(e.g. #8104).
|
| |
|
|
|
|
|
| |
We need to desugar the code, or we don't get the warnings from the
desugarer.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
No functional changes
|
| |
|
| |
|
|
|
|
|
|
|
| |
We weren't properly tracking the number of stack arguments in the
continuation of a foreign call. It happened to work when the
continuation was not a join point, but when it was a join point we
were using the wrong amount of stack fixup.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Exposes bSwap{,16,32,64}# primops
* Add a new machop: MO_BSwap
* Use a Stg implementation (hs_bswap{16,32,64}) for other implementation
in NCG.
* Generate bswap in X86 NCG for 32 and 64 bits, and for 16 bits, bswap+shr
instead of using xchg.
* Generate llvm.bswap intrinsics in llvm codegen.
Authored-by: Vincent Hanquez <tab@snarc.org>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
|
|
|
|
| |
279ac9f66a83203448b279ea478b2cc1dafbd35d.
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
|
|
|
|
|
| |
We add the invariant to the MVar blocked threads queue that
threads blocked on an atomic read are always at the front of
the queue. This invariant is easy to maintain, since takers
are only ever added to the end of the queue.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In many places, 'splitUniqSupply' + 'uniqFromSupply' is used to split a
UniqSupply into a Unique and a new UniqSupply. In such places we should
instead use the more efficient and more appropriate
'takeUniqFromSupply' (or equivalent).
Not only is the former method slower, it also generates and throws away
an extra Unique.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
|
|
|
| |
This actually caused a segfault in the optimized stage 2 compiler due to
wrong TBAA data.
Signed-off-by: David Terei <davidterei@gmail.com>
|
|
|
|
|
|
|
|
| |
This pass is pretty cheap and eliminates the aliases generated by the LLVM
backend. This in turn is required for dynamic linking to work correctly,
as LLVM fails to properly attribute calls to aliased addresses.
Signed-off-by: David Terei <davidterei@gmail.com>
|
|
|
|
|
|
| |
Seems the last parameter to llvm.prefectch was added in LLVM 3.0.
Signed-off-by: David Terei <davidterei@gmail.com>
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
Check for an empty list of equations when converting
a closed type family from TH to an HsDecl.
|
|/
|
|
|
|
| |
A comment claimed that the ticky counters are unsigned longs, but
as far as I can see that isn't the case: They're already word-sized
values.
|
|\ |
|