1. 03 Nov, 2005 4 commits
    • simonmar's avatar
      [project @ 2005-11-03 13:39:22 by simonmar] · 57fadb77
      simonmar authored
      Fix build on win32.
    • simonmar's avatar
      [project @ 2005-11-03 11:05:38 by simonmar] · cc2926f3
      simonmar authored
      Improvments to time-measurement and stats:
        - move all the platform-dependent timing related stuff into
          posix/GetTime.c and win32/GetTime.c, with the machine-indepent
          interface specified in GetTime.h.  This is now used by
        - On Unix, use gettimeofday() and getrusage() by default, falling
          back to time() if one of these isn't available.
        - try to implement thread-specfic CPU-time measurement using
          clock_gettime() on Unix.  Doesn't work reliably on Linux, because
          the implemenation tries to use the processor TSC, which on an
          SMP machine goes wrong when the thread moves between CPUs.  However,
          it's slightly less bogus that before, and hopefully will improve
          in the future.
    • simonmar's avatar
      [project @ 2005-11-03 11:02:00 by simonmar] · 74df0d16
      simonmar authored
      indentation only
    • simonmar's avatar
      [project @ 2005-11-03 11:00:40 by simonmar] · 35a09de8
      simonmar authored
      Check for librt and clock_gettime()
  2. 02 Nov, 2005 9 commits
    • simonpj's avatar
      [project @ 2005-11-02 17:41:00 by simonpj] · d068f518
      simonpj authored
      Second correction to the TH fix of Oct 26, involving thFAKE
      Original message
        1) A bug in the renaming of [d| brackets |]. The problem was
        that when we renamed the bracket we messed up the name cache, because
        the module was still that of the parent module. Now we set a fake
        module before renaming it.
      This commit fixes the typecheker problem in a different way,
      in tcLookupGlobal.
    • simonpj's avatar
      [project @ 2005-11-02 17:39:57 by simonpj] · acc7346e
      simonpj authored
      Trace output only
    • simonmar's avatar
      [project @ 2005-11-02 13:05:30 by simonmar] · 709d58c0
      simonmar authored
      release/acquire the SM lock around scheduleFinalizers(), because we
      need to call allocateLocal() in there, which acquires the SM lock.
    • simonmar's avatar
      [project @ 2005-11-02 13:04:55 by simonmar] · db2468da
      simonmar authored
      when shutting down, don't allow a worker to exit until the run queue
      is empty, because the thread in exitScheduler() is waiting for this.
    • simonmar's avatar
      [project @ 2005-11-02 12:26:21 by simonmar] · d9dfeb2a
      simonmar authored
      scheduleHandleStackOverflow: fix bug in non-threaded RTS - if
      (task->tso != NULL), then (task->tso) is not necessarily the TSO we
      are running (in the threaded RTS it is).
      Also fix a few non-threaded warnings while I'm here.
    • simonmar's avatar
      [project @ 2005-11-02 12:23:58 by simonmar] · e30a37bc
      simonmar authored
      add an ASSERT
    • simonmar's avatar
      [project @ 2005-11-02 11:56:56 by simonmar] · 3348660b
      simonmar authored
      Fix warnings when assigning the result of a foreign call to BaseReg
      (as now happens in SMP mode with resumeThread()).
    • simonpj's avatar
      [project @ 2005-11-02 09:57:45 by simonpj] · f7e8044f
      simonpj authored
      Correct the TH fix of Oct 26, involving thFAKE
      Original message
        1) A bug in the renaming of [d| brackets |]. The problem was
        that when we renamed the bracket we messed up the name cache, because
        the module was still that of the parent module. Now we set a fake
        module before renaming it.
      But we have to tell the *typechecker* too, not just the renamer.
      See comments with TcSplice.tc_bracket (DecBr case).
      Should fix TH failures in the STABLE branch
    • simonpj's avatar
      [project @ 2005-11-02 09:53:18 by simonpj] · ca49225c
      simonpj authored
      Export lists
  3. 31 Oct, 2005 5 commits
  4. 30 Oct, 2005 1 commit
    • krasimir's avatar
      [project @ 2005-10-30 19:12:31 by krasimir] · 6e64c691
      krasimir authored
      Change the way in which the .exe suffix to the output file is added. The reason
      is that "-o main" will generate main.exe on Windows while the doesFileExists "main"
      in DriverPipeline.link will return False.
  5. 29 Oct, 2005 3 commits
    • krasimir's avatar
      [project @ 2005-10-29 18:13:52 by krasimir] · 57d26da8
      krasimir authored
      The guessed output file should have ".exe" extension on Windows. ld tends to
      add .exe automatically if the output file doesn't have extension but if
      we don't add the extension explicitly then the doesFileExists check in
      DriverPipeline.link will fail.
    • panne's avatar
      [project @ 2005-10-29 14:19:59 by panne] · 26f300ce
      panne authored
      Fixed the last commit, which broke the nightly builds. I'm not sure if
      this is really a fix or a workaround only, though...
    • krasimir's avatar
      [project @ 2005-10-29 05:17:57 by krasimir] · 9decae3f
      krasimir authored
      The mut_lists array was allocated but never initialized. This was causing SegFault.
  6. 28 Oct, 2005 6 commits
    • simonmar's avatar
      [project @ 2005-10-28 15:51:15 by simonmar] · dde80d73
      simonmar authored
      document -stubdir
    • simonmar's avatar
      [project @ 2005-10-28 15:22:39 by simonmar] · f2e730f3
      simonmar authored
      Add -stubdir option to control location of generated stub files.  Also
      do some clean up while I'm here - remove hscStubCOut/hscStubHOut from
      DynFlags, and add
        mkStubPaths :: DynFlags -> Module -> ModLocation -> (FilePath,FilePath)
      to Finder.  (this seemed better than caching the stub paths in every
      ModLocation, because they are rarely needed and only present in home
      modules, and are easily calculated from other available information).
      -stubdir behaves in exactly the same way as -odir and -hidir.
    • simonmar's avatar
      [project @ 2005-10-28 11:35:35 by simonmar] · 55495951
      simonmar authored
      Change the default executable name to match the basename of the source
      file containing the Main module (or the module specified by -main-is),
      if there is one.  On Windows, the .exe extension is added.
      As requested on the ghc-users list, and as implemented by Tomasz
      Zielonka <tomasz.zielonka at gmail.com>, with modifications by me.
      I changed the type of the mainModIs field of DynFlags from Maybe
      String to Module, which removed some duplicate code.
    • simonmar's avatar
      [project @ 2005-10-28 11:29:19 by simonmar] · d8afca91
      simonmar authored
      Fix double "Linking ..." message, and mention the name of the
      executable in the message.
    • simonmar's avatar
      [project @ 2005-10-28 08:16:54 by simonmar] · bbf874f7
      simonmar authored
      Fix links to library doc for Haddock 0.7.
    • simonmar's avatar
      [project @ 2005-10-28 08:10:09 by simonmar] · 82460c32
      simonmar authored
      Fix recent breakage on non-Windows systems
  7. 27 Oct, 2005 11 commits
    • simonmar's avatar
      [project @ 2005-10-27 15:26:06 by simonmar] · 677c6345
      simonmar authored
      - Very simple work-sharing amongst Capabilities: whenever a Capability
        detects that it has more than 1 thread in its run queue, it runs
        around looking for empty Capabilities, and shares the threads on its
        run queue equally with the free Capabilities it finds.
      - unlock the garbage collector's mutable lists, by having private
        mutable lists per capability (and per generation).  The private
        mutable lists are moved onto the main mutable lists at each GC.
        This pulls the old-generation update code out of the storage manager
        mutex, which is one of the last remaining causes of (alleged) contention.
      - Fix some problems with synchronising when a GC is required.  We should
        synchronise quicker now.
    • simonpj's avatar
      [project @ 2005-10-27 15:21:05 by simonpj] · f9f5235f
      simonpj authored
      Improve warning a little (suggested by Benjamin Pierce)
    • simonmar's avatar
      [project @ 2005-10-27 15:18:50 by simonmar] · c27d86e0
      simonmar authored
      rtsFatalInternalError(): better to abort() rather than just
      stg_exit(), at least then we get a core dump.
    • simonmar's avatar
      [project @ 2005-10-27 15:17:11 by simonmar] · 02019841
      simonmar authored
      unpark_tso: call unblockOne() instead of doing the job inline.  This
      properly migrates the thread, setting its task to point back to the
      right capability, if necessary.
    • simonpj's avatar
      [project @ 2005-10-27 14:35:20 by simonpj] · 958924a2
      simonpj authored
      Add a new pragma: SPECIALISE INLINE
      This amounts to adding an INLINE pragma to the specialised version
      of the function.  You can add phase stuff too (SPECIALISE INLINE [2]),
      and NOINLINE instead of INLINE.
      The reason for doing this is to support inlining of type-directed
      recursive functions.  The main example is this:
        -- non-uniform array type
        data Arr e where
          ArrInt  :: !Int -> ByteArray#       -> Arr Int
          ArrPair :: !Int -> Arr e1 -> Arr e2 -> Arr (e1, e2)
        (!:) :: Arr e -> Int -> e
        {-# SPECIALISE INLINE (!:) :: Arr Int -> Int -> Int #-}
        {-# SPECIALISE INLINE (!:) :: Arr (a, b) -> Int -> (a, b) #-}
        ArrInt  _ ba    !: (I# i) = I# (indexIntArray# ba i)
        ArrPair _ a1 a2 !: i      = (a1 !: i, a2 !: i)
      If we use (!:) at a particular array type, we want to inline (:!),
      which is recursive, until all the type specialisation is done.
      On the way I did a bit of renaming and tidying of the way that
      pragmas are carried, so quite a lot of files are touched in a
      fairly trivial way.
    • simonpj's avatar
      [project @ 2005-10-27 14:34:32 by simonpj] · 47d253ba
      simonpj authored
      Filter out inaccessible GADT alternatives
    • simonpj's avatar
      [project @ 2005-10-27 13:51:27 by simonpj] · ca1b9eb2
      simonpj authored
      Allow GADTs in record update, provided all the relevant datacons are
      vanilla.  Turns out that ObjectIO.StdMenuElement uses this facility!
      This a slight enhancement to the new stuff allowing record
      fields in GADTs.
    • simonmar's avatar
      [project @ 2005-10-27 08:00:03 by simonmar] · 7f9c0373
      simonmar authored
      Fix getThreadLocalVar() on Win32 - thanks for Krasimir for finding the bug.
    • sof's avatar
      [project @ 2005-10-27 01:39:40 by sof] · 2909e6fb
      sof authored
      [mingw/msys only]
      Undo long-standing workaround for buggy GNU ld's on mingw/msys; i.e.,
      the linker wasn't correctly generating relocatable object files when
      the number of relocs exceeded 2^16. Worked around the issue by
      hackily splitting up the GHCi object file for the larger packages
      ('base', 'ObjectIO' and 'win32') into a handful of object files,
      each with a manageable number of relocs. Tiresome and error-prone
      (but the hack has served us well!)
      This commit imposes a restriction on the 'ld' you use to compile
      up GHC with; it now has to be ld-2.15.x or later (something GHC
      binary dists have shipped with since 6.2.2)
    • sof's avatar
      [project @ 2005-10-27 01:27:37 by sof] · 53068b73
      sof authored
      ocGetNames_PEi386(): fix bug in previous commit to this function;
      the correct .bss size for object files wasn't being passed to
      Not directly harmful, but triggers ASSERT() failure w/ DEBUG.
      Merge to STABLE.
    • sof's avatar
      [project @ 2005-10-27 00:21:24 by sof] · 8f94d42a
      sof authored
      emitForeignCall: avoid CC warnings by hinting that resume/suspendThread id arg is a ptr
  8. 26 Oct, 2005 1 commit