1. 01 Oct, 2013 15 commits
    • unknown's avatar
      Comments only · e276ed78
      unknown authored
    • unknown's avatar
      Better docs for MINIMAL · 36035d87
      unknown authored
    • Simon Peyton Jones's avatar
      Lift an unnecessary assumption in the demand analyser (fix Trac #8329) · 9bd36664
      Simon Peyton Jones authored
      Here's the Note about the (simple) fix.  Apparently #8329 prevented all
      23 packages of the Snap framework from compiling.
      Note [Demand transformer for a ditionary selector]
      If we evaluate (op dict-expr) under demand 'd', then we can push the demand 'd'
      into the appropriate field of the dictionary. What *is* the appropriate field?
      We just look at the strictness signature of the class op, which will be
      something like: U(AAASAAAAA).  Then replace the 'S' by the demand 'd'.
      For single-method classes, which are represented by newtypes the signature
      of 'op' won't look like U(...), so the splitProdDmd_maybe will fail.
      That's fine: if we are doing strictness analysis we are also doing inling,
      so we'll have inlined 'op' into a cast.  So we can bale out in a conservative
      way, returning topDmdType.
      It is (just.. Trac #8329) possible to be running strictness analysis *without*
      having inlined class ops from single-method classes.  Suppose you are using
      ghc --make; and the first module has a local -O0 flag.  So you may load a class
      without interface pragmas, ie (currently) without an unfolding for the class
      ops.   Now if a subsequent module in the --make sweep has a local -O flag
      you might do strictness analysis, but there is no inlining for the class op.
      This is wierd so I'm not worried about whether this optimises brilliantly; but
      it should not fall over.
    • Simon Marlow's avatar
      comment update · 3c9aa40f
      Simon Marlow authored
    • Simon Marlow's avatar
      Add layout to MultiWayIf (#7783) · aab65608
      Simon Marlow authored
      This makes it possible to write
      x = if | False -> if | False -> 1
                           | False -> 2
             | True -> 3
      Layout normally inserts semicolons between declarations at the same
      indentation level, so I added optional semicolons to the syntax for
      guards in MultiWayIf syntax.  This is a bit of a hack, but the
      alternative (a special kind of layout that doesn't insert semicolons)
      seemed worse, or at least equally bad.
    • Simon Marlow's avatar
      Add back a comment that got lost · c0f89a1b
      Simon Marlow authored
    • Simon Marlow's avatar
      Clarification in the docs for INLINE · 2798a174
      Simon Marlow authored
      People often jump to the conclusion that functions aren't inlined
      unless you say INLINE, so clarify the documentation to emphasize the
      fact that you shouldn't normally need to use INLINE unless you need to
      override the defaults.
    • Simon Marlow's avatar
    • Simon Marlow's avatar
      grammar fix · ab3abf15
      Simon Marlow authored
    • Simon Marlow's avatar
    • Simon Marlow's avatar
      use StgWord not StgWord8 for wakeup · 0b0fec53
      Simon Marlow authored
      volatile StgWord8 is not guaranteed to be atomic.
    • Simon Marlow's avatar
      use a nat, not StgWord8, for gc_type · cb7785f6
      Simon Marlow authored
    • Simon Marlow's avatar
      Remove use of R9, and fix associated bugs · 11b5ce55
      Simon Marlow authored
      We were passing the function address to stg_gc_prim_p in R9, which was
      wrong because the call was a high-level call and didn't declare R9 as
      a parameter.  Passing R9 as an argument is the right way, but
      unfortunately that exposed another bug: we were using the same macro
      in some low-level Cmm, where it is illegal to call functions with
      arguments (see Note [syntax of cmm files]).  So we now have low-level
      variants of STK_CHK() and STK_CHK_P() for use in low-level Cmm code.
    • Simon Marlow's avatar
    • Krzysztof Gogolewski's avatar
      Typos in users' guide · 4b8a928d
      Krzysztof Gogolewski authored
  2. 30 Sep, 2013 2 commits
  3. 29 Sep, 2013 5 commits
  4. 28 Sep, 2013 3 commits
  5. 27 Sep, 2013 5 commits
  6. 26 Sep, 2013 1 commit
  7. 24 Sep, 2013 3 commits
  8. 23 Sep, 2013 6 commits
    • Krzysztof Gogolewski's avatar
    • parcs's avatar
      Fix build when PROF_SPIN is unset · 9c11fdb9
      parcs authored
      whitehole_spin is only defined when PROF_SPIN is set.
    • parcs's avatar
      Fix the definition of cas() on x86 (#8219) · 84dff710
      parcs authored
      *p is both read and written to by the cmpxchg instruction, and therefore
      should be given the '+' constraint modifier.
      (In GCC's extended ASM language, '+' means that the operand is both read
      and written to whereas '=' means that it is only written to.)
      Otherwise, the compiler is allowed to rewrite something like
      SpinLock lock;
      initSpinLock(&lock);       /* sets lock = 1 */
      SpinLock lock;
      because according to the asm statement, the previous value of 'lock' is
      not important.
    • Krzysztof Gogolewski's avatar
      Remove fglasgow-exts from ghci --help · 93a04b49
      Krzysztof Gogolewski authored
      It has been deprecated for long and already removed from ghc --help
    • Simon Marlow's avatar
      Fix linker_unload now that we are running constructors in the linker (#8291) · 19081952
      Simon Marlow authored
      See also #5435.
      Now we have to remember the the StablePtrs that get created by the
      module initializer so that we can free them again in unloadObj().
    • Simon Marlow's avatar
      Discard unreachable code in the register allocator (#7574) · f5879acd
      Simon Marlow authored
      The problem with unreachable code is that it might refer to undefined
      registers.  This happens accidentally: a block can be orphaned by an
      optimisation, for example when the result of a comparsion becomes
      The register allocator panics when it finds an undefined register,
      because they shouldn't occur in generated code.  So we need to also
      discard unreachable code to prevent this panic being triggered by
      The register alloator already does a strongly-connected component
      analysis, so it ought to be easy to make it discard unreachable code
      as part of that traversal.  It turns out that we need a different
      variant of the scc algorithm to do that (see Digraph), however the new
      variant also generates slightly better code by putting the blocks
      within a loop in a better order for register allocation.