ghc-hetmet.git
19 years ago[project @ 2005-04-29 21:56:06 by sof]
sof [Fri, 29 Apr 2005 21:56:06 +0000 (21:56 +0000)]
[project @ 2005-04-29 21:56:06 by sof]
leave out Java bits in include/ that mingw-3.2 supplies; temporarily disable PDF document generation

19 years ago[project @ 2005-04-29 21:52:38 by sof]
sof [Fri, 29 Apr 2005 21:52:38 +0000 (21:52 +0000)]
[project @ 2005-04-29 21:52:38 by sof]
gcc-mingw-3.4.x seems to have renamed .rodata to .rdata; look for either

19 years ago[project @ 2005-04-29 21:02:15 by sof]
sof [Fri, 29 Apr 2005 21:02:15 +0000 (21:02 +0000)]
[project @ 2005-04-29 21:02:15 by sof]
'ghcprof' is a perl script, but installed in the bin/ directory. Merge to STABLE

19 years ago[project @ 2005-04-29 16:58:19 by simonpj]
simonpj [Fri, 29 Apr 2005 16:58:19 +0000 (16:58 +0000)]
[project @ 2005-04-29 16:58:19 by simonpj]
The boot dfunid should be a LocalId

19 years ago[project @ 2005-04-29 16:18:58 by simonmar]
simonmar [Fri, 29 Apr 2005 16:18:58 +0000 (16:18 +0000)]
[project @ 2005-04-29 16:18:58 by simonmar]
(from 1.4.6.1 on 6-4-branch)

Fix some incorrect use of int/nat that breaks x86_64

19 years ago[project @ 2005-04-29 13:09:27 by krasimir]
krasimir [Fri, 29 Apr 2005 13:09:28 +0000 (13:09 +0000)]
[project @ 2005-04-29 13:09:27 by krasimir]
Small fixes that adds chm and HxS targets to the build system. The former is used
to build all documentation in HtmlHelp format while the letter uses HtmlHelp2 format.

19 years ago[project @ 2005-04-29 11:24:56 by simonpj]
simonpj [Fri, 29 Apr 2005 11:24:56 +0000 (11:24 +0000)]
[project @ 2005-04-29 11:24:56 by simonpj]
Fix typo causing loop in SpecConstr!

19 years ago[project @ 2005-04-29 11:10:42 by simonpj]
simonpj [Fri, 29 Apr 2005 11:10:42 +0000 (11:10 +0000)]
[project @ 2005-04-29 11:10:42 by simonpj]
XML wibble

19 years ago[project @ 2005-04-29 11:08:51 by simonpj]
simonpj [Fri, 29 Apr 2005 11:08:51 +0000 (11:08 +0000)]
[project @ 2005-04-29 11:08:51 by simonpj]
Document improvements in overlap handling

19 years ago[project @ 2005-04-29 08:59:30 by simonmar]
simonmar [Fri, 29 Apr 2005 08:59:30 +0000 (08:59 +0000)]
[project @ 2005-04-29 08:59:30 by simonmar]
Re-instate support for environment variable expansion and the -D flag.
Now it is done pre-parsing, however.

19 years ago[project @ 2005-04-29 08:19:49 by simonpj]
simonpj [Fri, 29 Apr 2005 08:19:49 +0000 (08:19 +0000)]
[project @ 2005-04-29 08:19:49 by simonpj]
Strip wired-in names from interface files

19 years ago[project @ 2005-04-28 23:37:53 by simonpj]
simonpj [Thu, 28 Apr 2005 23:37:53 +0000 (23:37 +0000)]
[project @ 2005-04-28 23:37:53 by simonpj]
Further stage-2 wibbles

19 years ago[project @ 2005-04-28 23:11:45 by simonpj]
simonpj [Thu, 28 Apr 2005 23:11:45 +0000 (23:11 +0000)]
[project @ 2005-04-28 23:11:45 by simonpj]
Missing import

19 years ago[project @ 2005-04-28 23:09:24 by simonpj]
simonpj [Thu, 28 Apr 2005 23:09:24 +0000 (23:09 +0000)]
[project @ 2005-04-28 23:09:24 by simonpj]
A couple of hs-boot files

19 years ago[project @ 2005-04-28 23:00:52 by simonpj]
simonpj [Thu, 28 Apr 2005 23:00:52 +0000 (23:00 +0000)]
[project @ 2005-04-28 23:00:52 by simonpj]
Further wibbles to the new tidying plumbing

19 years ago[project @ 2005-04-28 21:31:45 by simonmar]
simonmar [Thu, 28 Apr 2005 21:31:45 +0000 (21:31 +0000)]
[project @ 2005-04-28 21:31:45 by simonmar]
StgFunInfoExtra_slow_apply(): convert the slow_apply_offset to a W_
before arithmetic.

