- 02 Nov, 2012 1 commit
-
-
ian@well-typed.com authored
The wrapper functions can end up in interface files, and thus are part of the ABI hash. But uniqs easily change for no good reason when recompiling, which can lead to an ABI hash needlessly changing.
-
- 01 Nov, 2012 13 commits
-
-
ian@well-typed.com authored
-
ian@well-typed.com authored
We don't want to narrow the argument size before making the foreign call: Word8 still gets passed as a Word-sized argument
-
ian@well-typed.com authored
-
ian@well-typed.com authored
-
Simon Marlow authored
This was causing crashes in stm050(ghci), throwto001(ghci), and possibly more.
-
Simon Marlow authored
By shear luck I think this didn't lead to any actual runtime crashes, but it did cause some problems for debugging.
-
Simon Marlow authored
-
Simon Marlow authored
Optimisation now makes a difference when compiling .cmm code, because it enables the optimisation passes in CmmPipeline. Recently validate has not been optimising the .cmm code because it uses SRC_HC_OPTS=-O0, which explains why I couldn't reproduce #7366 in validate (the bug miscompiled rts/PrimOps.cmm).
-
Simon Marlow authored
-
Simon Marlow authored
-
Simon Marlow authored
-
Simon Marlow authored
It makes sanity-checking fail.
-
ian@well-typed.com authored
-
- 31 Oct, 2012 11 commits
-
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
-
Simon Marlow authored
-
Simon Marlow authored
-
-
Simon Peyton Jones authored
Without -XImpredicativeTypes, the typing rules say that a function should be instantiated only at a *monotype*. In implementation terms, that means that a unification variable should not unify with a type involving foralls. But we were not enforcing that rule, and that gave rise to some confusing error messages, such as Trac #7264, #6069 This patch adds the test for foralls. There are consequences * I put the test in occurCheckExpand, since that is where we see if a type can unify with a given unification variable. So occurCheckExpand has to get DynFlags, so it can test for -XImpredicativeTypes * We want this to work foo :: (forall a. a -> a) -> Int foo = error "foo" But that means instantiating error at a polytype! But error is special already because you can instantiate it at an unboxed type like Int#. So I extended the specialness to allow type variables of openTypeKind to unify with polytypes, regardless of -XImpredicativeTypes. Conveniently, this works in TcUnify.matchExpectedFunTys, which generates unification variable for the function arguments, which can be polymorphic. * GHC has a special typing rule for ($) (see Note [Typing rule for ($)] in TcExpr). It unifies the argument and result with a unification variable to exclude unboxed types -- but that means I now need a kind of unificatdion variable that *can* unify with a polytype. So for this sole case I added PolyTv to the data type TcType.MetaInfo. I suspect we'll find mor uses for this, and the changes are tiny, but it still feel a bit of a hack. Well the special rule for ($) is a hack! There were some consequential changes in error reporting (TcErrors).
-
Simon Peyton Jones authored
-
Ian Lynagh authored
Avoids problems for people with old files in their tree
-
http://darcs.haskell.org/ghcIan Lynagh authored
-
Ian Lynagh authored
It's now simpler, and it fails if something fails rather than just printing an error message and continuing.
-
- 30 Oct, 2012 13 commits
-
-
Ian Lynagh authored
Also added a large comment about why we need it
-
gmainlan@microsoft.com authored
With the new register allocation scheme, the LLVM back end must always use liveness information.
-
gmainlan@microsoft.com authored
We now have accurate global register liveness information attached to all Cmm procedures and jumps. With this patch, the LLVM back end uses this information to pass only the live floating point (F and D) registers on tail calls. This makes the LLVM back end compatible with the new register allocation strategy. Ideally the GHC LLVM calling convention would put all registers that are always live first in the parameter sequence. Unfortunately the specification is written so that on x86-64 SpLim (always live) is passed after the R registers. Therefore we must always pass *something* in the R registers, so we pass the LLVM value undef.
-
gmainlan@microsoft.com authored
On x86-64 F and D registers are both drawn from SSE registers, so there is no reason not to draw them from the same pool of available SSE registers. This means that whereas previously a function could only receive two Double arguments in registers even if it did not have any Float arguments, now it can receive up to 6 arguments that are any mix of Float and Double in registers. This patch breaks the LLVM back end. The next patch will fix this breakage.
-
gmainlan@microsoft.com authored
All Cmm procedures now include the set of global registers that are live on procedure entry, i.e., the global registers used to pass arguments to the procedure. Only global registers that are use to pass arguments are included in this list.
-
gmainlan@microsoft.com authored
-
gmainlan@microsoft.com authored
We would like to calculate register liveness for global registers as well as local registers, so this patch generalizes the existing infrastructure to set the stage.
-
gmainlan@microsoft.com authored
We may not assume that registers are saved across calls to unlockClosure because it could call a C function on some platforms.
-
gmainlan@microsoft.com authored
-
gmainlan@microsoft.com authored
Jumps now always have live register information attached, so drop Maybes.
-
Simon Marlow authored
-
Simon Marlow authored
Fixes this, when building unregisterised: rts/dist/build/AutoApply.hc:87:1: error: ‘stg_ap_v_entry’ undeclared (first use in this function)
-
ian@well-typed.com authored
This is a kludge. A proper fix probably involves improving the "ghc -M" flags to handle this sort of case better.
-
- 29 Oct, 2012 2 commits
-
-
Simon Peyton Jones authored
Occurrences in terms are uses, in patterns they are not. In this way we get unused-constructor warnings from modules like this module M( f, g, T ) where data T = T1 | T2 Bool f x = T2 x g T1 = True g (T2 x) = x Here a T1 value cannot be constructed, so we can warn. The use in a pattern doesn't count. See Note [Patterns are not uses] in RnPat. Interestingly this change exposed three module in GHC itself that had unused constructors, which I duly removed: * ghc/Main.hs * compiler/ghci/ByteCodeAsm * compiler/nativeGen/PPC/RegInfo Their changes are in this patch.
-
Simon Peyton Jones authored
-