1. 27 Oct, 2005 8 commits
    • 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
  2. 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
  3. 25 Oct, 2005 8 commits
    • simonmar's avatar
      [project @ 2005-10-25 15:27:22 by simonmar] · 1bc861a6
      simonmar authored
      Fix bug in allocateLocal, we weren't assigning bd->step properly
    • simonmar's avatar
      [project @ 2005-10-25 15:04:58 by simonmar] · 7662a4ce
      simonmar authored
      add missing boot files
    • simonmar's avatar
      [project @ 2005-10-25 12:56:50 by simonmar] · 8bbcb410
      simonmar authored
      doc LANGUAGE pragma
    • simonmar's avatar
      [project @ 2005-10-25 12:48:35 by simonmar] · 78b72ed1
      simonmar authored
      Two changes from Krasimir Angelov, which were required for Visual
        - messaging cleanup throughout the compiler.  DynFlags has a new
          log_action :: Severity -> SrcSpan -> PprStyle -> Message -> IO ()
          this action is invoked for every message generated by the
          compiler.  This means a client of the GHC API can direct messages to
          any destination, or collect them up in an IORef for later
          This replaces previous hacks to redirect messages in the GHC API
          (hence some changes to function types in GHC.hs).
        - The JustTypecheck mode of GHC now does what it says.  It doesn't
          run any of the compiler passes beyond the typechecker for each module,
          but does generate the ModIface in order that further modules can be
      And one change from me:
        - implement the LANGUAGE pragma, finally
    • simonmar's avatar
      [project @ 2005-10-25 10:48:44 by simonmar] · 2909e581
      simonmar authored
      companion to Lexer.x rev. 1.29; columns now always count tabs as 1 in SrcLoc.
    • simonmar's avatar
      [project @ 2005-10-25 10:22:48 by simonmar] · 639c825a
      simonmar authored
      add info about actually doing the build
    • simonmar's avatar
      [project @ 2005-10-25 09:35:57 by simonmar] · a832fad6
      simonmar authored
      Add a "getting started" guide to hacking on GHC.
    • wolfgang's avatar
      [project @ 2005-10-25 02:57:47 by wolfgang] · ee6e44cc
      wolfgang authored
      Mac OS X/Darwin PowerPC: Fix a problem introduced by the recent Darwin/x86
      Remember how we deliberately misaligned the .o file in memory to compensate
      for Mach-O's lax alignment rules.
      This should have been comitted along with Linker.c 1.203 about two weeks ago.
  4. 24 Oct, 2005 3 commits
  5. 21 Oct, 2005 7 commits