19 years ago[project @ 2005-04-28 16:05:54 by simonpj]
simonpj [Thu, 28 Apr 2005 16:05:57 +0000 (16:05 +0000)]
[project @ 2005-04-28 16:05:54 by simonpj]
Re-plumb the connections between TidyPgm and the various
code generators.  There's a new type, CgGuts, to mediate this,
which has the happy effect that ModGuts can die earlier.

The non-O route still isn't quite right, because default methods
are being lost.  I'm working on it.

19 years ago[project @ 2005-04-28 15:44:16 by simonmar]
simonmar [Thu, 28 Apr 2005 15:44:16 +0000 (15:44 +0000)]
[project @ 2005-04-28 15:44:16 by simonmar]
calcAllocated: fix small mis-calculation in the SMP case

19 years ago[project @ 2005-04-28 15:28:05 by simonmar]
simonmar [Thu, 28 Apr 2005 15:28:09 +0000 (15:28 +0000)]
[project @ 2005-04-28 15:28:05 by simonmar]
Small code-size optimisation: I forgot to add a specialised case for
functions with no argument words (which might happen if the function
takes a void argument, for example).

19 years ago[project @ 2005-04-28 13:13:27 by simonpj]
simonpj [Thu, 28 Apr 2005 13:13:27 +0000 (13:13 +0000)]
[project @ 2005-04-28 13:13:27 by simonpj]
Instance for wired-in tycons wibble

19 years ago[project @ 2005-04-28 10:09:41 by simonpj]
simonpj [Thu, 28 Apr 2005 10:09:51 +0000 (10:09 +0000)]
[project @ 2005-04-28 10:09:41 by simonpj]
This big commit does several things at once (aeroplane hacking)
which change the format of interface files.

So you'll need to recompile your libraries!

1. The "stupid theta" of a newtype declaration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retain the "stupid theta" in a newtype declaration.
For some reason this was being discarded, and putting it
back in meant changing TyCon and IfaceSyn slightly.

2. Overlap flags travel with the instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Arrange that the ability to support overlap and incoherence
is a property of the *instance declaration* rather than the
module that imports the instance decl.  This allows a library
writer to define overlapping instance decls without the
library client having to know.

The implementation is that in an Instance we store the
overlap flag, and preseve that across interface files

3. Nuke the "instnce pool" and "rule pool"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A major tidy-up and simplification of the way that instances
and rules are sucked in from interface files.  Up till now
an instance decl has been held in a "pool" until its "gates"
(a set of Names) are in play, when the instance is typechecked
and added to the InstEnv in the ExternalPackageState.
This is complicated and error-prone; it's easy to suck in
too few (and miss an instance) or too many (and thereby be
forced to suck in its type constructors, etc).

Now, as we load an instance from an interface files, we
put it straight in the InstEnv... but the Instance we put in
the InstEnv has some Names (the "rough-match" names) that
can be used on lookup to say "this Instance can't match".
The detailed dfun is only read lazily, and the rough-match
thing meansn it is'nt poked on until it has a chance of
being needed.

This simply continues the successful idea for Ids, whereby
they are loaded straightaway into the TypeEnv, but their
TyThing is a lazy thunk, not poked on until the thing is looked
up.

Just the same idea applies to Rules.

On the way, I made CoreRule and Instance into full-blown records
with lots of info, with the same kind of key status as TyCon or
DataCon or Class.  And got rid of IdCoreRule altogether.
It's all much more solid and uniform, but it meant touching
a *lot* of modules.

4. Allow instance decls in hs-boot files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allowing instance decls in hs-boot files is jolly useful, becuase
in a big mutually-recursive bunch of data types, you want to give
the instances with the data type declarations.  To achieve this

* The hs-boot file makes a provisional name for the dict-fun, something
  like $fx9.

* When checking the "mother module", we check that the instance
  declarations line up (by type) and generate bindings for the
  boot dfuns, such as
$fx9 = $f2
  where $f2 is the dfun generated by the mother module

* In doing this I decided that it's cleaner to have DFunIds get their
  final External Name at birth.  To do that they need a stable OccName,
  so I have an integer-valued dfun-name-supply in the TcM monad.
  That keeps it simple.

This feature is hardly tested yet.

5. Tidy up tidying, and Iface file generation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main/TidyPgm now has two entry points:

  simpleTidyPgm is for hi-boot files, when typechecking only
  (not yet implemented), and potentially when compiling without -O.
  It ignores the bindings, and generates a nice small TypeEnv.

  optTidyPgm is the normal case: compiling with -O.  It generates a
  TypeEnv rich in IdInfo

MkIface.mkIface now only generates a ModIface.  A separate
procedure, MkIface.writeIfaceFile, writes the file out to disk.

