| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
| |
also replace picIsOn with isDynamicGhcLib, as __PIC__ is not the
correct test for whether the GHC library is dynamically linked.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main purpose of this patch is to add a bunch of new rules
to the coercion optimiser. They are documented in the (revised)
Appendix of the System FC paper.
Some code has moved about:
- OptCoercion is now a separate module, mainly because it
now uses tcMatchTy, which is defined in Unify, so OptCoercion
must live higehr up in the hierarchy
- Functions that manipulate Kinds has moved from
Type.lhs to Coercion.lhs. Reason: the function typeKind
now needs to call coercionKind. And in any case, a Kind is
a flavour of Type, so it builds on top of Type; indeed Coercions
and Kinds are both flavours of Type.
This change required fiddling with a number of imports, hence
the one-line changes to otherwise-unrelated modules
- The representation of CoTyCons in TyCon has changed. Instead of
an extensional representation (a kind checker) there is now an
intensional representation (namely TyCon.CoTyConDesc). This was
needed for one of the new coercion optimisations.
|
|
|
|
|
|
|
|
|
|
| |
This patch was the cause of the compile-time performance regression in
#3796. My guess is that it is due to the use of unsafePerformIO which
traverses the stack up to the first update frame, and perhaps we have
a deep stack when reading the dictionary from a .hi file. In any
case, since we're not relying on thread safety for FastStrings, I
think the safest thing to do is back this out until we can investigate
further.
|
|
|
|
| |
Use -dppr-debug to make it noisy again
|
|
|
|
|
| |
splitUFM :: Uniquable key => UniqFM elt -> key -> (UniqFM elt, Maybe elt, UniqFM elt)
-- Splits a UFM into things less than, equal to, and greater than the key
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
rather than our own copies
|
|
|
|
|
|
|
|
|
| |
That is, unless we're printing in LeftMode, where we bypass encoding
for speed. This is safe, because LeftMode is used for outputting C or
asm, where everyting is Z-encoded and hence ASCII.
Error messages and other compiler output containing Unicode will now
appear correctly according to the locale settings.
|
|
|
|
|
|
|
|
|
| |
This is needed both for per-session parallelism and for allowing
multiple concurrent sessions in the same process. With the help of
atomicModifyIORef and unsafePerformIO it is also quite fast--an MVar
would most likely be slower. On a full compilation of Cabal's head
branch it was about 1-2 percent slower, but then overall compilation
times varied by about 4 percent, so I think it's worth it.
|
|
|
|
|
| |
For: FastStrings, Names, and Bin values. This makes .hi files smaller
on 64-bit platforms, while also making the format a bit more robust.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Show SrcSpans for Located things might be overkill, but it's sometimes
useful.
I also added
ppWhen, ppUnless :: Bool -> SDoc -> SDoc
to Outputable
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current implementation is rather pessimistic. The persistent
linker state is now an MVar and all exported Linker functions are
wrapped in modifyMVar calls. This is serves as a big lock around all
linker functions.
There might be a chance for more concurrency in a few places. E.g.,
extending the closure environment and loading packages might be
independent in some cases. But for now it's better to be on the safe
side.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first phase of this tidyup is focussed on the header files, and in
particular making sure we are exposinng publicly exactly what we need
to, and no more.
- Rts.h now includes everything that the RTS exposes publicly,
rather than a random subset of it.
- Most of the public header files have moved into subdirectories, and
many of them have been renamed. But clients should not need to
include any of the other headers directly, just #include the main
public headers: Rts.h, HsFFI.h, RtsAPI.h.
- All the headers needed for via-C compilation have moved into the
stg subdirectory, which is self-contained. Most of the headers for
the rest of the RTS APIs have moved into the rts subdirectory.
- I left MachDeps.h where it is, because it is so widely used in
Haskell code.
- I left a deprecated stub for RtsFlags.h in place. The flag
structures are now exposed by Rts.h.
- Various internal APIs are no longer exposed by public header files.
- Various bits of dead code and declarations have been removed
- More gcc warnings are turned on, and the RTS code is more
warning-clean.
- More source files #include "PosixSource.h", and hence only use
standard POSIX (1003.1c-1995) interfaces.
There is a lot more tidying up still to do, this is just the first
pass. I also intend to standardise the names for external RTS APIs
(e.g use the rts_ prefix consistently), and declare the internal APIs
as hidden for shared libraries.
|
|
|
|
|
| |
We were keeping things as Int, and then converting them to Word16 at
the last minute, when really they ought to have been Word16 all along.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In standalone deriving, we now do *not* check side conditions.
We simply generate the code and typecheck it. If there's a type
error, it's the programmer's problem.
This means that you can do 'deriving instance Show (T a)', where
T is a GADT, for example, provided of course that the boilerplate
code does in fact typecheck.
I put some work into getting a decent error message. In particular
if there's a type error in a method, GHC will show the entire code
for that method (since, after all, the user did not write it).
Most of the changes are to achieve that goal.
Still to come: changes in the documentation.
|
|
|
|
|
|
| |
This function isn't used at the moment, but Max added it, and it
looks useful.
|
|
|
|
|
|
| |
This means that, provided the values are small enough, files
serialized are portable between architectures. In particular,
.haddock files are portable.
|
| |
|
|
|
|
|
| |
We already require GHC 6.8 to build, and that included stripPrefix
in Data.List.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In Tempate Haskell -ddump-splices, the "after" expression is populated
with RdrNames, many of which are Orig things. We used to print these
fully-qualified, but that's a bit heavy.
This patch refactors the code a bit so that the same print-unqualified
mechanism we use for Names also works for RdrNames. Lots of comments
too, because it took me a while to figure out how it all worked again.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The old Reg type is now split into VirtualReg and RealReg.
* For the graph coloring allocator, the type of the register graph
is now (Graph VirtualReg RegClass RealReg), which shows that it colors
in nodes representing virtual regs with colors representing real regs.
(as was intended)
* RealReg contains two contructors, RealRegSingle and RealRegPair,
where RealRegPair is used to represent a SPARC double reg
constructed from two single precision FP regs.
* On SPARC we can now allocate double regs into an arbitrary register
pair, instead of reserving some reg ranges to only hold float/double values.
|
| |
|
|
|
|
|
| |
For now we only get a warning, rather than an error, because the alex
and happy templates don't follow the new rules yet.
|
|
|
|
|
|
| |
The x86 code generator sometimes generates nop moves like
movl %vI_a %vI_a, but we'll just ignore them for coalescing
purposes instead of emitting an error. It shouldn't hurt anything.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- During fianlisation we use to occasionally swivel variable-variable equalities
- Now, normalisation ensures that they are always oriented as appropriate for
instantation.
- Also fixed #1899 properly; the previous fix fixed a symptom, not the cause.
|
|
|
|
|
| |
My Windows build has started complaining about lacking final newlines,
I'm not entirely sure why.
|
|
|
|
|
|
|
|
| |
Digits already have a couple of meanings in z-encoding (Z3T is a tuple,
and z123U is a unicode character), so we encode digits as unicode
characters to avoid trying to squeeze in another meaning.
Also removed a little GHC < 6.2 compatibility hack.
|
| |
|