1. 23 Jul, 2001 13 commits
    • simonmar's avatar
      [project @ 2001-07-23 17:23:19 by simonmar] · dfd7d6d0
      simonmar authored
      Add a compacting garbage collector.
      
      It isn't enabled by default, as there are still a couple of problems:
      there's a fallback case I haven't implemented yet which means it will
      occasionally bomb out, and speed-wise it's quite a bit slower than the
      copying collector (about 1.8x slower).
      
      Until I can make it go faster, it'll only be useful when you're
      actually running low on real memory.
      
      '+RTS -c' to enable it.
      
      Oh, and I cleaned up a few things in the RTS while I was there, and
      fixed one or two possibly real bugs in the existing GC.
      dfd7d6d0
    • simonpj's avatar
      [project @ 2001-07-23 16:27:41 by simonpj] · 9528fa3e
      simonpj authored
      Wibble
      9528fa3e
    • sof's avatar
      [project @ 2001-07-23 16:16:47 by sof] · 5c408765
      sof authored
      Mismatched module name in non-DEBUG case
      5c408765
    • simonmar's avatar
      [project @ 2001-07-23 15:11:55 by simonmar] · 1fdd21b3
      simonmar authored
      Grrr.  Do not #include "Stg.h" in plain C code, because that enables
      all the global register variables.  #include "Rts.h" directly instead.
      
      This was correct in the original StgLongLong.c, why on earth it was
      changed is beyond me.
      1fdd21b3
    • simonmar's avatar
      [project @ 2001-07-23 13:49:49 by simonmar] · 083e4450
      simonmar authored
      add a couple of missing ';'
      083e4450
    • qrczak's avatar
      [project @ 2001-07-23 11:44:15 by qrczak] · 8fe4dbdd
      qrczak authored
      import qualified Demand
      8fe4dbdd
    • simonpj's avatar
      [project @ 2001-07-23 10:54:46 by simonpj] · f6cd95ff
      simonpj authored
      ---------------------------------
      	Switch to the new demand analyser
      	---------------------------------
      
      This commit makes the new demand analyser the main beast,
      with the old strictness analyser as a backup.  When
      DEBUG is on, the old strictness analyser is run too, and the
      results compared.
      
      WARNING: this isn't thorougly tested yet, so expect glitches.
      Delay updating for a few days if the HEAD is mission critical
      for you.
      
      But do try it out.  I'm away for 2.5 weeks from Thursday, so
      it would be good to shake out any glaring bugs before then.
      f6cd95ff
    • simonpj's avatar
      [project @ 2001-07-23 10:48:56 by simonpj] · 9c220935
      simonpj authored
      block/unblockAsynchExns have arity 2
      9c220935
    • simonmar's avatar
      [project @ 2001-07-23 10:47:16 by simonmar] · 6f83fbc0
      simonmar authored
      Small changes to improve GC performance slightly:
      
        - store the generation *number* in the block descriptor rather
          than a pointer to the generation structure, since the most
          common operation is to pull out the generation number, and
          it's one less indirection this way.
      
        - cache the generation number in the step structure too, which
          avoids an extra indirection in several places.
      6f83fbc0
    • simonmar's avatar
      [project @ 2001-07-23 10:43:42 by simonmar] · 9a6296aa
      simonmar authored
      The real version of this file is in ghc/includes/.
      9a6296aa
    • simonmar's avatar
      [project @ 2001-07-23 10:43:18 by simonmar] · f94afcba
      simonmar authored
      merge in changes from rts/Linker.h
      f94afcba
    • simonmar's avatar
      [project @ 2001-07-23 10:42:37 by simonmar] · c7d7f33a
      simonmar authored
      Small fixes to the help text for the -i heap profiling interval option.
      c7d7f33a
    • simonpj's avatar
      [project @ 2001-07-23 10:24:57 by simonpj] · b20ad447
      simonpj authored
      Yet another newtype-squashing bug; this time TcType.unifyTyX
      b20ad447
  2. 22 Jul, 2001 2 commits
    • chak's avatar
      [project @ 2001-07-22 03:28:25 by chak] · 6ea86573
      chak authored
      ELF_TARGET_386 has to be #defined for x86/Solaris.
      6ea86573
    • chak's avatar
      [project @ 2001-07-22 03:19:51 by chak] · 02f8658b
      chak authored
      Solaris system headers contain function definitions (not just prototypes) for
      some functions; eg, stat().  WDP decided to toss (some of) them out during
      mangling.  I think, this is wrong, as the list of these functions changes with
      varying Solaris releases and it makes foreign importing these functions more
      complicated; in particular, it broke Directory.hsc and PosixFiles on
      x86/Solaris.
      02f8658b
  3. 21 Jul, 2001 2 commits
  4. 20 Jul, 2001 8 commits
    • simonpj's avatar
      [project @ 2001-07-20 16:48:20 by simonpj] · 5d095cc1
      simonpj authored
      This commit adds the very convenient function
      
        Subst.substTyWith :: [TyVar] -> [Type] -> Type -> Type
      
      and uses it in various places.
      5d095cc1
    • simonpj's avatar
      [project @ 2001-07-20 16:47:55 by simonpj] · e3defabc
      simonpj authored
      ------------------------
      	More newtype squashing
      	------------------------
      
      Recursive newtypes were confusing the worker/wrapper generator.
      This is because I originally got rid of opaque newtypes altogether,
      then put them back for recursive ones only, and forgot to reinstate
      the cunning stuff in the w/w stuff.
      
      (Discovered by Sigbjorn; thanks!)
      e3defabc
    • simonpj's avatar
      [project @ 2001-07-20 15:22:21 by simonpj] · 0fa26afe
      simonpj authored
      -----------------------
      	Get rid of ArityAtLeast
      	-----------------------
      
      Now that we have CgInfo, with the exact code-generator arity
      for the value, we don't need the distinction between ArityAtLeast
      and ArityExactly in the ArityInfo field of an IdInfo.
      
      This commit makes
      
      	type ArityInfo = Maybe Arity
      
      and propagates this change consistently through the compiler.
      0fa26afe
    • simonpj's avatar
      [project @ 2001-07-20 10:09:32 by simonpj] · 738b84dc
      simonpj authored
      Third cut at the demand analyser; seems to work nicely now
      738b84dc
    • simonpj's avatar
      [project @ 2001-07-20 10:08:56 by simonpj] · debd4f60
      simonpj authored
      --------------------------------------------
      	Hack around an infelicity in the simplifier
      	-------------------------------------------
      
      Use 3 iterations of the simplifier (instead of the previous 2)
      because otherwise we land up with huge dead expressions.
      Reason: an infelicity in the simpifier.
      
            let k = BIG in foldr k z xs
       ==>  let k = BIG in letrec go = \xs -> ...(k x).... in go xs
       ==>  let k = BIG in letrec go = \xs -> ...(BIG x).... in go xs
       Don't stop now!
      
      
      I couldn't see an easy way to make the simplifier avoid this
      big intermediate, so I hacked round it like this.
      debd4f60
    • simonpj's avatar
      [project @ 2001-07-20 10:05:37 by simonpj] · 98a74c9d
      simonpj authored
      --------------------------
      	Correct a bug in exprArity
      	--------------------------
      
      This long-standing bug meant that exprArity gave over-pessimistic
      answers.  e.g.
      
      	\x -> f x
      
      where nothing is known about f.  We were getting
      
      	0 (for f)
      	-1 (for the argument)
      	+1 (for the lambda)
      	-----
      	0
      
      The right answer is of course 1.
      98a74c9d
    • sof's avatar
      [project @ 2001-07-20 01:05:11 by sof] · 9d978426
      sof authored
      lookupSymbol (PEi386-only): When chasing down a label in a DLL, try
      removing the initial underscore (if any). I've prefixed the comment
      next to the change with the label 'HACK', as I'm not sure whether
      this is a name mangling operation you should always do when going
      from the import library name to the DLL-bound thing.
      (Julian, could you have a look?)
      
      Fixes probs with 'foreign import'ing DLL-bound symbols.
      9d978426
    • sof's avatar
      [project @ 2001-07-20 00:44:33 by sof] · ddb17caa
      sof authored
      Since longlong prims are no longer in the RTS, extend RTS_MINGW_ONLY_SYMBOLS with some reqd libgcc syms
      ddb17caa
  5. 19 Jul, 2001 13 commits
  6. 18 Jul, 2001 2 commits
    • sof's avatar
      [project @ 2001-07-18 19:32:15 by sof] · 07446263
      sof authored
      Restrict ghc-4.xx breakage to mingw only; not an issue for other plats
      07446263
    • rrt's avatar
      [project @ 2001-07-18 16:06:10 by rrt] · 0143969c
      rrt authored
      Add support for Hugs's :info command. Doesn't work yet, but shouldn't
      interfere with anything else. Some of the files touched are just to correct
      out-of-date comments.
      
      Highlights are:
      
      hscThing: like hscStmt, but just gets info about a single identifier
      cmInfoThing: exposes hscThing's functionality to the outside world
      0143969c