1. 26 Oct, 2005 11 commits
    • 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
      05fa9867
    • 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.
      e8a78f0f
    • 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()
      4305e52b
    • 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
      03aaa24e
    • simonpj's avatar
      [project @ 2005-10-26 12:35:12 by simonpj] · 07806d2b
      simonpj authored
      Simplify Provenance (the LocalDef constructor) a little
      07806d2b
    • simonpj's avatar
      [project @ 2005-10-26 12:05:03 by simonpj] · 015aa972
      simonpj authored
      MERGE TO STABLE
      
      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
      015aa972
    • 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.
      559295a0
    • simonmar's avatar
      [project @ 2005-10-26 11:41:51 by simonmar] · 48d21c1f
      simonmar authored
      fix to previous change: allow workers to exit
      48d21c1f
    • 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
        releaseCapability()).
      7c82b4a8
    • simonpj's avatar
      [project @ 2005-10-26 10:23:47 by simonpj] · 474656aa
      simonpj authored
      Cosmetics
      474656aa
    • simonpj's avatar
      [project @ 2005-10-26 08:41:32 by simonpj] · 7f59c72a
      simonpj authored
      Fix PUSH_ON_RUN_QUEUE bug on Win32
      7f59c72a
  2. 25 Oct, 2005 10 commits
    • sof's avatar
      [project @ 2005-10-25 17:31:38 by sof] · 16549a60
      sof authored
      FPTOOLS_CHECK_HTYPE: correctly scope the resetting of CPPFLAGS; as was,
      it got blown away if the value was cached.
      
      Merge to STABLE.
      16549a60
    • 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
      1bc861a6
    • simonmar's avatar
      [project @ 2005-10-25 15:04:58 by simonmar] · 7662a4ce
      simonmar authored
      add missing boot files
      7662a4ce
    • simonmar's avatar
      [project @ 2005-10-25 12:56:50 by simonmar] · 8bbcb410
      simonmar authored
      doc LANGUAGE pragma
      8bbcb410
    • 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
      Haskell:
      
        - messaging cleanup throughout the compiler.  DynFlags has a new
          field:
      
          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
          perusal.
      
          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
          typechecked.
      
      And one change from me:
      
        - implement the LANGUAGE pragma, finally
      78b72ed1
    • 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.
      2909e581
    • simonmar's avatar
      [project @ 2005-10-25 10:28:59 by simonmar] · 7d5216de
      simonmar authored
      - include the contents of ghc/HACKING verbatim, as a "quick start"
        guide
      
      - change the title to "Building and devleloping GHC", and make it a
        bit more GHC-centric.
      7d5216de
    • simonmar's avatar
      [project @ 2005-10-25 10:22:48 by simonmar] · 639c825a
      simonmar authored
      add info about actually doing the build
      639c825a
    • simonmar's avatar
      [project @ 2005-10-25 09:35:57 by simonmar] · a832fad6
      simonmar authored
      Add a "getting started" guide to hacking on GHC.
      a832fad6
    • 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
      commit.
      
      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.
      ee6e44cc
  3. 24 Oct, 2005 4 commits
  4. 21 Oct, 2005 9 commits
    • simonmar's avatar
      [project @ 2005-10-21 15:23:59 by simonmar] · b587ed53
      simonmar authored
      more Win32 fixes
      b587ed53
    • simonmar's avatar
      [project @ 2005-10-21 15:18:54 by simonmar] · 3fe03f82
      simonmar authored
      Fix Win32 DEBUG warnings
      3fe03f82
    • simonmar's avatar
      [project @ 2005-10-21 15:14:06 by simonmar] · 9b6f67f3
      simonmar authored
      Fix Win32 build
      9b6f67f3
    • simonmar's avatar
      [project @ 2005-10-21 14:47:36 by simonmar] · 7bb59f38
      simonmar authored
      No need to import platform-specific stuff now.
      7bb59f38
    • simonmar's avatar
      [project @ 2005-10-21 14:45:59 by simonmar] · 685095d3
      simonmar authored
      Itimer.h has moved into posix/
      685095d3
    • simonmar's avatar
      [project @ 2005-10-21 14:42:47 by simonmar] · ce51bc83
      simonmar authored
      wibble
      ce51bc83
    • simonmar's avatar
      [project @ 2005-10-21 14:41:04 by simonmar] · 0b580ba0
      simonmar authored
      oops, remove old file
      0b580ba0
    • simonmar's avatar
      [project @ 2005-10-21 14:38:18 by simonmar] · 81aad35c
      simonmar authored
      wibble
      81aad35c
    • simonmar's avatar
      [project @ 2005-10-21 14:02:17 by simonmar] · 03a9ff01
      simonmar authored
      Big re-hash of the threaded/SMP runtime
      
      This is a significant reworking of the threaded and SMP parts of
      the runtime.  There are two overall goals here:
      
        - To push down the scheduler lock, reducing contention and allowing
          more parts of the system to run without locks.  In particular,
          the scheduler does not require a lock any more in the common case.
      
        - To improve affinity, so that running Haskell threads stick to the
          same OS threads as much as possible.
      
      At this point we have the basic structure working, but there are some
      pieces missing.  I believe it's reasonably stable - the important
      parts of the testsuite pass in all the (normal,threaded,SMP) ways.
      
      In more detail:
      
        - Each capability now has a run queue, instead of one global run
          queue.  The Capability and Task APIs have been completely
          rewritten; see Capability.h and Task.h for the details.
      
        - Each capability has its own pool of worker Tasks.  Hence, Haskell
          threads on a Capability's run queue will run on the same worker
          Task(s).  As long as the OS is doing something reasonable, this
          should mean they usually stick to the same CPU.  Another way to
          look at this is that we're assuming each Capability is associated
          with a fixed CPU.
      
        - What used to be StgMainThread is now part of the Task structure.
          Every OS thread in the runtime has an associated Task, and it
          can ask for its current Task at any time with myTask().
      
        - removed RTS_SUPPORTS_THREADS symbol, use THREADED_RTS instead
          (it is now defined for SMP too).
      
        - The RtsAPI has had to change; we must explicitly pass a Capability
          around now.  The previous interface assumed some global state.
          SchedAPI has also changed a lot.
      
        - The OSThreads API now supports thread-local storage, used to
          implement myTask(), although it could be done more efficiently
          using gcc's __thread extension when available.
      
        - I've moved some POSIX-specific stuff into the posix subdirectory,
          moving in the direction of separating out platform-specific
          implementations.
      
        - lots of lock-debugging and assertions in the runtime.  In particular,
          when DEBUG is on, we catch multiple ACQUIRE_LOCK()s, and there is
          also an ASSERT_LOCK_HELD() call.
      
      What's missing so far:
      
        - I have almost certainly broken the Win32 build, will fix soon.
      
        - any kind of thread migration or load balancing.  This is high up
          the agenda, though.
      
        - various performance tweaks to do
      
        - throwTo and forkProcess still do not work in SMP mode
      03a9ff01
  5. 20 Oct, 2005 3 commits
    • simonmar's avatar
      [project @ 2005-10-20 14:00:36 by simonmar] · 63e8af08
      simonmar authored
      Column numbers in SrcLocs are now counted as the number of characters,
      rather than columns.  i.e. a tab always counts as 1.  This was
      necessary for communication with Visual Studio interfaces which expect
      character indices, but also it seems the majority of other compilers
      also do things this way.
      
      From: Krasimir Angelov <kr.angelov@gmail.com>
      63e8af08
    • simonmar's avatar
      [project @ 2005-10-20 11:45:19 by simonmar] · 4f0f4342
      simonmar authored
      changes to exitScheduler(): instead of waiting for all the tasks to
      stop, which is unreasonable, we just wait for the run queue to drain.
      This is much quicker, but not ideal (see comments).
      4f0f4342
    • sof's avatar
      [project @ 2005-10-20 00:52:38 by sof] · c86b512d
      sof authored
      [mingw]delay flushing console buffer until last possible moment. Merge to STABLE
      c86b512d
  6. 19 Oct, 2005 1 commit
    • sof's avatar
      [project @ 2005-10-19 16:04:38 by sof] · 3d8a0867
      sof authored
      ocGetNames_PEi386(): correctly allocate .bss sections in relocatable
       object files. See commit for details; fixes misc GHCi crashes reported
       against 6.4.1.
      
      Merge to STABLE.
      3d8a0867
  7. 18 Oct, 2005 1 commit
    • panne's avatar
      [project @ 2005-10-18 11:04:28 by panne] · c30b7a08
      panne authored
      For the 100th time: Fixed the DocBook XML. >:-( Please, please, please:
      Everybody should do a "make validate" before checking in any XML stuff!
      c30b7a08
  8. 17 Oct, 2005 1 commit