1. 13 Mar, 2000 2 commits
  2. 10 Mar, 2000 3 commits
    • sewardj's avatar
      [project @ 2000-03-10 18:28:26 by sewardj] · 37fe8f8c
      sewardj authored
      Nuke a substantial number of no-longer-supported options.
      37fe8f8c
    • lewie's avatar
      [project @ 2000-03-10 17:30:36 by lewie] · 08e36f1d
      lewie authored
      First stab at reviving TREX - just fixing some header wibbles.  Also one small
      fix to get implicit parameters working (`textOf' needed to be taught that
      IPCELLs are also OK).  Moved #defines for TREX, IPARAM, etc, into options.h
      (in their previous location at the end of prelude.h, they were being defined
      too late).
      08e36f1d
    • sewardj's avatar
      [project @ 2000-03-10 14:53:00 by sewardj] · 42d2afc5
      sewardj authored
      Compilation cleanups:
      * Add some prototypes to header files, to avoid compilation warnings.
      * Remove irrelevant #ifdeffery (#if NPLUSK, + various others)
      42d2afc5
  3. 09 Mar, 2000 1 commit
    • andy's avatar
      [project @ 2000-03-09 06:14:38 by andy] · 7bc3ecec
      andy authored
      improving the synatax and semantics of the privileged import
      
       Typical use might be:
      
        import Prelude
        import privileged Prelude ( IORef , unsafePerformIO )
      
       Which means please ignore the export that comes with Prelude,
       and let me at compiler internal magic operations, IORef and
       unsafePerformIO (both are later exported by IOExt)
      
      I've also updated the stdlib files to use this (hugs only :-).
      7bc3ecec
  4. 08 Mar, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-03-08 17:48:24 by simonmar] · de896403
      simonmar authored
      - generalise the per-module initialisation stubs so that we use it
        in normal (non-profiled) code too.  The initialisation stubs are
        now called '__init_<module>' rather than '_reg<module>'.
      
      - Register foreign exported functions as stable pointers in the
        initialisation code for the module.  This fixes the foreign export
        problems reported by several people.
      
      - remove the concept of "module groups" from the profiling subsystem.
      
      - change the profiling semantics slightly; it should be unnecessary
        to use '-caf-all' to get reasonable profiles now.
      de896403
  5. 06 Mar, 2000 1 commit
  6. 29 Feb, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-02-29 16:58:08 by simonmar] · 426fa533
      simonmar authored
      Change the behaviour of the cost-centre stack profiler for recursive
      sccs.  Before, we used to remove the old copy of the CC from the stack
      and push the new one on.  Now, we record back-edges in the graph when
      a recursive scc is detected.
      
      This should give saner-looking cost-centre stacks for heavily
      recursive code.  Indeed, it reduces the number of stacks in the
      profile for some examples considerably.
      426fa533
  7. 28 Feb, 2000 1 commit
    • sewardj's avatar
      [project @ 2000-02-28 12:02:31 by sewardj] · 4070b105
      sewardj authored
      Many changes to improve the quality and correctness of generated code,
      both for x86 and all-platforms.  The intent is that the x86 NCG will
      now be good enough for general use.
      
      -- Add an almost-trivial Stix (generic) peephole optimiser, whose sole
         purpose is elide assignments to temporaries used only once, in the
         very next tree.  This generates substantially better code for
         conditionals on all platforms.  Enhance Stix constant folding to
         take advantage of the inlining.
      
         The inlining presents subsequent insn selection phases with more
         complex trees than would have previously been used to.  This has
         shown up several bugs in the x86 insn selectors, now fixed.
         (assumptions that data size is Word, when could be Byte,
          assumptions that an operand will always be in a temp reg, etc)
      
      -- x86: Use the FLDZ and FLD1 insns.
      
      -- x86: spill FP registers with 80-bit loads/stores so that
         Intel's extra 16 bits of accuracy are not lost.  If this isn't
         done, FP spills are not suitably transparent.  Increase the
         number of spill words available to 2048.
      
      -- x86: give the register allocator more flexibility in choosing
         spill temporaries.
      
      -- x86, RegAllocInfo.regUsage: fix error for GST, and rewrite to
         make it clearer.
      
      -- Correctly track movements in the C stack pointer, and generate
         correct spill code for archs which spill against the stack pointer
         even when the stack pointer moves.  Redo the x86 ccall mechanism
         to push args on the C stack in the normal way.  Rather than have
         the spiller have to analyse code sequences to determine the current
         stack offset, the insn selectors communicate the current offset
         whenever it changes by inserting a DELTA pseudo-insn.  Then the
         spiller only has to spot DELTAs.
      
         This means having a new native-code-generator monad (Stix.NatM)
         which carries both a UniqSupply and the current stack offset.
      
      -- Remove the asmPar/asmSeq ways of grouping insns together.
         In the presence of fixed registers, it is hard to demonstrate
         that insn selectors using asmPar always give correct code, and
         the extra complication doesn't help any.
      
         Also, directly construct code sequences using tree-based ordered
         lists (utils/OrdList.lhs) for linear-time appends, rather than
         the bizarrely complex method using fns and fn composition.
      
      -- Inline some hcats in printing of x86 address modes.
      
      -- Document more of the hidden assumptions which insn selection relies
         on, particular wrt addressing modes.
      4070b105
  8. 25 Feb, 2000 1 commit
  9. 01 Feb, 2000 1 commit
  10. 25 Jan, 2000 3 commits
  11. 24 Jan, 2000 1 commit
    • sewardj's avatar
      [project @ 2000-01-24 18:22:07 by sewardj] · 9ac31f7c
      sewardj authored
      ARR_HDR_SIZE --> ARR_WORDS_HDR_SIZE, and derived quantities in
      Constants.h, Constants.lhs et al are similarly renamed.
      
      new constant ARR_PTRS_HDR_SIZE, with corresponding derivatives.
      9ac31f7c
  12. 22 Jan, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-01-22 18:00:03 by simonmar] · a1750cd6
      simonmar authored
      Fix bug in async exception handling: the target TSO may have been
      relocated as a result of a stack overflow.
      
      Introduce a new StgTSOWhatNext value "ThreadRelocated", which
      indicates that this TSO has moved, and the new location is in the link
      field.  The garbage collector shorts these out just like indirections.
      
      We have to check for relocated TSOs in killThread# (and any other
      primops which take a ThreadId# as an argument - there aren't any at
      present).
      a1750cd6
  13. 18 Jan, 2000 2 commits
  14. 13 Jan, 2000 2 commits
    • hwloidl's avatar
      [project @ 2000-01-13 14:33:57 by hwloidl] · 1b28d4e1
      hwloidl authored
      Merged GUM-4-04 branch into the main trunk. In particular merged GUM and
      SMP code. Most of the GranSim code in GUM-4-04 still has to be carried over.
      1b28d4e1
    • simonmar's avatar
      [project @ 2000-01-13 12:40:15 by simonmar] · be587a37
      simonmar authored
      - remove AllBlocked scheduler return code.  Nobody owned up to having
        created it or even knowing what it was there for.
      
      - clean up fatal error condition handling somewhat.  The process
        exit code from a GHC program now indicates the kind of failure
        for certain kinds of exit:
      
      	general internal RTS error	254
      	program deadlocked		253
      	program interrupted (ctrl-C)	252
      	heap overflow			251
      	main thread killed		250
      
        and we leave exit codes 1-199 for the user (as is traditional at MS,
        200-249 are reserved for future expansion, and may contain
        undocumented extensions :-)
      be587a37
  15. 12 Jan, 2000 1 commit
  16. 07 Jan, 2000 1 commit
  17. 06 Jan, 2000 1 commit
  18. 20 Dec, 1999 1 commit
    • simonpj's avatar
      [project @ 1999-12-20 10:34:27 by simonpj] · e921b2e3
      simonpj authored
      This commit implements a substantial re-organisation of the Prelude
      It also fixes a couple of small renamer bugs that were reported recently
      	(notably, Sven pointed out that we weren't reporting
      	unused imports properly)
      
      My original goal was to get rid of all "orphan" modules (i.e. ones
      with instance decls that don't belong either to a tycon or a class
      defined in the same module).  This should reduce the number of
      interface files that have to be read when compiling small Haskell
      modules.
      
      But like most expeditions into the Prelude Swamp, it spiraled out
      of control.  The result is quite satisfactory, though.
      
      	GONE AWAY:	PrelCCall, PrelNumExtra
      
      	NEW:		PrelReal, PrelFloat, PrelByteArr, PrelNum.hi-boot
      
      (The extra PrelNum.hi-boot is because of a tiresome thin-air Id, addr2Integer,
      which used to be in PrelBase.)
      
      Quite a lot of types have moved from one module to another,
      which entails some changes to part of the compiler (PrelInfo, PrelMods) etc,
      and there are a few places in the RTS includes and even in the driver
      that know about these home modules (alas).
      
      So the rough structure is as follows, in (linearised) dependency order
      	[this list now appears in PrelBase.lhs]
      
      PrelGHC		Has no implementation.  It defines built-in things, and
      		by importing it you bring them into scope.
      		The source file is PrelGHC.hi-boot, which is just
      		copied to make PrelGHC.hi
      
      		Classes: CCallable, CReturnable
      
      PrelBase	Classes: Eq, Ord, Functor, Monad
      		Types:   list, (), Int, Bool, Ordering, Char, String
      
      PrelTup		Types: tuples, plus instances for PrelBase classes
      
      PrelShow	Class: Show, plus instances for PrelBase/PrelTup types
      
      PrelEnum	Class: Enum,  plus instances for PrelBase/PrelTup types
      
      PrelMaybe	Type: Maybe, plus instances for PrelBase classes
      
      PrelNum		Class: Num, plus instances for Int
      		Type:  Integer, plus instances for all classes so far (Eq, Ord, Num, Show)
      
      		Integer is needed here because it is mentioned in the signature
      		of 'fromInteger' in class Num
      
      PrelReal	Classes: Real, Integral, Fractional, RealFrac
      			 plus instances for Int, Integer
      		Types:  Ratio, Rational
      			plus intances for classes so far
      
      		Rational is needed here because it is mentioned in the signature
      		of 'toRational' in class Real
      
      Ix		Classes: Ix, plus instances for Int, Bool, Char, Integer, Ordering, tuples
      
      PrelArr		Types: Array, MutableArray, MutableVar
      
      		Does *not* contain any ByteArray stuff (see PrelByteArr)
      		Arrays are used by a function in PrelFloat
      
      PrelFloat	Classes: Floating, RealFloat
      		Types:   Float, Double, plus instances of all classes so far
      
      		This module contains everything to do with floating point.
      		It is a big module (900 lines)
      		With a bit of luck, many modules can be compiled without ever reading PrelFloat.hi
      
      PrelByteArr	Types: ByteArray, MutableByteArray
      
      		We want this one to be after PrelFloat, because it defines arrays
      		of unboxed floats.
      
      
      Other Prelude modules are much easier with fewer complex dependencies.
      e921b2e3
  19. 08 Dec, 1999 1 commit
    • simonmar's avatar
      [project @ 1999-12-08 14:21:52 by simonmar] · 9c370d69
      simonmar authored
      Add Marc Van Dongen's Integer improvements.  Specifically:
      
      	- new primops: gcdInt#, gcdIntegerInt#, divExact#,
      	  quotInteger#, remInteger#.
      
      	- new definitions of quot and rem for Integer in
      	  PrelNum (using the new quotInteger# and remInteger#
      	  primops instead of quotRemInteger#).  Should be
      	  slightly faster than before.  div & mod aren't
      	  likewise optimised (yet).
      
      	- specialisations of gcd for Int and Integer, and
      	  lcm for Integer in PrelNum.
      9c370d69
  20. 07 Dec, 1999 1 commit
  21. 01 Dec, 1999 1 commit
    • simonmar's avatar
      [project @ 1999-12-01 14:34:38 by simonmar] · e1dc924b
      simonmar authored
      Support for blocking & unblocking asynchronous exceptions.
      
        - new primops:
      
      	blockAsyncExceptions#, unblockAsyncExceptions# :: IO a -> IO a
      
        - raiseInThread will block if the target thread is currently
          blocking async exceptions.
      
        - async exceptions are currently implicitly blocked inside
          an exception handler.  This decision might be reversed when
          we have more experience with this stuff.
      
        - Move exception-related stuff in the RTS into its own file,
          Exception.{h,hc}.
      e1dc924b
  22. 30 Nov, 1999 1 commit
  23. 29 Nov, 1999 1 commit
    • sewardj's avatar
      [project @ 1999-11-29 18:59:23 by sewardj] · b3c8ae4e
      sewardj authored
      Make StgHugs use the same naming scheme as GHC does for class +
      instance machinery.
      
      Add machinery to do Z-encoding/decoding of names extracted from
      interface files.
      
      Make the ELF object loader work again.  It seemed to have suffered
      slight bitrot over the past couple of months.  Fix various minor bugs.
      
      Track a small change in interface file syntax.
      
      Make Printer.c print tagged-unboxed stack sections in a decent way
      now that Alastair-style stack tags have been abandoned.
      b3c8ae4e
  24. 22 Nov, 1999 1 commit
  25. 18 Nov, 1999 1 commit
  26. 16 Nov, 1999 1 commit
  27. 12 Nov, 1999 2 commits
  28. 11 Nov, 1999 1 commit
  29. 09 Nov, 1999 3 commits
    • simonmar's avatar
      [project @ 1999-11-09 15:57:39 by simonmar] · e77996aa
      simonmar authored
      Fix up some problems with the IN_STG_CODE macro.
      e77996aa
    • simonmar's avatar
      [project @ 1999-11-09 15:46:49 by simonmar] · 30681e79
      simonmar authored
      A slew of SMP-related changes.
      
       - New locking scheme for thunks: we now check whether the thunk
         being entered is in our private allocation area, and if so
         we don't lock it.  Well, that's the upshot.  In practice it's
         a lot more fiddly than that.
      
       - I/O blocking is handled a bit more sanely now (but still not
         properly, methinks)
      
       - deadlock detection is back
      
       - remove old pre-SMP scheduler code
      
       - revamp the timing code.  We actually get reasonable-looking
         timing info for SMP programs now.
      
       - fix a bug in the garbage collector to do with IND_OLDGENs appearing
         on the mutable list of the old generation.
      
       - move BDescr() function from rts/BlockAlloc.h to includes/Block.h.
      
       - move struct generation and struct step into includes/StgStorage.h (sigh)
      
       - add UPD_IND_NOLOCK for updating with an indirection where locking
         the black hole is not required.
      30681e79
    • sewardj's avatar
      [project @ 1999-11-09 10:05:07 by sewardj] · b38a2d75
      sewardj authored
      mulIntCzh (i386_TARGET_ARCH): xor --> xorl
      b38a2d75
  30. 05 Nov, 1999 1 commit