19 years ago[project @ 2005-04-28 09:46:25 by simonmar]
simonmar [Thu, 28 Apr 2005 09:46:25 +0000 (09:46 +0000)]
[project @ 2005-04-28 09:46:25 by simonmar]
Run each nofib program multiple times, tunable by the $(NoFibRuns)
variable.  nofib-analyse already knows how to average the times from
multiple runs.

19 years ago[project @ 2005-04-27 17:13:13 by sof]
sof [Wed, 27 Apr 2005 17:13:13 +0000 (17:13 +0000)]
[project @ 2005-04-27 17:13:13 by sof]
comment wibble; switch from Italian to English spelling of 'compatible'

19 years ago[project @ 2005-04-27 14:37:26 by simonmar]
simonmar [Wed, 27 Apr 2005 14:37:26 +0000 (14:37 +0000)]
[project @ 2005-04-27 14:37:26 by simonmar]
When using -H<size> in SMP mode, divide the total nursery size amongst
the various nurseries.  -H<size> now does something reasonable with
SMP.

19 years ago[project @ 2005-04-27 14:25:17 by simonmar]
simonmar [Wed, 27 Apr 2005 14:25:18 +0000 (14:25 +0000)]
[project @ 2005-04-27 14:25:17 by simonmar]
Hold the sm_mutex around access to the mutable list.

The SMP RTS now seems quite stable, I've run my simple test program
with 64 threads without crashes.

19 years ago[project @ 2005-04-27 14:09:43 by simonmar]
simonmar [Wed, 27 Apr 2005 14:09:43 +0000 (14:09 +0000)]
[project @ 2005-04-27 14:09:43 by simonmar]
fprintf(stderr,..) --> debugBelch(...)

19 years ago[project @ 2005-04-27 12:54:45 by simonmar]
simonmar [Wed, 27 Apr 2005 12:54:45 +0000 (12:54 +0000)]
[project @ 2005-04-27 12:54:45 by simonmar]
Some extra sanity checking

19 years ago[project @ 2005-04-27 12:53:35 by simonmar]
simonmar [Wed, 27 Apr 2005 12:53:35 +0000 (12:53 +0000)]
[project @ 2005-04-27 12:53:35 by simonmar]
initCapability: initialise the rInHaskell field (found by Valgrind)

19 years ago[project @ 2005-04-27 12:52:52 by simonmar]
simonmar [Wed, 27 Apr 2005 12:52:52 +0000 (12:52 +0000)]
[project @ 2005-04-27 12:52:52 by simonmar]
expandTaskTable: we need to update the hash table too
  (found by: Valgrind :-)

initTaskManager: take into account -N flag when sizing the initial
task table.

19 years ago[project @ 2005-04-27 11:31:22 by simonmar]
simonmar [Wed, 27 Apr 2005 11:31:22 +0000 (11:31 +0000)]
[project @ 2005-04-27 11:31:22 by simonmar]
i386 wibble

19 years ago[project @ 2005-04-27 11:15:15 by simonmar]
simonmar [Wed, 27 Apr 2005 11:15:16 +0000 (11:15 +0000)]
[project @ 2005-04-27 11:15:15 by simonmar]
Support for returning the renamed syntax from checkModule (untested).

19 years ago[project @ 2005-04-27 09:57:14 by simonmar]
simonmar [Wed, 27 Apr 2005 09:57:14 +0000 (09:57 +0000)]
[project @ 2005-04-27 09:57:14 by simonmar]
x86_64: hang register parameters off the call instruction, like
powerpc does.  This gives the register allocator better information.

19 years ago[project @ 2005-04-27 09:55:50 by simonmar]
simonmar [Wed, 27 Apr 2005 09:55:50 +0000 (09:55 +0000)]
[project @ 2005-04-27 09:55:50 by simonmar]
showReg(x86_64): fix
callerSaves: fix

19 years ago[project @ 2005-04-27 09:54:26 by simonmar]
simonmar [Wed, 27 Apr 2005 09:54:26 +0000 (09:54 +0000)]
[project @ 2005-04-27 09:54:26 by simonmar]
Fix the volatile regs to the suspendThread call

19 years ago[project @ 2005-04-27 09:48:34 by simonmar]
simonmar [Wed, 27 Apr 2005 09:48:34 +0000 (09:48 +0000)]
[project @ 2005-04-27 09:48:34 by simonmar]
Remove uses of stderr from .cmm code.

We can't reliably refer to stdin/stdout/stderr from .cmm, because the
C standard doesn't specify whether stderr is a variable or a macro.

19 years ago[project @ 2005-04-27 09:39:27 by simonmar]
simonmar [Wed, 27 Apr 2005 09:39:27 +0000 (09:39 +0000)]
[project @ 2005-04-27 09:39:27 by simonmar]
Add comment

