ghc.git
13 years ago[project @ 2005-11-28 14:50:57 by simonmar] Initial_conversion_from_CVS_complete
simonmar [Mon, 28 Nov 2005 14:50:57 +0000 (14:50 +0000)] 
[project @ 2005-11-28 14:50:57 by simonmar]
small tidyup for printing bindings with long identifiers: allow the
binder and its definition to go on separate lines

13 years ago[project @ 2005-11-28 14:39:47 by simonmar]
simonmar [Mon, 28 Nov 2005 14:39:47 +0000 (14:39 +0000)] 
[project @ 2005-11-28 14:39:47 by simonmar]
Small performance improvement to STM: reduce the size of an atomically
frame from 3 words to 2 words by combining the "waiting" boolean field
with the info pointer, i.e. having two separate info tables/return
addresses for an atomically frame, one for the normal case and one for
the waiitng case.

13 years ago[project @ 2005-11-28 14:37:56 by simonmar]
simonmar [Mon, 28 Nov 2005 14:37:56 +0000 (14:37 +0000)] 
[project @ 2005-11-28 14:37:56 by simonmar]
small fix to debugging output

13 years ago[project @ 2005-11-28 11:45:38 by simonpj]
simonpj [Mon, 28 Nov 2005 11:45:38 +0000 (11:45 +0000)] 
[project @ 2005-11-28 11:45:38 by simonpj]
Dont try to output code for "naughty" record selectors

13 years ago[project @ 2005-11-28 09:40:19 by simonpj]
simonpj [Mon, 28 Nov 2005 09:40:19 +0000 (09:40 +0000)] 
[project @ 2005-11-28 09:40:19 by simonpj]
Document record syntax for GADTs and existentials (thanks Autrijus)

13 years ago[project @ 2005-11-28 09:24:17 by simonpj]
simonpj [Mon, 28 Nov 2005 09:24:17 +0000 (09:24 +0000)] 
[project @ 2005-11-28 09:24:17 by simonpj]
Patch from Atrijus alleged to fix FreeBSD build

13 years ago[project @ 2005-11-25 14:33:12 by simonmar]
simonmar [Fri, 25 Nov 2005 14:33:12 +0000 (14:33 +0000)] 
[project @ 2005-11-25 14:33:12 by simonmar]
We must empty the suspended_ccalling_tasks and the returning_task list
when forking.

13 years ago[project @ 2005-11-25 14:03:00 by simonmar]
simonmar [Fri, 25 Nov 2005 14:03:00 +0000 (14:03 +0000)] 
[project @ 2005-11-25 14:03:00 by simonmar]
Modify some assertions that were occasionally incorrect

13 years ago[project @ 2005-11-25 13:59:33 by simonmar]
simonmar [Fri, 25 Nov 2005 13:59:33 +0000 (13:59 +0000)] 
[project @ 2005-11-25 13:59:33 by simonmar]
remove a misplaced RELEASE_LOCK

13 years ago[project @ 2005-11-25 13:56:16 by simonmar]
simonmar [Fri, 25 Nov 2005 13:56:16 +0000 (13:56 +0000)] 
[project @ 2005-11-25 13:56:16 by simonmar]
oops, undo previous (SMP.h is already included)

13 years ago[project @ 2005-11-25 13:10:04 by simonmar]
simonmar [Fri, 25 Nov 2005 13:10:04 +0000 (13:10 +0000)] 
[project @ 2005-11-25 13:10:04 by simonmar]
#include SMP.h

13 years ago[project @ 2005-11-25 13:06:25 by simonmar]
simonmar [Fri, 25 Nov 2005 13:06:25 +0000 (13:06 +0000)] 
[project @ 2005-11-25 13:06:25 by simonmar]
define wb() and xchg() for non-SMP versions of the RTS

13 years ago[project @ 2005-11-25 13:04:41 by simonmar]
simonmar [Fri, 25 Nov 2005 13:04:41 +0000 (13:04 +0000)] 
[project @ 2005-11-25 13:04:41 by simonmar]
-ddump-minimal-imports shouldn't turn off recompilation checking

13 years ago[project @ 2005-11-25 09:56:59 by simonmar]
simonmar [Fri, 25 Nov 2005 09:56:59 +0000 (09:56 +0000)] 
[project @ 2005-11-25 09:56:59 by simonmar]
sort packages by name and version in the 'ghc-pkg list' output

13 years ago[project @ 2005-11-25 09:46:19 by simonmar]
simonmar [Fri, 25 Nov 2005 09:46:19 +0000 (09:46 +0000)] 
[project @ 2005-11-25 09:46:19 by simonmar]
fix comment

