1. 31 Oct, 2005 5 commits
  2. 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.
  3. 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.
  4. 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
  5. 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
  6. 26 Oct, 2005 14 commits
    • sof's avatar
      [project @ 2005-10-26 22:33:20 by sof] · b25ebcf6
      sof authored
      ASSERT_TASK_ID(): THREADED_RTS-only assert
    • simonmar's avatar
      [project @ 2005-10-26 15:36:06 by simonmar] · 9348149e
      simonmar authored
      Package up the various properties of Capabilities/Tasks that we were
      asserting all over the place, and put them in a single macro
    • simonmar's avatar
      [project @ 2005-10-26 15:22:08 by simonmar] · d3cfe894
      simonmar authored
      The prev/next link fields in struct Capability_ aren't used
    • simonmar's avatar
      [project @ 2005-10-26 15:20:59 by simonmar] · 05fa9867
      simonmar authored
      - forkProcess fix: add a forgotten rts_unlock()
      - add a couple more ASSERTs
    • simonpj's avatar
      [project @ 2005-10-26 14:53:30 by simonpj] · e8a78f0f
      simonpj authored
      awaitRequests: blocked_queue_tl was being set to NULL rather than
      END_TSO_QUEUE if the thread being removed was at the end of the queue.
      This bug has been in the code since 2003 - I have absolutely no idea
      why it hasn't manifested until today.
    • simonmar's avatar
      [project @ 2005-10-26 13:58:40 by simonmar] · 4305e52b
      simonmar authored
      forkOS_createThreadWrapper: oops, better use the result from rts_evalStableIO()
    • simonpj's avatar
      [project @ 2005-10-26 13:03:39 by simonpj] · 03aaa24e
      simonpj authored
      Improve documentation of typeclass extensions; merge to stable if it goes easily
    • simonpj's avatar
      [project @ 2005-10-26 12:35:12 by simonpj] · 07806d2b
      simonpj authored
      Simplify Provenance (the LocalDef constructor) a little
    • simonpj's avatar
      [project @ 2005-10-26 12:05:03 by simonpj] · 015aa972
      simonpj authored
      Fix two small Template Haskell bugs.
      (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.
      TH_spliceDecl4 is the test.
      (2) An expression splice can in principle mention *any* variable,
      so the renamer really has to assume that it does when doing depdendency
      analysis.  For example
      	f = ...
      	h = ...$(thing "f")...
      The renamer had better not put 'h' before 'f', else the type checker
      won't find a defn for 'f' in the type envt.
      TH_spliceE5 is the test
    • simonmar's avatar
      [project @ 2005-10-26 11:58:57 by simonmar] · 559295a0
      simonmar authored
      x86_64 fix: I was a bit sloppy before and assumed that the malloc()'d
      memory would be in the low 2Gb, so I could use 32-bit offset
      addressing.  It appears that this sometimes isn't the case, so do it
      properly and use 64-bit absolute addressing.
    • simonmar's avatar
      [project @ 2005-10-26 11:41:51 by simonmar] · 48d21c1f
      simonmar authored
      fix to previous change: allow workers to exit
    • simonmar's avatar
      [project @ 2005-10-26 10:42:54 by simonmar] · 7c82b4a8
      simonmar authored
      - change the type of StgRun(): now we return the Capability that the
        thread currently holds.  The return status of the thread is now
        stored in cap->r.rRet (a new slot in the reg table).
        This was necessary because on return from StgRun(), the current
        TSO may be blocked, so it no longer belongs to us.  If it is a bound
        thread, then the Task may have been already woken up on another
        Capability, so the scheduler can't use task->cap to find the
        capability it currently owns.
      - when shutting down, allow a bound thread to remove its TSO from
        the run queue when exiting (eliminates an error condition in
    • simonpj's avatar
      [project @ 2005-10-26 10:23:47 by simonpj] · 474656aa
      simonpj authored
    • simonpj's avatar
      [project @ 2005-10-26 08:41:32 by simonpj] · 7f59c72a
      simonpj authored
      Fix PUSH_ON_RUN_QUEUE bug on Win32