19 years ago[project @ 2005-04-27 08:25:46 by simonmar]
simonmar [Wed, 27 Apr 2005 08:25:46 +0000 (08:25 +0000)]
[project @ 2005-04-27 08:25:46 by simonmar]
newTempName: instead of bumping the processId until we find a name
that isn't used, add an integer suffix to the processId.  This should
prevent temp-file conflicts that appear to have been affecting our
nightly builds and occasionally make -j.

The right way to allocate a temporary file is to create it straight
away, but I'm not sure of the implications of passing existing
temporary files to the various sub-processes that GHC executes, hence
this fix instead.

19 years ago[project @ 2005-04-26 15:44:48 by simonmar]
simonmar [Tue, 26 Apr 2005 15:44:48 +0000 (15:44 +0000)]
[project @ 2005-04-26 15:44:48 by simonmar]
resetStaticObjectForRetainerProfiling: catch up changes in ClosureMacros.h

19 years ago[project @ 2005-04-26 15:08:16 by simonmar]
simonmar [Tue, 26 Apr 2005 15:08:16 +0000 (15:08 +0000)]
[project @ 2005-04-26 15:08:16 by simonmar]
When chasing explicit imports, we now look for the module in both the
home package and external packages, and complain if it is found in
both:

Chasing modules from: Overlap
Cannot import `List':
  it was found in both overlap/List.hs and package haskell98-1.0.
  Possible fix: -ignore-package haskell98-1.0
  (imported from overlap/Overlap.hs)

Previously the home module would have been ignored in favour of the
package module.  It means we're doing a bit more searching, but the
behaviour is less obscure.

19 years ago[project @ 2005-04-26 14:43:31 by simonmar]
simonmar [Tue, 26 Apr 2005 14:43:31 +0000 (14:43 +0000)]
[project @ 2005-04-26 14:43:31 by simonmar]
Back out previous revision.

It appears that passing -g to the assembly phase of C compilation
results in an object file with broken debug info, that gdb can't
read.  This is probably a bug in gcc and/or binutils, but this change
means that I can't avoid it (unless we were to hack the pipeline to
do .c->.s->.o in one stage instead of two).

19 years ago[project @ 2005-04-26 12:00:48 by simonmar]
simonmar [Tue, 26 Apr 2005 12:00:48 +0000 (12:00 +0000)]
[project @ 2005-04-26 12:00:48 by simonmar]
Add entry about non-blocking stdin and System.Cmd.{system,rawSystem}.

19 years ago[project @ 2005-04-26 00:08:17 by sof]
sof [Tue, 26 Apr 2005 00:08:17 +0000 (00:08 +0000)]
[project @ 2005-04-26 00:08:17 by sof]
runSomething: 'rawSystem' might raise an exception to indicate that
'pgm' couldn't be executed, so catch this here & report.

Merge to STABLE.

19 years ago[project @ 2005-04-25 15:56:19 by simonmar]
simonmar [Mon, 25 Apr 2005 15:56:19 +0000 (15:56 +0000)]
[project @ 2005-04-25 15:56:19 by simonmar]
scavenge_one: fix reversed PAP/AP cases

19 years ago[project @ 2005-04-25 15:36:28 by simonmar]
simonmar [Mon, 25 Apr 2005 15:36:29 +0000 (15:36 +0000)]
[project @ 2005-04-25 15:36:28 by simonmar]
Partial support for deadlock detection in the threaded/SMP RTS.

The idea is to wait until a complete time slice has gone by without
running any Haskell code, and then try doing a GC to detect deadlocked
threads.

This kind of works: but we can only wake up a worker thread from the
signal handler if there's another worker running - we can't wake up the
current thread, it seems.

19 years ago[project @ 2005-04-25 14:22:29 by simonmar]
simonmar [Mon, 25 Apr 2005 14:22:29 +0000 (14:22 +0000)]
[project @ 2005-04-25 14:22:29 by simonmar]
interruptStgRts: call threadRunnable().  This might not work properly
from a signal handler, but it's all we can do (and seems to do
something reasonable on Linux).

19 years ago[project @ 2005-04-25 14:13:23 by simonmar]
simonmar [Mon, 25 Apr 2005 14:13:23 +0000 (14:13 +0000)]
[project @ 2005-04-25 14:13:23 by simonmar]
atomicModifyMutVarzh_fast: move the sm_mutex acquisition *after* the
heap check

19 years ago[project @ 2005-04-25 13:45:40 by simonmar]
simonmar [Mon, 25 Apr 2005 13:45:40 +0000 (13:45 +0000)]
[project @ 2005-04-25 13:45:40 by simonmar]
Yet another StgClosure that should be StgThunk

19 years ago[project @ 2005-04-25 13:17:59 by simonmar]
simonmar [Mon, 25 Apr 2005 13:17:59 +0000 (13:17 +0000)]
[project @ 2005-04-25 13:17:59 by simonmar]
stg_raise: we should by using StgThunk_payload(), not StgClosure_payload()

19 years ago[project @ 2005-04-25 13:02:31 by simonmar]
simonmar [Mon, 25 Apr 2005 13:02:31 +0000 (13:02 +0000)]
[project @ 2005-04-25 13:02:31 by simonmar]
Requested by Duncan Coutts: -optc flags get passed to the assembler
phase too.  It's not obvious, when using GHC to compile a .c file,
that options need to be passed both with -optc and -opta - gcc doesn't
need this, for example.

This is an experimental change - if it breaks anything we can back it
out.  If anyone needs to pass flags to the .c->.s phase *only*, then
we will need to add another flag for that purpose.  It seems unlikely,
though (there aren't many flags that affect the assembler only, and
those that do don't conflict with flags for the C phase).

19 years ago[project @ 2005-04-25 09:32:23 by simonmar]
simonmar [Mon, 25 Apr 2005 09:32:23 +0000 (09:32 +0000)]
[project @ 2005-04-25 09:32:23 by simonmar]
daVinci is now called uDraw(Graph)

19 years ago[project @ 2005-04-24 21:50:26 by simonmar]
simonmar [Sun, 24 Apr 2005 21:50:26 +0000 (21:50 +0000)]
[project @ 2005-04-24 21:50:26 by simonmar]
Fix bogus uses of C variable stable_ptr_table exposed by recent fix to
C backend.

19 years ago[project @ 2005-04-24 20:19:30 by panne]
panne [Sun, 24 Apr 2005 20:19:30 +0000 (20:19 +0000)]
[project @ 2005-04-24 20:19:30 by panne]
Warning police (unused parameter)

19 years ago[project @ 2005-04-24 20:17:28 by panne]
panne [Sun, 24 Apr 2005 20:17:28 +0000 (20:17 +0000)]
[project @ 2005-04-24 20:17:28 by panne]
Nuked dead code

19 years ago[project @ 2005-04-24 20:10:55 by panne]
panne [Sun, 24 Apr 2005 20:10:55 +0000 (20:10 +0000)]
[project @ 2005-04-24 20:10:55 by panne]
No -optc prefix fot GhcRtsCcOpts needed

19 years ago[project @ 2005-04-23 22:02:31 by simonmar]
simonmar [Sat, 23 Apr 2005 22:02:31 +0000 (22:02 +0000)]
[project @ 2005-04-23 22:02:31 by simonmar]
Fix comment

19 years ago[project @ 2005-04-23 09:56:06 by panne]
panne [Sat, 23 Apr 2005 09:56:06 +0000 (09:56 +0000)]
[project @ 2005-04-23 09:56:06 by panne]
ATTENTION: Make it compile again, but only via a wild and probably
wrong guess which might break GHCi. SimonM, please have a look at
this. (Who broke it should fix it! :-)

19 years ago[project @ 2005-04-23 03:10:18 by sof]
sof [Sat, 23 Apr 2005 03:10:18 +0000 (03:10 +0000)]
[project @ 2005-04-23 03:10:18 by sof]
tweak to handle ghc-6.1 compilation. Merge to STABLE

19 years ago[project @ 2005-04-23 03:07:23 by sof]
sof [Sat, 23 Apr 2005 03:07:23 +0000 (03:07 +0000)]
[project @ 2005-04-23 03:07:23 by sof]
added ghc_ge_602. Merge to STABLE

19 years ago[project @ 2005-04-22 22:00:00 by simonmar]
simonmar [Fri, 22 Apr 2005 22:00:00 +0000 (22:00 +0000)]
[project @ 2005-04-22 22:00:00 by simonmar]
Don't split in here

19 years ago[project @ 2005-04-22 21:57:42 by simonmar]
simonmar [Fri, 22 Apr 2005 21:57:42 +0000 (21:57 +0000)]
[project @ 2005-04-22 21:57:42 by simonmar]
Fix a comment

19 years ago[project @ 2005-04-22 21:54:37 by simonmar]
simonmar [Fri, 22 Apr 2005 21:56:48 +0000 (21:56 +0000)]
[project @ 2005-04-22 21:54:37 by simonmar]
enable splitting on x86_64

19 years ago[project @ 2005-04-22 21:54:08 by simonmar]
simonmar [Fri, 22 Apr 2005 21:54:08 +0000 (21:54 +0000)]
[project @ 2005-04-22 21:54:08 by simonmar]
splitting support on x86_64

19 years ago[project @ 2005-04-22 21:16:27 by simonmar]
simonmar [Fri, 22 Apr 2005 21:16:27 +0000 (21:16 +0000)]
[project @ 2005-04-22 21:16:27 by simonmar]
fix uses of stderr

19 years ago[project @ 2005-04-22 17:50:13 by sof]
sof [Fri, 22 Apr 2005 17:50:13 +0000 (17:50 +0000)]
[project @ 2005-04-22 17:50:13 by sof]
Switch to a manual-reset event for the completed-console-event object;
with auto-reset, we ran the risk of leaving it in a signalled state.

Merge to STABLE.

19 years ago[project @ 2005-04-22 17:15:51 by sof]
sof [Fri, 22 Apr 2005 17:15:51 +0000 (17:15 +0000)]
[project @ 2005-04-22 17:15:51 by sof]
Switch away from using _spawnv() to CreateProcess(); the former has the
annoying 'feature' that it quits upon Ctrl-C, leaving its child in the
background. Use CreateProcess() instead and avoid the Ctrl-C issue by
having the wrapper let go of its console before waiting for the sub-process
running GHCi to exit.

This still doesn't fix the issue of Ctrl-C handling when the 'ghci' wrapper
is invoked from a cygwin-based bash. cmd.exe users will hopefully see
an improvement in behaviour though.

Merge to STABLE.

19 years ago[project @ 2005-04-22 17:00:48 by sof]
sof [Fri, 22 Apr 2005 17:00:49 +0000 (17:00 +0000)]
[project @ 2005-04-22 17:00:48 by sof]
[mingw only]
Better handling of I/O request abortions upon throwing an exception
to a Haskell thread. As was, a thread blocked on an I/O request was
simply unblocked, but its corresponding worker thread wasn't notified
that the request had been abandoned.

This manifested itself in GHCi upon Ctrl-C being hit at the prompt -- the
worker thread blocked waiting for input on stdin prior to Ctrl-C would
stick around even though its corresponding Haskell thread had been
thrown an Interrupted exception. The upshot was that the worker would
consume the next character typed in after Ctrl-C, but then just dropping
it. Dealing with this turned out to be even more interesting due to
Win32 aborting any console reads when Ctrl-C/Break events are delivered.

The story could be improved upon (at the cost of portability) by making
the Scheduler able to abort worker thread system calls; as is, requests
are cooperatively abandoned. Maybe later.

Also included are other minor tidyups to Ctrl-C handling under mingw.

Merge to STABLE.

19 years ago[project @ 2005-04-22 16:53:48 by sof]
sof [Fri, 22 Apr 2005 16:53:48 +0000 (16:53 +0000)]
[project @ 2005-04-22 16:53:48 by sof]
oops;supposed to have been included with revert-back-to-__stginit-for-mingw commit

19 years ago[project @ 2005-04-22 16:49:38 by sof]
sof [Fri, 22 Apr 2005 16:49:38 +0000 (16:49 +0000)]
[project @ 2005-04-22 16:49:38 by sof]
resetStaticObjectForRetainerProfiling(): warning wibble

19 years ago[project @ 2005-04-22 16:01:53 by sof]
sof [Fri, 22 Apr 2005 16:01:54 +0000 (16:01 +0000)]
[project @ 2005-04-22 16:01:53 by sof]
Until the GHCi linker is made capable of handling .ctors sections in
PEi object files, stick with __stginits. Being a bit sloppy by
using 'mingw32_HOST_OS' to test for this.

19 years ago[project @ 2005-04-22 14:19:07 by simonmar]
simonmar [Fri, 22 Apr 2005 14:19:07 +0000 (14:19 +0000)]
[project @ 2005-04-22 14:19:07 by simonmar]
Fix creation of raise_info closures: they're THUNKs

19 years ago[project @ 2005-04-22 14:18:29 by simonmar]
simonmar [Fri, 22 Apr 2005 14:18:29 +0000 (14:18 +0000)]
[project @ 2005-04-22 14:18:29 by simonmar]
evacuate(): fix THUNK case

19 years ago[project @ 2005-04-22 13:12:41 by simonmar]
simonmar [Fri, 22 Apr 2005 13:12:41 +0000 (13:12 +0000)]
[project @ 2005-04-22 13:12:41 by simonmar]
checkSanity: fix bug in nursery checking

19 years ago[project @ 2005-04-22 13:05:51 by simonmar]
simonmar [Fri, 22 Apr 2005 13:05:51 +0000 (13:05 +0000)]
[project @ 2005-04-22 13:05:51 by simonmar]
SAVE_EVERYTHING: for some reason we used R10.w rather than R10 in this
macro, which just broke with the change to the C backend.

19 years ago[project @ 2005-04-22 12:28:00 by simonmar]
simonmar [Fri, 22 Apr 2005 12:28:01 +0000 (12:28 +0000)]
[project @ 2005-04-22 12:28:00 by simonmar]
- Now that labels are always prefixed with '&' in .hc code, we have to
  fix some sloppiness in the RTS .cmm code.  Fortunately it's not too
  painful.

- SMP: acquire/release the storage manager lock around
  atomicModifyMutVar#.  This is a hack: atomicModifyMutVar# isn't
  atomic under SMP otherwise, but the SM lock is a large sledgehammer.
  I think I'll apply the sledgehammer to the MVar primitives too, for
  the time being.

19 years ago[project @ 2005-04-22 11:20:22 by simonmar]
simonmar [Fri, 22 Apr 2005 11:20:22 +0000 (11:20 +0000)]
[project @ 2005-04-22 11:20:22 by simonmar]
rtsSupportsBoundThreads, isThreadBound: these should return rtsTrue
for SMP too.

19 years ago[project @ 2005-04-22 10:21:10 by simonmar]
simonmar [Fri, 22 Apr 2005 10:21:10 +0000 (10:21 +0000)]
[project @ 2005-04-22 10:21:10 by simonmar]
pprLit: when printing a CLabel, prefix it with '&'.  This ensures we
get the address rather than the value, in the case when the C label
refers to a variable (as might be the case if it is from a foreign
import, for example).

19 years ago[project @ 2005-04-22 10:01:20 by simonmar]
simonmar [Fri, 22 Apr 2005 10:01:20 +0000 (10:01 +0000)]
[project @ 2005-04-22 10:01:20 by simonmar]
Remove bogus cut-n-pasted comment

19 years ago[project @ 2005-04-22 09:32:39 by simonmar]
simonmar [Fri, 22 Apr 2005 09:32:40 +0000 (09:32 +0000)]
[project @ 2005-04-22 09:32:39 by simonmar]
SMP: the rest of the changes to support safe thunk entry & updates.  I
thought the compiler changes were independent, but I ended up breaking
the HEAD, so I'll have to commit the rest.  non-SMP compilation should
not be affected.

19 years ago[project @ 2005-04-22 08:58:36 by simonmar]
simonmar [Fri, 22 Apr 2005 08:58:36 +0000 (08:58 +0000)]
[project @ 2005-04-22 08:58:36 by simonmar]
Add a comment about possible improvement to the THUNK_SELECTOR
algorithm, from discussion with Ian Lynagh

19 years ago[project @ 2005-04-22 08:41:00 by simonmar]
simonmar [Fri, 22 Apr 2005 08:41:00 +0000 (08:41 +0000)]
[project @ 2005-04-22 08:41:00 by simonmar]
Various fixes to ghcprof, from Christian Maeder <maeder@tzi.de>.  Thanks!

19 years ago[project @ 2005-04-22 02:10:10 by simonpj]
simonpj [Fri, 22 Apr 2005 02:10:10 +0000 (02:10 +0000)]
[project @ 2005-04-22 02:10:10 by simonpj]
Fix hi-boot interface-finding code

19 years ago[project @ 2005-04-21 15:28:20 by simonmar]
simonmar [Thu, 21 Apr 2005 15:28:20 +0000 (15:28 +0000)]
[project @ 2005-04-21 15:28:20 by simonmar]
SMP: thunks get an extra header word so that the payload doesn't
occupy the same space as the updated value.  This is the sum total of
the changes to compiler/, which are pleasingly few.

19 years ago[project @ 2005-04-21 10:06:17 by simonmar]
simonmar [Thu, 21 Apr 2005 10:06:17 +0000 (10:06 +0000)]
[project @ 2005-04-21 10:06:17 by simonmar]
Allow args to be passed to GHC from runghc

  syntax: runghc [-f GHCPATH] [GHC-ARGS] FILE ARG...

19 years ago[project @ 2005-04-21 09:25:40 by simonmar]
simonmar [Thu, 21 Apr 2005 09:25:40 +0000 (09:25 +0000)]
[project @ 2005-04-21 09:25:40 by simonmar]
ghcprof is a perl script, not a binary

19 years ago[project @ 2005-04-20 13:58:00 by simonmar]
simonmar [Wed, 20 Apr 2005 13:58:00 +0000 (13:58 +0000)]
[project @ 2005-04-20 13:58:00 by simonmar]
Remove bogus code: the mutable list does not need to be rebuilt during
compaction.  It just needs to be updated, which is already happening.

(fixes crashes in compacting collection; I think a different fix is
required for STABLE, though)

19 years ago[project @ 2005-04-20 13:56:43 by simonmar]
simonmar [Wed, 20 Apr 2005 13:56:43 +0000 (13:56 +0000)]
[project @ 2005-04-20 13:56:43 by simonmar]
Update to match ClosureTypes.h

19 years ago[project @ 2005-04-20 13:56:18 by simonmar]
simonmar [Wed, 20 Apr 2005 13:56:18 +0000 (13:56 +0000)]
[project @ 2005-04-20 13:56:18 by simonmar]
remove gaps in the closure type sequence, and add a big warning comment

19 years ago[project @ 2005-04-20 13:50:04 by krasimir]
krasimir [Wed, 20 Apr 2005 13:50:04 +0000 (13:50 +0000)]
[project @ 2005-04-20 13:50:04 by krasimir]
modInfoExports, TypecheckedSource and ParsedSource are exported.
Added modInfoPrintUnqualified function.

19 years ago[project @ 2005-04-19 15:28:35 by simonmar]
simonmar [Tue, 19 Apr 2005 15:28:35 +0000 (15:28 +0000)]
[project @ 2005-04-19 15:28:35 by simonmar]
- DriverPipeline.compile: report errors in GHC_OPTIONS pragmas using the
  Message callback, and give them a proper line number.

- GHC.checkModule: read the GHC_OPTIONS pragma, and report errors
  appropriately.

19 years ago[project @ 2005-04-19 14:24:55 by simonmar]
simonmar [Tue, 19 Apr 2005 14:24:55 +0000 (14:24 +0000)]
[project @ 2005-04-19 14:24:55 by simonmar]
main_thread double-linkage bug

19 years ago[project @ 2005-04-19 13:39:41 by simonmar]
simonmar [Tue, 19 Apr 2005 13:39:41 +0000 (13:39 +0000)]
[project @ 2005-04-19 13:39:41 by simonmar]
In the event of a complete deadlock, we should handle the case when
the main thread is BlockedOnSTM (bug #1183455, the strange error
message only occurs on Windows because on Unix we end up waiting for
^C instead of deadlocking).

19 years ago[project @ 2005-04-19 13:19:37 by simonmar]
simonmar [Tue, 19 Apr 2005 13:19:37 +0000 (13:19 +0000)]
[project @ 2005-04-19 13:19:37 by simonmar]
Turn off splitting on x86_64

19 years ago[project @ 2005-04-19 12:50:52 by simonmar]
simonmar [Tue, 19 Apr 2005 12:50:52 +0000 (12:50 +0000)]
[project @ 2005-04-19 12:50:52 by simonmar]
Pass -ignore-dot-ghci to GHC

19 years ago[project @ 2005-04-19 12:29:56 by simonmar]
simonmar [Tue, 19 Apr 2005 12:29:56 +0000 (12:29 +0000)]
[project @ 2005-04-19 12:29:56 by simonmar]
Now build.mk.sample does *nothing* by default

19 years ago[project @ 2005-04-17 11:13:30 by panne]
panne [Sun, 17 Apr 2005 11:13:30 +0000 (11:13 +0000)]
[project @ 2005-04-17 11:13:30 by panne]
Haddock can't handle recursive modules currently, so we disable it for now.

19 years ago[project @ 2005-04-17 11:11:32 by panne]
panne [Sun, 17 Apr 2005 11:11:33 +0000 (11:11 +0000)]
[project @ 2005-04-17 11:11:32 by panne]
Haddock fixes, "-- *" should be used with care...

19 years ago[project @ 2005-04-16 22:47:23 by simonpj]
simonpj [Sat, 16 Apr 2005 22:47:25 +0000 (22:47 +0000)]
[project @ 2005-04-16 22:47:23 by simonpj]
Significant clean-up of the handling of hi-boot files.
Previously, when compling A.hs, we loaded A.hi-boot, and
it went into the External Package Table.  It was strange
but it worked.  This tidy up stops it going anywhere;
it's just read in, and typechecked into a ModDetails.

All this was on the way to improving the handling of
instances in hs-boot files, something Chris Ryder wanted.
I think they work quite sensibly now.

If I've got all this right (have not had a chance to
fully test it) we can merge it into STABLE.

19 years ago[project @ 2005-04-16 22:46:01 by simonpj]
simonpj [Sat, 16 Apr 2005 22:46:01 +0000 (22:46 +0000)]
[project @ 2005-04-16 22:46:01 by simonpj]
Improve kind error msg; may make some tests change their output

19 years ago[project @ 2005-04-16 22:45:17 by simonpj]
simonpj [Sat, 16 Apr 2005 22:45:17 +0000 (22:45 +0000)]
[project @ 2005-04-16 22:45:17 by simonpj]
Improve location info for kind errors; may make some tests change their output

19 years ago[project @ 2005-04-16 19:39:25 by panne]
panne [Sat, 16 Apr 2005 19:39:25 +0000 (19:39 +0000)]
[project @ 2005-04-16 19:39:25 by panne]
And yesterday's "I messed up DocBook XML, too!" award goes to...

   *drum roll*

   ... Simon Peyton-Jones!

Congratulations! :-)