13 years ago[project @ 2005-11-25 09:25:08 by simonmar]
simonmar [Fri, 25 Nov 2005 09:25:08 +0000 (09:25 +0000)] 
[project @ 2005-11-25 09:25:08 by simonmar]
object files don't use the .obj suffix on Windows.

13 years ago[project @ 2005-11-24 16:51:18 by simonmar]
simonmar [Thu, 24 Nov 2005 16:51:18 +0000 (16:51 +0000)] 
[project @ 2005-11-24 16:51:18 by simonmar]
In SMP mode it is still possible for an update frame on the stack to
point to an indirection, when two threads evaluate the same thunk (see
comment for details).

So we use the following trick: when the GC discovers an update frame
pointing to an indirection, it changes the indirection to be an
IND_PERM, so it will be retained rather than discarded.

13 years ago[project @ 2005-11-24 16:23:48 by simonmar]
simonmar [Thu, 24 Nov 2005 16:23:48 +0000 (16:23 +0000)] 
[project @ 2005-11-24 16:23:48 by simonmar]
fix some (thankfully harmless) typos

13 years ago[project @ 2005-11-24 14:28:41 by simonmar]
simonmar [Thu, 24 Nov 2005 14:28:41 +0000 (14:28 +0000)] 
[project @ 2005-11-24 14:28:41 by simonmar]
strictly speaking, we also need write barriers in the update code too
(although gcc hasn't been caught doing any reordering here, as yet).

13 years ago[project @ 2005-11-24 14:21:33 by simonmar]
simonmar [Thu, 24 Nov 2005 14:21:33 +0000 (14:21 +0000)] 
[project @ 2005-11-24 14:21:33 by simonmar]
unlockClosure() requires a write barrier for the compiler - write
barriers aren't required for the CPU, but gcc re-orders non-aliasing
writes unless we use an explicit barrier.

This only just showed up when we started compiling the RTS with -O2.

13 years ago[project @ 2005-11-24 14:02:40 by simonmar]
simonmar [Thu, 24 Nov 2005 14:02:40 +0000 (14:02 +0000)] 
[project @ 2005-11-24 14:02:40 by simonmar]
make this compile non-threaded again

13 years ago[project @ 2005-11-24 12:14:50 by simonmar]
simonmar [Thu, 24 Nov 2005 12:14:50 +0000 (12:14 +0000)] 
[project @ 2005-11-24 12:14:50 by simonmar]
lock down the global state in the StablePtr implementation

13 years ago[project @ 2005-11-24 10:41:57 by simonmar]
simonmar [Thu, 24 Nov 2005 10:41:57 +0000 (10:41 +0000)] 
[project @ 2005-11-24 10:41:57 by simonmar]
wibble

13 years ago[project @ 2005-11-24 10:41:37 by simonmar]
simonmar [Thu, 24 Nov 2005 10:41:37 +0000 (10:41 +0000)] 
[project @ 2005-11-24 10:41:37 by simonmar]
bugfix to rev. 1.3: we must fill the slop before writing the
indirectee, because in the case of AP_STACK the indirectee will
overwrite the size field of the closure.

13 years ago[project @ 2005-11-24 10:39:59 by simonmar]
simonmar [Thu, 24 Nov 2005 10:39:59 +0000 (10:39 +0000)] 
[project @ 2005-11-24 10:39:59 by simonmar]
bugfix to new raiseAsync_

13 years ago[project @ 2005-11-24 09:46:01 by simonpj]
simonpj [Thu, 24 Nov 2005 09:46:01 +0000 (09:46 +0000)] 
[project @ 2005-11-24 09:46:01 by simonpj]
A patch to the already-somewhat-delicate machinery that deals with
pattern-matching on unboxed tuples.  This patch deals with pattern
matches that can fail, e.g.
case f x of
  (# Just x, Nothing #) -> ...

The fix is in desugaring of HsCase (DsExpr.lhs).

The test is dsrun013

13 years ago[project @ 2005-11-23 14:28:52 by simonmar]
simonmar [Wed, 23 Nov 2005 14:28:52 +0000 (14:28 +0000)] 
[project @ 2005-11-23 14:28:52 by simonmar]
un-revert rev. 1.22, it wasn't the cause of last weekend's breakage

13 years ago[project @ 2005-11-23 12:27:43 by simonmar]
simonmar [Wed, 23 Nov 2005 12:27:43 +0000 (12:27 +0000)] 
[project @ 2005-11-23 12:27:43 by simonmar]
report the correct version number in the "compiled by GHC version.."
message in a bootstrapped compiler.

13 years ago[project @ 2005-11-23 12:23:10 by simonmar]
simonmar [Wed, 23 Nov 2005 12:23:10 +0000 (12:23 +0000)] 
[project @ 2005-11-23 12:23:10 by simonmar]
fix up the GhcWithNativeCodeGen logic

13 years ago[project @ 2005-11-23 11:42:20 by simonmar]
simonmar [Wed, 23 Nov 2005 11:42:20 +0000 (11:42 +0000)] 
[project @ 2005-11-23 11:42:20 by simonmar]
Add "Why doesn't GHC have a .NET back end?"

13 years ago[project @ 2005-11-23 11:32:53 by simonmar]
simonmar [Wed, 23 Nov 2005 11:32:53 +0000 (11:32 +0000)] 
[project @ 2005-11-23 11:32:53 by simonmar]
make --mk-dll work with --make

Submitted by: Esa Ilari Vuokko <eivuokko@gmail.com>, thanks!

13 years ago[project @ 2005-11-21 20:00:55 by tharris]
tharris [Mon, 21 Nov 2005 20:00:55 +0000 (20:00 +0000)] 
[project @ 2005-11-21 20:00:55 by tharris]
Files missed from STM implementation changes

13 years ago[project @ 2005-11-21 15:58:47 by tharris]
tharris [Mon, 21 Nov 2005 15:58:47 +0000 (15:58 +0000)] 
[project @ 2005-11-21 15:58:47 by tharris]
Re-use temporary storage in the STM implementation

13 years ago[project @ 2005-11-21 10:51:36 by simonpj]
simonpj [Mon, 21 Nov 2005 10:51:36 +0000 (10:51 +0000)] 
[project @ 2005-11-21 10:51:36 by simonpj]
Wibble to typerep (fixes crash I hope)

13 years ago[project @ 2005-11-19 14:59:53 by simonmar]
simonmar [Sat, 19 Nov 2005 14:59:53 +0000 (14:59 +0000)] 
[project @ 2005-11-19 14:59:53 by simonmar]
fix repType after changes to the representation of type synonyms.
This caused the stage2 compiler to crash, because various info tables
misrepresented the pointerhood of constructor arguments.

13 years ago[project @ 2005-11-19 11:44:32 by simonmar]
simonmar [Sat, 19 Nov 2005 11:44:32 +0000 (11:44 +0000)] 
[project @ 2005-11-19 11:44:32 by simonmar]
something has gone wrong; I don't have time right now to find out
exactly what, so revert rev. 1.22 in an attempt to fix it.

13 years ago[project @ 2005-11-18 15:38:26 by simonmar]
simonmar [Fri, 18 Nov 2005 15:38:26 +0000 (15:38 +0000)] 
[project @ 2005-11-18 15:38:26 by simonmar]
fix threaded build

13 years ago[project @ 2005-11-18 15:24:12 by simonmar]
simonmar [Fri, 18 Nov 2005 15:24:12 +0000 (15:24 +0000)] 
[project @ 2005-11-18 15:24:12 by simonmar]
Two improvements to the SMP runtime:

  - support for 'par', aka sparks.  Load balancing is very primitive
    right now, but I have seen programs that go faster using par.

  - support for backing off when a thread is found to be duplicating
    a computation currently underway in another thread.  This also
    fixes some instability in SMP, because it turned out that when
    an update frame points to an indirection, which can happen if
    a thunk is under evaluation in multiple threads, then after GC
    has shorted out the indirection the update will trash the value.
    Now we suspend the duplicate computation to the heap before this
    can happen.

Additionally:

  - stack squeezing is separate from lazy blackholing, and now only
    happens if there's a reasonable amount of squeezing to be done
    in relation to the number of words of stack that have to be moved.
    This means we won't try to shift 10Mb of stack just to save 2
    words at the bottom (it probably never happened, but still).

  - update frames are now marked when they have been visited by lazy
    blackholing, as per the SMP paper.

  - cleaned up raiseAsync() a bit.

13 years ago[project @ 2005-11-18 15:23:09 by simonmar]
simonmar [Fri, 18 Nov 2005 15:23:09 +0000 (15:23 +0000)] 
[project @ 2005-11-18 15:23:09 by simonmar]
cosmetic

13 years ago[project @ 2005-11-18 15:13:46 by simonmar]
simonmar [Fri, 18 Nov 2005 15:13:46 +0000 (15:13 +0000)] 
[project @ 2005-11-18 15:13:46 by simonmar]
Add wcStore(), a write-combining store if supported

(I tried using it in the update code and only succeeded in making
things slower, but it might come in handy in the future)

13 years ago[project @ 2005-11-18 15:10:31 by simonmar]
simonmar [Fri, 18 Nov 2005 15:10:31 +0000 (15:10 +0000)] 
[project @ 2005-11-18 15:10:31 by simonmar]
cosmetic

13 years ago[project @ 2005-11-18 14:24:47 by simonmar]
simonmar [Fri, 18 Nov 2005 14:24:47 +0000 (14:24 +0000)] 
[project @ 2005-11-18 14:24:47 by simonmar]
Omit the __DISCARD__() call in FB_ if __GNUC__ >= 3.  It doesn't
appear to be necessary now, and it prevents some gcc optimisations.

13 years ago[project @ 2005-11-18 14:01:33 by simonmar]
simonmar [Fri, 18 Nov 2005 14:01:33 +0000 (14:01 +0000)] 
[project @ 2005-11-18 14:01:33 by simonmar]
Discard various ways in which gcc zeroes stack slots in the prologue.
So far in my investigations these have always been unnecessary, they
appear to be the result of missed optimisations by gcc, so cross
fingers and discard them.  New variants have just shown up because I
started compiling the RTS with -optc-O2.

13 years ago[project @ 2005-11-17 14:03:18 by simonmar]
simonmar [Thu, 17 Nov 2005 14:03:18 +0000 (14:03 +0000)] 
[project @ 2005-11-17 14:03:18 by simonmar]
small improvement to the update code

13 years ago[project @ 2005-11-17 13:37:30 by simonmar]
simonmar [Thu, 17 Nov 2005 13:37:30 +0000 (13:37 +0000)] 
[project @ 2005-11-17 13:37:30 by simonmar]
Use -optc-O2 when compiling the RTS

13 years ago[project @ 2005-11-17 10:12:26 by simonmar]
simonmar [Thu, 17 Nov 2005 10:12:26 +0000 (10:12 +0000)] 
[project @ 2005-11-17 10:12:26 by simonmar]
Separate the documentation for Concurrent Haskell from that for
Parallel Haskell, and put a big note at the top of the Parallel
Haskell section pointing to the GPH site.

13 years ago[project @ 2005-11-17 09:46:35 by simonmar]
simonmar [Thu, 17 Nov 2005 09:46:35 +0000 (09:46 +0000)] 
[project @ 2005-11-17 09:46:35 by simonmar]
small fixes to docs for +RTS -C

13 years ago[project @ 2005-11-16 17:45:38 by simonpj]
simonpj [Wed, 16 Nov 2005 17:45:39 +0000 (17:45 +0000)] 
[project @ 2005-11-16 17:45:38 by simonpj]
Better error reporting for newtypes with too many constructors,
or too many fields.  Instead of yielding a parse error, we
parse it like a data type declaration, and give a comprehensible
error message later.

A suggestion from Jan-Willem.

13 years ago[project @ 2005-11-16 12:55:58 by simonpj]
simonpj [Wed, 16 Nov 2005 12:55:59 +0000 (12:55 +0000)] 
[project @ 2005-11-16 12:55:58 by simonpj]
Two significant changes to the representation of types

1. Change the representation of type synonyms

    Up to now, type synonym applications have been held in
    *both* expanded *and* un-expanded form.  Unfortunately, this
    has exponential (!) behaviour when type synonyms are deeply
    nested.  E.g.
    type P a b = (a,b)
    f :: P a (P b (P c (P d e)))

    This showed up in a program of Joel Reymont, now immortalised
    as typecheck/should_compile/syn-perf.hs

    So now synonyms are held as ordinary TyConApps, and expanded
    only on demand.

    SynNote has disappeared altogether, so the only remaining TyNote
    is a FTVNote.  I'm not sure if it's even useful.

2. Eta-reduce newtypes

    See the Note [Newtype eta] in TyCon.lhs

    If we have
    newtype T a b = MkT (S a b)

    then, in Core land, we would like S = T, even though the application
    of T is then not saturated. This commit eta-reduces T's RHS, and
    keeps that inside the TyCon (in nt_etad_rhs).  Result is that
    coreEqType can be simpler, and has less need of expanding newtypes.

13 years ago[project @ 2005-11-15 17:37:54 by simonpj]
simonpj [Tue, 15 Nov 2005 17:37:54 +0000 (17:37 +0000)] 
[project @ 2005-11-15 17:37:54 by simonpj]
Yet more detail in types with -dppr-debug

13 years ago[project @ 2005-11-13 19:07:17 by panne]
panne [Sun, 13 Nov 2005 19:07:18 +0000 (19:07 +0000)] 
[project @ 2005-11-13 19:07:17 by panne]
Move the building guide to GHC where it belongs. This is more consistent and
currently even necessary, otherwise *every* fptools project would need the ghc
subtree.

13 years ago[project @ 2005-11-12 21:41:12 by simonpj]
simonpj [Sat, 12 Nov 2005 21:41:12 +0000 (21:41 +0000)] 
[project @ 2005-11-12 21:41:12 by simonpj]
Better TH -> HsSyn conversion

Merge to stable (attempt)

This commit monad-ises the TH syntax -> HS syntax conversion.
This means that error messages can be reported in a more civilised
way.  It also ensures that the entire structure is converted eagerly.
That means that any exceptions buried inside it are triggered
during conversion, and caught by the exception handler in TcSplice.
Before, they could be triggered later, and looked like comiler
crashes.

13 years ago[project @ 2005-11-10 16:14:01 by simonmar]
simonmar [Thu, 10 Nov 2005 16:14:01 +0000 (16:14 +0000)] 
[project @ 2005-11-10 16:14:01 by simonmar]
Fix a crash in STM; we were releasing ownership of the transaction too
early in stmWait(), so a TSO could be woken up before we had finished
putting it to sleep properly.

13 years ago[project @ 2005-11-10 10:52:40 by simonmar]
simonmar [Thu, 10 Nov 2005 10:52:40 +0000 (10:52 +0000)] 
[project @ 2005-11-10 10:52:40 by simonmar]
- point to the bug tracker from the "known bugs" section
- move the item about instances from GHCi to GHC, and tweak it a bit

13 years ago[project @ 2005-11-10 10:50:39 by simonmar]
simonmar [Thu, 10 Nov 2005 10:50:39 +0000 (10:50 +0000)] 
[project @ 2005-11-10 10:50:39 by simonmar]
make validate happy

13 years ago[project @ 2005-11-09 11:36:43 by simonmar]
simonmar [Wed, 9 Nov 2005 11:36:43 +0000 (11:36 +0000)] 
[project @ 2005-11-09 11:36:43 by simonmar]
oops, it's i386_TARGET_ARCH, not x86_TARGET_ARCH

13 years ago[project @ 2005-11-08 15:07:08 by simonmar]
simonmar [Tue, 8 Nov 2005 15:07:08 +0000 (15:07 +0000)] 
[project @ 2005-11-08 15:07:08 by simonmar]
SMP bugfix: if the thread we were just running blocked, then we are in
a delicate state - we don't necessarily have access to the TSO we were
just running, because we relinquished it when we put it on whatever
blocking queue it is on.  It might even be running already.

Previously I made the scheduler quickly loop again in this case.
However, I made it loop too quickly: we should be sure to set the
blackholes_need_checking flag if necessary, otherwise we can miss some
wakeups.

13 years ago[project @ 2005-11-08 14:20:28 by simonmar]
simonmar [Tue, 8 Nov 2005 14:20:28 +0000 (14:20 +0000)] 
[project @ 2005-11-08 14:20:28 by simonmar]
more docs for GHC_PACKAGE_PATH

13 years ago[project @ 2005-11-08 14:18:35 by simonmar]
simonmar [Tue, 8 Nov 2005 14:18:35 +0000 (14:18 +0000)] 
[project @ 2005-11-08 14:18:35 by simonmar]
when GHC_PACKAGE_PATH is set, treat the database at the bottom of the
stack as the "global" one, ie. the one we modify by default.  This
means that GHC_PACKAGE_PATH can be used to set up a virtual GHC
package environment into which packages can be installed using Cabal,
without setting anything other than GHC_PACKAGE_PATH.

13 years ago[project @ 2005-11-08 12:56:04 by simonmar]
simonmar [Tue, 8 Nov 2005 12:56:04 +0000 (12:56 +0000)] 
[project @ 2005-11-08 12:56:04 by simonmar]
gcc's -fstrict-aliasing is biting us when we use the stack to store
different types of objects.  For example:

  *((StgDouble*)((W_)Sp-8)) = *((StgDouble*)((W_)Sp+8));
  Sp[1] = (W_)&s1Cx_info;

gcc feels free to reorder these two lines, because they refer to
differently typed objects, even though the assignment to Sp[1] clearly
aliases the read from the same location.

Trying to fix this by accessing locations using union types might be
possible, but I took the sledgehammer approach of
-fno-strict-aliasing.  This is justified to a certain extent because
our generated C code is derived from a very weakly-typed internal
language (C--).

13 years ago[project @ 2005-11-08 12:31:36 by simonmar]
simonmar [Tue, 8 Nov 2005 12:31:36 +0000 (12:31 +0000)] 
[project @ 2005-11-08 12:31:36 by simonmar]
unless I'm mistaken, only x86 needs -ffloat-store.  x86_64 certainly
doesn't need it, because it uses SSE2 with the correct-sized floating
point registers and doesn't store temporary results with more
precision than results in memory.

13 years ago[project @ 2005-11-08 11:02:56 by simonmar]
simonmar [Tue, 8 Nov 2005 11:02:56 +0000 (11:02 +0000)] 
[project @ 2005-11-08 11:02:56 by simonmar]
Fix bug in an assertion

13 years ago[project @ 2005-11-08 10:44:22 by simonmar]
simonmar [Tue, 8 Nov 2005 10:44:22 +0000 (10:44 +0000)] 
[project @ 2005-11-08 10:44:22 by simonmar]
raiseAsync: fix bug that can cause a scavenge_stack panic for a thread
that has just been killed.

13 years ago[project @ 2005-11-07 14:43:34 by simonmar]
simonmar [Mon, 7 Nov 2005 14:43:34 +0000 (14:43 +0000)] 
[project @ 2005-11-07 14:43:34 by simonmar]
Fix some problems with array thawing/freezing and the GC.

13 years ago[project @ 2005-11-07 10:20:43 by simonmar]
simonmar [Mon, 7 Nov 2005 10:20:43 +0000 (10:20 +0000)] 
[project @ 2005-11-07 10:20:43 by simonmar]
Fix non-threaded build.

13 years ago[project @ 2005-11-05 00:23:36 by ross]
ross [Sat, 5 Nov 2005 00:23:36 +0000 (00:23 +0000)] 
[project @ 2005-11-05 00:23:36 by ross]
fix for pre-6.0 ghc's

13 years ago[project @ 2005-11-04 16:23:20 by simonmar]
simonmar [Fri, 4 Nov 2005 16:23:20 +0000 (16:23 +0000)] 
[project @ 2005-11-04 16:23:20 by simonmar]
Document GHC_PACKAGE_PATH, and changes to the ghc-pkg command line interface.

13 years ago[project @ 2005-11-04 15:48:25 by simonmar]
simonmar [Fri, 4 Nov 2005 15:48:26 +0000 (15:48 +0000)] 
[project @ 2005-11-04 15:48:25 by simonmar]
- Add support for the GHC_PACKAGE_PATH environment variable, which
  specifies a :-separated (;-separated on Windows) list of package
  database files.  If the list ends in : (; on Windows), then the
  normal user and global databases are added.

  GHC_PACKAGE_PATH is searched left-to-right for packages, like
  $PATH, but unlike -package-conf flags, which are searched
  right-to-left.  This isn't ideal, but it seemed the least worst to me
  (command line flags always override right-to-left (except -i),
  whereas the PATH environment variable overrides left-to-right, I chose
  to follow the environment variable convention).  I can always change
  it if there's an outcry.

- Rationalise the interpretation of --user, --global, and -f on the
  ghc-pkg command line.  The story is now this: --user and --global
  say which package database to *act upon*, they do not change the
  shape of the database stack.  -f pushes a database on the stack, and
  also requests that the specified database be the one to act upon, for
  commands that modify the database.  If a database is already on the stack,
  then -f just selects it as the one to act upon.

  This means you can have a bunch of databases in GHC_PACKAGE_PATH, and
  use -f to select the one to modify.

13 years ago[project @ 2005-11-04 15:33:36 by simonmar]
simonmar [Fri, 4 Nov 2005 15:33:36 +0000 (15:33 +0000)] 
[project @ 2005-11-04 15:33:36 by simonmar]
patch up forkProcess(): don't discard our own Task, and set
cap->spare_workers to be empty in the child process.

13 years ago[project @ 2005-11-04 15:31:30 by simonmar]
simonmar [Fri, 4 Nov 2005 15:31:30 +0000 (15:31 +0000)] 
[project @ 2005-11-04 15:31:30 by simonmar]
We shouldn't call closeCondition() on the condition in discardTask(),
we're just freeing the Task for later use.

13 years ago[project @ 2005-11-04 12:02:04 by simonmar]
simonmar [Fri, 4 Nov 2005 12:02:05 +0000 (12:02 +0000)] 
[project @ 2005-11-04 12:02:04 by simonmar]
Win32: Use CriticalSections instead of Mutexes, they are *much* faster.

13 years ago[project @ 2005-11-03 16:47:45 by simonmar]
simonmar [Thu, 3 Nov 2005 16:47:45 +0000 (16:47 +0000)] 
[project @ 2005-11-03 16:47:45 by simonmar]
adjust type of startSignalHandlers() to make changes to Win32 version

13 years ago[project @ 2005-11-03 16:34:45 by simonmar]
simonmar [Thu, 3 Nov 2005 16:34:45 +0000 (16:34 +0000)] 
[project @ 2005-11-03 16:34:45 by simonmar]
schedulePushWork(): don't attempt to move the thread bound to the
current Task to a different Capability.

13 years ago[project @ 2005-11-03 16:23:24 by simonmar]
simonmar [Thu, 3 Nov 2005 16:23:24 +0000 (16:23 +0000)] 
[project @ 2005-11-03 16:23:24 by simonmar]
wibble

13 years ago[project @ 2005-11-03 16:22:15 by simonmar]
simonmar [Thu, 3 Nov 2005 16:22:15 +0000 (16:22 +0000)] 
[project @ 2005-11-03 16:22:15 by simonmar]
Improve the Win32 implementation of the time-measurement stuff.  Now
supports per-thread CPU time, and the elapsed time should be correct
(previously it was the sum of user time & kernel time, which isn't
what we want).

13 years ago[project @ 2005-11-03 16:20:38 by simonmar]
simonmar [Thu, 3 Nov 2005 16:20:38 +0000 (16:20 +0000)] 
[project @ 2005-11-03 16:20:38 by simonmar]
use getThreadCPUTime, not getProcessTimes

13 years ago[project @ 2005-11-03 15:15:14 by simonmar]
simonmar [Thu, 3 Nov 2005 15:15:14 +0000 (15:15 +0000)] 
[project @ 2005-11-03 15:15:14 by simonmar]
Fixes for console event handling on Win32 in the threaded/SMP runtime.
(it now builds, but is untested).

13 years ago[project @ 2005-11-03 15:00:23 by simonpj]
simonpj [Thu, 3 Nov 2005 15:00:23 +0000 (15:00 +0000)] 
[project @ 2005-11-03 15:00:23 by simonpj]
Missing import for new assert

13 years ago[project @ 2005-11-03 14:35:20 by simonmar]
simonmar [Thu, 3 Nov 2005 14:35:20 +0000 (14:35 +0000)] 
[project @ 2005-11-03 14:35:20 by simonmar]
Modify ACQUIRE_LOCK/RELEASE_LOCK for use in .cmm files

13 years ago[project @ 2005-11-03 14:28:43 by simonmar]
simonmar [Thu, 3 Nov 2005 14:28:43 +0000 (14:28 +0000)] 
[project @ 2005-11-03 14:28:43 by simonmar]
avoid a warning

13 years ago[project @ 2005-11-03 13:39:22 by simonmar]
simonmar [Thu, 3 Nov 2005 13:39:22 +0000 (13:39 +0000)] 
[project @ 2005-11-03 13:39:22 by simonmar]
Fix build on win32.

13 years ago[project @ 2005-11-03 11:05:38 by simonmar]
simonmar [Thu, 3 Nov 2005 11:05:38 +0000 (11:05 +0000)] 
[project @ 2005-11-03 11:05:38 by simonmar]
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
    Stats.c.

  - 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.

13 years ago[project @ 2005-11-03 11:02:00 by simonmar]
simonmar [Thu, 3 Nov 2005 11:02:00 +0000 (11:02 +0000)] 
[project @ 2005-11-03 11:02:00 by simonmar]
indentation only

13 years ago[project @ 2005-11-03 11:00:40 by simonmar]
simonmar [Thu, 3 Nov 2005 11:00:40 +0000 (11:00 +0000)] 
[project @ 2005-11-03 11:00:40 by simonmar]
Check for librt and clock_gettime()

13 years ago[project @ 2005-11-02 17:41:00 by simonpj]
simonpj [Wed, 2 Nov 2005 17:41:00 +0000 (17:41 +0000)] 
[project @ 2005-11-02 17:41:00 by simonpj]
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.

13 years ago[project @ 2005-11-02 17:39:57 by simonpj]
simonpj [Wed, 2 Nov 2005 17:39:57 +0000 (17:39 +0000)] 
[project @ 2005-11-02 17:39:57 by simonpj]
Trace output only

13 years ago[project @ 2005-11-02 13:05:30 by simonmar]
simonmar [Wed, 2 Nov 2005 13:05:30 +0000 (13:05 +0000)] 
[project @ 2005-11-02 13:05:30 by simonmar]
release/acquire the SM lock around scheduleFinalizers(), because we
need to call allocateLocal() in there, which acquires the SM lock.

13 years ago[project @ 2005-11-02 13:04:55 by simonmar]
simonmar [Wed, 2 Nov 2005 13:04:55 +0000 (13:04 +0000)] 
[project @ 2005-11-02 13:04:55 by simonmar]
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.

13 years ago[project @ 2005-11-02 12:26:21 by simonmar]
simonmar [Wed, 2 Nov 2005 12:26:21 +0000 (12:26 +0000)] 
[project @ 2005-11-02 12:26:21 by simonmar]
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.

13 years ago[project @ 2005-11-02 12:23:58 by simonmar]
simonmar [Wed, 2 Nov 2005 12:23:58 +0000 (12:23 +0000)] 
[project @ 2005-11-02 12:23:58 by simonmar]
add an ASSERT

13 years ago[project @ 2005-11-02 11:56:56 by simonmar]
simonmar [Wed, 2 Nov 2005 11:56:56 +0000 (11:56 +0000)] 
[project @ 2005-11-02 11:56:56 by simonmar]
Fix warnings when assigning the result of a foreign call to BaseReg
(as now happens in SMP mode with resumeThread()).

13 years ago[project @ 2005-11-02 09:57:45 by simonpj]
simonpj [Wed, 2 Nov 2005 09:57:45 +0000 (09:57 +0000)] 
[project @ 2005-11-02 09:57:45 by simonpj]
Correct the TH fix of Oct 26, involving thFAKE
MERGE TO STABLE

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

13 years ago[project @ 2005-11-02 09:53:18 by simonpj]
simonpj [Wed, 2 Nov 2005 09:53:18 +0000 (09:53 +0000)] 
[project @ 2005-11-02 09:53:18 by simonpj]
Export lists

13 years ago[project @ 2005-10-31 11:53:42 by simonmar]
simonmar [Mon, 31 Oct 2005 11:53:42 +0000 (11:53 +0000)] 
[project @ 2005-10-31 11:53:42 by simonmar]
x86_64: pass -fno-unit-at-a-time to gcc.  See comment for details.

13 years ago[project @ 2005-10-31 11:49:29 by simonpj]
simonpj [Mon, 31 Oct 2005 11:49:30 +0000 (11:49 +0000)] 
[project @ 2005-10-31 11:49:29 by simonpj]
Wibble to: "Add a new pragma: SPECIALISE INLINE"

I messed up the way that NOINLINE is parsed; this commit fixes it.

13 years ago[project @ 2005-10-31 11:31:10 by simonmar]
simonmar [Mon, 31 Oct 2005 11:31:10 +0000 (11:31 +0000)] 
[project @ 2005-10-31 11:31:10 by simonmar]
clean up more junk generated by gcc

13 years ago[project @ 2005-10-31 11:17:53 by simonmar]
simonmar [Mon, 31 Oct 2005 11:17:53 +0000 (11:17 +0000)] 
[project @ 2005-10-31 11:17:53 by simonmar]
x86_64: catch and fix one kind of crappy code generated by gcc

    #    movq -4(%rbp), %rax
    #    jmp  *%rax

==>

    #    jmp  *-4(%rbp)

13 years ago[project @ 2005-10-31 10:52:06 by simonmar]
simonmar [Mon, 31 Oct 2005 10:52:06 +0000 (10:52 +0000)] 
[project @ 2005-10-31 10:52:06 by simonmar]
Reverse the sense of the is-young-generation test in the update code.
This generates much better code from gcc.

13 years ago[project @ 2005-10-30 19:12:31 by krasimir]
krasimir [Sun, 30 Oct 2005 19:12:31 +0000 (19:12 +0000)] 
[project @ 2005-10-30 19:12:31 by krasimir]
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.

13 years ago[project @ 2005-10-29 18:13:52 by krasimir]
krasimir [Sat, 29 Oct 2005 18:13:52 +0000 (18:13 +0000)] 
[project @ 2005-10-29 18:13:52 by krasimir]
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.