1. 23 Nov, 2005 3 commits
  2. 21 Nov, 2005 3 commits
  3. 19 Nov, 2005 2 commits
    • simonmar's avatar
      [project @ 2005-11-19 14:59:53 by simonmar] · e72b2ad4
      simonmar authored
      fix repType after changes to the representation of type synonyms.
      This caused the stage2 compiler to crash, because various info tables
      misrepresented the pointerhood of constructor arguments.
    • simonmar's avatar
      [project @ 2005-11-19 11:44:32 by simonmar] · e5b39b0c
      simonmar authored
      something has gone wrong; I don't have time right now to find out
      exactly what, so revert rev. 1.22 in an attempt to fix it.
  4. 18 Nov, 2005 7 commits
    • simonmar's avatar
      [project @ 2005-11-18 15:38:26 by simonmar] · 942818de
      simonmar authored
      fix threaded build
    • simonmar's avatar
      [project @ 2005-11-18 15:24:12 by simonmar] · c5cd2343
      simonmar authored
      Two improvements to the SMP runtime:
        - support for 'par', aka sparks.  Load balancing is very primitive
          right now, but I have seen programs that go faster using par.
        - support for backing off when a thread is found to be duplicating
          a computation currently underway in another thread.  This also
          fixes some instability in SMP, because it turned out that when
          an update frame points to an indirection, which can happen if
          a thunk is under evaluation in multiple threads, then after GC
          has shorted out the indirection the update will trash the value.
          Now we suspend the duplicate computation to the heap before this
          can happen.
        - stack squeezing is separate from lazy blackholing, and now only
          happens if there's a reasonable amount of squeezing to be done
          in relation to the number of words of stack that have to be moved.
          This means we won't try to shift 10Mb of stack just to save 2
          words at the bottom (it probably never happened, but still).
        - update frames are now marked when they have been visited by lazy
          blackholing, as per the SMP paper.
        - cleaned up raiseAsync() a bit.
    • simonmar's avatar
      [project @ 2005-11-18 15:23:09 by simonmar] · 6c17d627
      simonmar authored
    • simonmar's avatar
      [project @ 2005-11-18 15:13:46 by simonmar] · cbd29e0a
      simonmar authored
      Add wcStore(), a write-combining store if supported
      (I tried using it in the update code and only succeeded in making
      things slower, but it might come in handy in the future)
    • simonmar's avatar
      [project @ 2005-11-18 15:10:31 by simonmar] · 6aa27c72
      simonmar authored
    • simonmar's avatar
      [project @ 2005-11-18 14:24:47 by simonmar] · 90a4a812
      simonmar authored
      Omit the __DISCARD__() call in FB_ if __GNUC__ >= 3.  It doesn't
      appear to be necessary now, and it prevents some gcc optimisations.
    • simonmar's avatar
      [project @ 2005-11-18 14:01:33 by simonmar] · 9342a543
      simonmar authored
      Discard various ways in which gcc zeroes stack slots in the prologue.
      So far in my investigations these have always been unnecessary, they
      appear to be the result of missed optimisations by gcc, so cross
      fingers and discard them.  New variants have just shown up because I
      started compiling the RTS with -optc-O2.
  5. 17 Nov, 2005 4 commits
  6. 16 Nov, 2005 2 commits
    • simonpj's avatar
      [project @ 2005-11-16 17:45:38 by simonpj] · 491c85e7
      simonpj authored
      Better error reporting for newtypes with too many constructors,
      or too many fields.  Instead of yielding a parse error, we
      parse it like a data type declaration, and give a comprehensible
      error message later.
      A suggestion from Jan-Willem.
    • simonpj's avatar
      [project @ 2005-11-16 12:55:58 by simonpj] · cdea9949
      simonpj authored
      Two significant changes to the representation of types
      1. Change the representation of type synonyms
          Up to now, type synonym applications have been held in
          *both* expanded *and* un-expanded form.  Unfortunately, this
          has exponential (!) behaviour when type synonyms are deeply
          nested.  E.g.
      	    type P a b = (a,b)
      	    f :: P a (P b (P c (P d e)))
          This showed up in a program of Joel Reymont, now immortalised
          as typecheck/should_compile/syn-perf.hs
          So now synonyms are held as ordinary TyConApps, and expanded
          only on demand.  
          SynNote has disappeared altogether, so the only remaining TyNote
          is a FTVNote.  I'm not sure if it's even useful.
      2. Eta-reduce newtypes
          See the Note [Newtype eta] in TyCon.lhs
          If we have 
      	    newtype T a b = MkT (S a b)
          then, in Core land, we would like S = T, even though the application
          of T is then not saturated. This commit eta-reduces T's RHS, and
          keeps that inside the TyCon (in nt_etad_rhs).  Result is that 
          coreEqType can be simpler, and has less need of expanding newtypes.
  7. 15 Nov, 2005 1 commit
  8. 13 Nov, 2005 1 commit
    • panne's avatar
      [project @ 2005-11-13 19:07:17 by panne] · b36b3d13
      panne authored
      Move the building guide to GHC where it belongs. This is more consistent and
      currently even necessary, otherwise *every* fptools project would need the ghc
  9. 12 Nov, 2005 1 commit
    • simonpj's avatar
      [project @ 2005-11-12 21:41:12 by simonpj] · 87998beb
      simonpj authored
      Better TH -> HsSyn conversion
      	Merge to stable (attempt)
      This commit monad-ises the TH syntax -> HS syntax conversion.
      This means that error messages can be reported in a more civilised
      way.  It also ensures that the entire structure is converted eagerly.
      That means that any exceptions buried inside it are triggered 
      during conversion, and caught by the exception handler in TcSplice.
      Before, they could be triggered later, and looked like comiler
  10. 10 Nov, 2005 3 commits
  11. 09 Nov, 2005 1 commit
  12. 08 Nov, 2005 7 commits
    • simonmar's avatar
      [project @ 2005-11-08 15:07:08 by simonmar] · cbc83989
      simonmar authored
      SMP bugfix: if the thread we were just running blocked, then we are in
      a delicate state - we don't necessarily have access to the TSO we were
      just running, because we relinquished it when we put it on whatever
      blocking queue it is on.  It might even be running already.
      Previously I made the scheduler quickly loop again in this case.
      However, I made it loop too quickly: we should be sure to set the
      blackholes_need_checking flag if necessary, otherwise we can miss some
    • simonmar's avatar
      [project @ 2005-11-08 14:20:28 by simonmar] · d3313aea
      simonmar authored
      more docs for GHC_PACKAGE_PATH
    • simonmar's avatar
      [project @ 2005-11-08 14:18:35 by simonmar] · d76ab8dd
      simonmar authored
      when GHC_PACKAGE_PATH is set, treat the database at the bottom of the
      stack as the "global" one, ie. the one we modify by default.  This
      means that GHC_PACKAGE_PATH can be used to set up a virtual GHC
      package environment into which packages can be installed using Cabal,
      without setting anything other than GHC_PACKAGE_PATH.
    • simonmar's avatar
      [project @ 2005-11-08 12:56:04 by simonmar] · 03341842
      simonmar authored
      gcc's -fstrict-aliasing is biting us when we use the stack to store
      different types of objects.  For example:
        *((StgDouble*)((W_)Sp-8)) = *((StgDouble*)((W_)Sp+8));
        Sp[1] = (W_)&s1Cx_info;
      gcc feels free to reorder these two lines, because they refer to
      differently typed objects, even though the assignment to Sp[1] clearly
      aliases the read from the same location.
      Trying to fix this by accessing locations using union types might be
      possible, but I took the sledgehammer approach of
      -fno-strict-aliasing.  This is justified to a certain extent because
      our generated C code is derived from a very weakly-typed internal
      language (C--).
    • simonmar's avatar
      [project @ 2005-11-08 12:31:36 by simonmar] · 27249023
      simonmar authored
      unless I'm mistaken, only x86 needs -ffloat-store.  x86_64 certainly
      doesn't need it, because it uses SSE2 with the correct-sized floating
      point registers and doesn't store temporary results with more
      precision than results in memory.
    • simonmar's avatar
      [project @ 2005-11-08 11:02:56 by simonmar] · fd8ddfb9
      simonmar authored
      Fix bug in an assertion
    • simonmar's avatar
      [project @ 2005-11-08 10:44:22 by simonmar] · 6e4e6a2a
      simonmar authored
      raiseAsync: fix bug that can cause a scavenge_stack panic for a thread
      that has just been killed.
  13. 07 Nov, 2005 2 commits
  14. 05 Nov, 2005 1 commit
  15. 04 Nov, 2005 2 commits
    • simonmar's avatar
      [project @ 2005-11-04 16:23:20 by simonmar] · c79b7216
      simonmar authored
      Document GHC_PACKAGE_PATH, and changes to the ghc-pkg command line interface.
    • simonmar's avatar
      [project @ 2005-11-04 15:48:25 by simonmar] · be8b6cd5
      simonmar authored
      - Add support for the GHC_PACKAGE_PATH environment variable, which
        specifies a :-separated (;-separated on Windows) list of package
        database files.  If the list ends in : (; on Windows), then the
        normal user and global databases are added.
        GHC_PACKAGE_PATH is searched left-to-right for packages, like
        $PATH, but unlike -package-conf flags, which are searched
        right-to-left.  This isn't ideal, but it seemed the least worst to me
        (command line flags always override right-to-left (except -i),
        whereas the PATH environment variable overrides left-to-right, I chose
        to follow the environment variable convention).  I can always change
        it if there's an outcry.
      - Rationalise the interpretation of --user, --global, and -f on the
        ghc-pkg command line.  The story is now this: --user and --global
        say which package database to *act upon*, they do not change the
        shape of the database stack.  -f pushes a database on the stack, and
        also requests that the specified database be the one to act upon, for
        commands that modify the database.  If a database is already on the stack,
        then -f just selects it as the one to act upon.
        This means you can have a bunch of databases in GHC_PACKAGE_PATH, and
        use -f to select the one to modify.