1. 08 Oct, 2003 2 commits
    • wolfgang's avatar
      [project @ 2003-10-08 10:37:25 by wolfgang] · 79c93a8a
      wolfgang authored
      Remove apostrophe from #error directive text, as gcc doesn't like that,
      even if the #error is ifdef'd out.
      All other C compilers I know claim that this is correct C :-(.
      merge to stable
    • wolfgang's avatar
      [project @ 2003-10-08 09:42:34 by wolfgang] · 2203c0ce
      wolfgang authored
      Mac OS X/PowerPC:
      Learn to cope with out-of-range relative jumps.
      PowerPC relative branch instructions have a 24 bit displacement field.
      As PPC code is always 4-byte-aligned, this yields a +-32MB range.
      If a particular imported symbol is outside this range, we have to redirect
      the jump to a short piece of new code that just loads the 32bit absolute
      address and jumps there.
  2. 05 Oct, 2003 2 commits
    • panne's avatar
      [project @ 2003-10-05 20:18:36 by panne] · 45ee5a69
      panne authored
      Unbreak the 2nd stage of non-threaded-RTS builds by #ifdefing out a
      call to wakeBlockedWorkerThread. This should probably fixed more
      cleanly by taking an OO view, i.e. always defining this function, but
      doing nothing in the non-threaded case. The final decision on this
      issue is left to the Masters of the Threads (tm)...
    • panne's avatar
      [project @ 2003-10-05 20:14:49 by panne] · 049481ee
      panne authored
      Merged Ross' patch for Hugs:
      Tweak to the FPTOOLS_HAVE_OPENGL: when testing for the GLUT lib,
      include the GL/GLU/GLX libs just discovered.  While most platforms
      don't require this, mysteriously some (e.g. OpenBSD) do.
  3. 03 Oct, 2003 1 commit
  4. 02 Oct, 2003 3 commits
  5. 01 Oct, 2003 7 commits
    • wolfgang's avatar
      [project @ 2003-10-01 21:16:12 by wolfgang] · a9190910
      wolfgang authored
      Un-break non-threaded RTS
      (hopefully; I have no time to test it right now)
    • sof's avatar
      [project @ 2003-10-01 17:01:28 by sof] · 61b596d6
      sof authored
        bring back -Rghc-timing output when compiled with >= 4.11
        (was >= 5.05, which looks unnecessarily restrictive.)
    • sof's avatar
      [project @ 2003-10-01 16:45:10 by sof] · ca9945d0
      sof authored
      outCLine: Use "#line n <filename>", not "# n <filename>". The latter
                isn't ISO (and causes breakage when compiling output with
    • wolfgang's avatar
      [project @ 2003-10-01 10:57:39 by wolfgang] · d3581a6a
      wolfgang authored
      New implementation & changed type signature of forkProcess
      forkProcess now has the following type:
      forkProcess :: IO () -> IO ProcessID
      forkProcessAll has been removed as it is unimplementable in the threaded RTS.
      forkProcess using the old type (IO (Maybe ProcessID)) was impossible to
      implement correctly in the non-threaded RTS and very hard to implement
      in the threaded RTS.
      The new type signature allows a clean and simple implementation.
    • wolfgang's avatar
      [project @ 2003-10-01 10:49:07 by wolfgang] · 324e96d2
      wolfgang authored
      Threaded RTS:
      Don't start new worker threads earlier than necessary.
      After this commit, a Haskell program that uses neither forkOS nor forkIO is
      really single-threaded (rather than using two OS threads internally).
      Some details:
      Worker threads are now only created when a capability is released, and
      only when
      (there are no worker threads)
      	&& (there are runnable Haskell threads ||
      	    there are Haskell threads blocked on IO or threadDelay)
      awaitEvent can now be called from bound thread scheduling loops
      (so that we don't have to create a worker thread just to run awaitEvent)
    • wolfgang's avatar
      [project @ 2003-10-01 10:36:49 by wolfgang] · aefc6956
      wolfgang authored
      Make sure that the sequence
      rts_unlock(); /* (with nothing in between) */
      doesn't crash the threaded RTS.
    • simonmar's avatar
      [project @ 2003-10-01 09:08:10 by simonmar] · 75a2ab87
      simonmar authored
      rts_getBool: we should check the constructor tag instead of comparing
      directly against False_closure and True_closure, since we might be
      using the dynamically-linked versions of these.
      This may or may not be the cause of bug [ 792761 ] rts_getBool: not a
  6. 29 Sep, 2003 2 commits
  7. 28 Sep, 2003 1 commit
  8. 26 Sep, 2003 6 commits
  9. 25 Sep, 2003 2 commits
  10. 24 Sep, 2003 4 commits
    • simonmar's avatar
      [project @ 2003-09-24 13:20:03 by simonmar] · f0631554
      simonmar authored
      remove docs for -fwith option
    • simonmar's avatar
      [project @ 2003-09-24 13:04:45 by simonmar] · 38ef36af
      simonmar authored
      The concensus seems to be that 'with' should go away now, after its
      customary period of deprecation.  Hugs has already removed it, so
      we're following suit.
    • simonmar's avatar
      [project @ 2003-09-24 11:06:51 by simonmar] · 8f57c3c1
      simonmar authored
      Move forkOS_createThread into the RTS so its implementation can be
      dependent on RTS_SUPPORTS_THREADS, which means we can provide a stub
      implementation in the !RTS_SUPPORTS_THREADS case, and hence not depend
      on pthread_create, which requires -lpthread.  The upshot is that GHCi
      now works again when !RTS_SUPPORTS_THREADS.
    • simonmar's avatar
      [project @ 2003-09-24 10:32:11 by simonmar] · 8fb92f95
      simonmar authored
      If we change the terminal settings as a result of hSetBuffering or
      hSetEcho, then restore them again in hs_exit().  This is just good
      citizenship on Unixy platforms.
      We *don't* just automatically save the terminal settings and restore
      them at the end, because that would prevent implementing stty-like
      programs in Haskell.  This scheme is a compromise that hopefully DTRT
      in most cases.
  11. 23 Sep, 2003 10 commits
    • sof's avatar
      [project @ 2003-09-23 17:07:39 by sof] · cf684542
      sof authored
    • sof's avatar
      [project @ 2003-09-23 16:52:44 by sof] · b23e6e00
      sof authored
      If the user explicitly did an instances-only import, i.e.,
      "import Foo ()", don't emit an unused-import warning.
    • wolfgang's avatar
      [project @ 2003-09-23 16:43:00 by wolfgang] · 9c9c4ea9
      wolfgang authored
      Mac OS X uses .dylib instead of .so, recognize that properly.
    • simonmar's avatar
      [project @ 2003-09-23 16:02:34 by simonmar] · 2e160a48
      simonmar authored
      Change some statics to dynamics, and remove a couple of obsolete options.
    • simonmar's avatar
      [project @ 2003-09-23 16:01:22 by simonmar] · a11a320d
      simonmar authored
      Some wibbles to the optimisation section.
    • simonmar's avatar
      [project @ 2003-09-23 15:38:35 by simonmar] · 76ebf3dc
      simonmar authored
      Add a BF_PINNED block flag, and attach it to blocks containing pinned
      objects (in addition to the usual BF_LARGE).
      In heapCensus, we now ignore blocks containing pinned objects, because
      they might contain gaps, and in any case it isn't clear that we want
      to include the whole block in a heap census, because much of it might
      well be dead.  Ignoring it isn't right either, though, so this patch
      just fixes the crash and leaves a ToDo.
    • simonmar's avatar
      [project @ 2003-09-23 15:31:02 by simonmar] · 69373e1e
      simonmar authored
      Fix for clearing the evacuated flag on a block: don't throw away other
      flag settings in the process.
    • simonpj's avatar
      [project @ 2003-09-23 15:29:02 by simonpj] · 6d493299
      simonpj authored
               Much grunting about let-floating
      We want to avoid putting bindings between the '=' of a defn and a '\':
      	let { f = let ... in \y-> ... } in ...
      Reason: float-in often follows float-out, and it may then add yte
      more bindings there, some of which may be strict.  But f may by
      not be marked as not-demanded (for other reasons: see the call to
      zapDemandInfo in Simplify.completeLazyBind); and now the strict binding
      may not be able to float out again.  (Well, it triggers the ASSERT in
      So this commit adds FloatOut.floatNonRecRhs (to complement floatRhs) which
      is a big more vigorous about floating out.
      But that in turn showed up a pile of gore to do with unlifted bindings.
      We can't have them showing up at top level.  After thrashing in the swamp
      for a while, I eventually arranged that
      	let x# = e in b
      (where x# has an unlifted type) is treated exactly like
      	case e of x# -> b
      That is, it is never floated.  Yes, we lose opportunities to float some
      (very cheap!  unlifted let-bindings are always cheap) out of a lambda,
      but we're missing much bigger opportunities already.  For example:
      	\x -> f (h y)
      where h :: Int -> Int# is expensive. We'd like to float the (h y) outside
      the \x, but we don't because it's unboxed.  Possible solution: box it.
      Anyway, that's for the future.
    • simonpj's avatar
      [project @ 2003-09-23 15:15:02 by simonpj] · 6c4a98d3
      simonpj authored
           Move demand-zapping code to where it belongs
      A rather subtle point in the simplifier concerns the zapping of demand-info
      when the RHS of a binding is a value.  This used to be tucked away inside
      IdInfo where it was hard to find.  This commit moves the code to Simplify,
      so it occurs where you'd look for it.  Along with copious comments.
      See the zapDemandInfo in Simplify.completeLazyBind
    • simonpj's avatar
      [project @ 2003-09-23 15:10:43 by simonpj] · 1aeeeaf8
      simonpj authored
      Add more informative assertion