ghc-hetmet.git
15 years agoMerging in the new codegen branch
dias@eecs.harvard.edu [Thu, 14 Aug 2008 12:40:27 +0000 (12:40 +0000)]
Merging in the new codegen branch
This merge does not turn on the new codegen (which only compiles
a select few programs at this point),
but it does introduce some changes to the old code generator.

The high bits:
1. The Rep Swamp patch is finally here.
   The highlight is that the representation of types at the
   machine level has changed.
   Consequently, this patch contains updates across several back ends.
2. The new Stg -> Cmm path is here, although it appears to have a
   fair number of bugs lurking.
3. Many improvements along the CmmCPSZ path, including:
   o stack layout
   o some code for infotables, half of which is right and half wrong
   o proc-point splitting

15 years agoMajor clean-up of HscMain.
Thomas Schilling [Tue, 25 Nov 2008 15:32:01 +0000 (15:32 +0000)]
Major clean-up of HscMain.

This patch entails a major restructuring of HscMain and a small bugfix
to MkIface (which required the restructuring in HscMain).

In MkIface:

  - mkIface* no longer outputs orphan warnings directly and also no
    longer quits GHC when -Werror is set.  Instead, errors are
    reported using the common IO (Messages, Maybe result) scheme.

In HscMain:

  - Get rid of the 'Comp' monad.  This monad was mostly GhcMonad + two
    reader arguments, a ModSummary for the currently compiled module
    and a possible old interface.  The latter actually lead to a small
    space-leak since only its hash was needed (to check whether the
    newly-generated interface file was the same as the original one).

    Functions originally of type 'Comp' now only take the arguments
    that they actually need.  This leads to slighly longer argument
    lists in some places, however, it is now much easier to see what
    is actually going on.

  - Get rid of 'myParseModule'.  Rename 'parseFile' to 'hscParse'.

  - Join 'deSugarModule' and 'hscDesugar' (keeping the latter).

  - Rename 'typecheck{Rename}Module{'}' to 'hscTypecheck{Rename}'.
    One variant keeps the renamed syntax, the other doesn't.

  - Parameterise 'HscStatus', so that 'InteractiveStatus' is just a
    different parameterisation of 'HscStatus'.

  - 'hscCompile{OneShot,Batch,Nothing,Interactive}' are now
    implemented using a (local) typeclass called 'HsCompiler'.  The
    idea is to make the common structure more obvious.  Using this
    typeclass we now have two functions 'genericHscCompile' (original
    'hscCompiler') and 'genericHscRecompile' (original 'genComp')
    describing the default pipeline.  The methods of the typeclass
    describe a sort of "hook" interface (in OO-terms this would be
    called the "template method" pattern).

    One problem with this approach is that we parameterise over the
    /result/ type which, in fact, is not actually different for
    "nothing" and "batch" mode.  To avoid functional dependencies or
    associated types, we use type tags to make them artificially
    different and parameterise the type class over the result type.
    A perhaps better approach might be to use records instead.

  - Drop some redundant 'HscEnv' arguments.  These were likely
    different from what 'getSession' would return because during
    compilation we temporarily set the module's DynFlags as well as a
    few other fields.  We now use the 'withTempSession' combinator to
    temporarily change the 'HscEnv' and automatically restore the
    original session after the enclosed action has returned (even in
    case of exceptions).

  - Rename 'hscCompile' to 'hscGenHardCode' (since that is what it
    does).

Calls in 'GHC' and 'DriverPipeline' accordingly needed small
adaptions.

15 years agoFix Trac #2799: TcType.isOverloadedTy
simonpj@microsoft.com [Tue, 25 Nov 2008 11:05:40 +0000 (11:05 +0000)]
Fix Trac #2799: TcType.isOverloadedTy

A missing case (for equality predicates) in isOverloadedTy make
bindInstsOfLocalFuns/Pats do the wrong thing.  Core Lint nailed it.

Merge to 6.10 branch.

15 years agoFix #2740: we were missing the free variables on some expressions
Simon Marlow [Tue, 25 Nov 2008 10:31:13 +0000 (10:31 +0000)]
Fix #2740: we were missing the free variables on some expressions
Particularly boolean expresions: the conditional of an 'if', and
guards, were missing their free variables.

15 years agoFix symbol macro names in Linker.c
Thorkil Naur [Fri, 21 Nov 2008 16:01:49 +0000 (16:01 +0000)]
Fix symbol macro names in Linker.c

15 years agoAdd a --machine-readable RTS flag
Ian Lynagh [Sun, 23 Nov 2008 15:21:27 +0000 (15:21 +0000)]
Add a --machine-readable RTS flag
Currently it only affects the -t flag output

15 years agoReturn errors instead of dying in myParseModule.
Thomas Schilling [Sat, 22 Nov 2008 15:41:51 +0000 (15:41 +0000)]
Return errors instead of dying in myParseModule.

15 years agoComments/Haddockification only.
Thomas Schilling [Sat, 22 Nov 2008 14:30:18 +0000 (14:30 +0000)]
Comments/Haddockification only.

15 years agoReport source span instead of just source location for unused names.
Thomas Schilling [Sat, 22 Nov 2008 14:26:41 +0000 (14:26 +0000)]
Report source span instead of just source location for unused names.

15 years agoChange 'handleFlagWarnings' to throw exceptions instead of dying.
Thomas Schilling [Sat, 22 Nov 2008 13:06:58 +0000 (13:06 +0000)]
Change 'handleFlagWarnings' to throw exceptions instead of dying.

It now uses the standard warning log and error reporting mechanism.

15 years agoDocument exported functions in main/HeaderInfo.
Thomas Schilling [Fri, 21 Nov 2008 14:53:07 +0000 (14:53 +0000)]
Document exported functions in main/HeaderInfo.

15 years agoRemove warning supression klugde in main/HeaderInfo
Thomas Schilling [Fri, 21 Nov 2008 14:41:55 +0000 (14:41 +0000)]
Remove warning supression klugde in main/HeaderInfo

15 years agoUse mutator threads to do GC, instead of having a separate pool of GC threads
Simon Marlow [Fri, 21 Nov 2008 15:12:33 +0000 (15:12 +0000)]
Use mutator threads to do GC, instead of having a separate pool of GC threads

Previously, the GC had its own pool of threads to use as workers when
doing parallel GC.  There was a "leader", which was the mutator thread
that initiated the GC, and the other threads were taken from the pool.

This was simple and worked fine for sequential programs, where we did
most of the benchmarking for the parallel GC, but falls down for
parallel programs.  When we have N mutator threads and N cores, at GC
time we would have to stop N-1 mutator threads and start up N-1 GC
threads, and hope that the OS schedules them all onto separate cores.
It practice it doesn't, as you might expect.

Now we use the mutator threads to do GC.  This works quite nicely,
particularly for parallel programs, where each mutator thread scans
its own spark pool, which is probably in its cache anyway.

There are some flag changes:

  -g<n> is removed (-g1 is still accepted for backwards compat).
  There's no way to have a different number of GC threads than mutator
  threads now.

  -q1       Use one OS thread for GC (turns off parallel GC)
  -qg<n>    Use parallel GC for generations >= <n> (default: 1)

Using parallel GC only for generations >=1 works well for sequential
programs.  Compiling an ordinary sequential program with -threaded and
running it with -N2 or more should help if you do a lot of GC.  I've
found that adding -qg0 (do parallel GC for generation 0 too) speeds up
some parallel programs, but slows down some sequential programs.
Being conservative, I left the threshold at 1.

ToDo: document the new options.

15 years agowe shouldn't update topBound in discardSparks()
Simon Marlow [Fri, 21 Nov 2008 11:35:39 +0000 (11:35 +0000)]
we shouldn't update topBound in discardSparks()

15 years agoThrow SourceErrors instead of ProgramErrors in main/HeaderInfo.
Thomas Schilling [Fri, 21 Nov 2008 14:13:39 +0000 (14:13 +0000)]
Throw SourceErrors instead of ProgramErrors in main/HeaderInfo.

Parse errors during dependency analysis or options parsing really
shouldn't kill GHC; this is particularly annoying for GHC API clients.

15 years agofix the build when !USE_MMAP
Simon Marlow [Fri, 21 Nov 2008 08:54:18 +0000 (08:54 +0000)]
fix the build when !USE_MMAP

15 years agoround the size up to a page in mmapForLinker() instead of in the caller
Simon Marlow [Thu, 20 Nov 2008 15:40:14 +0000 (15:40 +0000)]
round the size up to a page in mmapForLinker() instead of in the caller

15 years agoFix a race in the deadlock-detection code
Simon Marlow [Thu, 20 Nov 2008 11:24:38 +0000 (11:24 +0000)]
Fix a race in the deadlock-detection code
After a deadlock it was possible for the timer signal to remain off,
which meant that the next deadlock would not be detected, and the
system would hang.  Spotted by conc047(threaded2).

15 years agoerror message wibble
Simon Marlow [Thu, 20 Nov 2008 08:49:01 +0000 (08:49 +0000)]
error message wibble

15 years agoFix flag name -XDisambiguateRecordFields
simonpj@microsoft.com [Thu, 20 Nov 2008 12:32:05 +0000 (12:32 +0000)]
Fix flag name -XDisambiguateRecordFields

15 years agoFix regTableToCapability() if gcc introduces padding
Simon Marlow [Wed, 19 Nov 2008 16:29:10 +0000 (16:29 +0000)]
Fix regTableToCapability() if gcc introduces padding
Also avoid padding if possible using __attribute__((packed))
Fixes the Windows build

15 years agoFix 32-bit breakage
Simon Marlow [Wed, 19 Nov 2008 14:54:29 +0000 (14:54 +0000)]
Fix 32-bit breakage

15 years agoSmall refactoring, and add comments
Simon Marlow [Wed, 19 Nov 2008 14:37:02 +0000 (14:37 +0000)]
Small refactoring, and add comments
I discovered a new invariant while experimenting (blackholing is not
optional when using parallel GC), so documented it.

15 years agoFix some unsigned comparisions that should be signed
Simon Marlow [Wed, 19 Nov 2008 14:32:05 +0000 (14:32 +0000)]
Fix some unsigned comparisions that should be signed
Fixes crashes when using reclaimSpark() (not used currently, but may
be in the future).

15 years agoRemove incorrect assertions in steal()
Simon Marlow [Wed, 19 Nov 2008 14:30:43 +0000 (14:30 +0000)]
Remove incorrect assertions in steal()

15 years agodon't run sparks if there are other threads on this Capability
Simon Marlow [Fri, 14 Nov 2008 12:10:22 +0000 (12:10 +0000)]
don't run sparks if there are other threads on this Capability

15 years agoFix typo (HAVE_LIBGMP => HAVE_LIB_GMP); omit local gmp includes if HAVE_LIB_GMP
Simon Marlow [Wed, 19 Nov 2008 13:10:56 +0000 (13:10 +0000)]
Fix typo (HAVE_LIBGMP => HAVE_LIB_GMP); omit local gmp includes if HAVE_LIB_GMP
If we're using the system's installed GMP, we don't want to be picking
up the local gmp.h header file.

Fixes 2469(ghci) for me, because it turns out the system's GMP is more
up-to-date than GHC's version and has a fix for more recent versions
of gcc.  We also need to pull in a more recent GMP, but that's a
separte issue.

15 years agoFix some more shutdown races
Simon Marlow [Wed, 19 Nov 2008 12:48:48 +0000 (12:48 +0000)]
Fix some more shutdown races
There were races between workerTaskStop() and freeTaskManager(): we
need to be sure that all Tasks have exited properly before we start
tearing things down.  This isn't completely straighforward, see
comments for details.

15 years agoAdd help messages about --with-editline-(includes,libraries) to the ghc configure...
Judah Jacobson [Fri, 14 Nov 2008 18:33:34 +0000 (18:33 +0000)]
Add help messages about --with-editline-(includes,libraries) to the ghc configure script.

15 years agoAdd optional eager black-holing, with new flag -feager-blackholing
Simon Marlow [Tue, 18 Nov 2008 14:24:42 +0000 (14:24 +0000)]
Add optional eager black-holing, with new flag -feager-blackholing

Eager blackholing can improve parallel performance by reducing the
chances that two threads perform the same computation.  However, it
has a cost: one extra memory write per thunk entry.

To get the best results, any code which may be executed in parallel
should be compiled with eager blackholing turned on.  But since
there's a cost for sequential code, we make it optional and turn it on
for the parallel package only.  It might be a good idea to compile
applications (or modules) with parallel code in with
-feager-blackholing.

ToDo: document -feager-blackholing.

15 years agoFix #2783: detect black-hole loops properly
Simon Marlow [Mon, 17 Nov 2008 14:45:15 +0000 (14:45 +0000)]
Fix #2783: detect black-hole loops properly
At some point we regressed on detecting simple black-hole loops.  This
happened due to the introduction of duplicate-work detection for
parallelism: a black-hole loop looks very much like duplicate work,
except it's duplicate work being performed by the very same thread.
So we have to detect and handle this case.

15 years agoFix warning on Windows (use deleteThread() not deleteThread_())
Simon Marlow [Mon, 17 Nov 2008 14:30:47 +0000 (14:30 +0000)]
Fix warning on Windows (use deleteThread() not deleteThread_())

15 years agofix compile breakage on Windows
Simon Marlow [Mon, 17 Nov 2008 14:28:31 +0000 (14:28 +0000)]
fix compile breakage on Windows

15 years agoAttempt to fix #2512 and #2063; add +RTS -xm<address> -RTS option
Simon Marlow [Mon, 17 Nov 2008 12:05:56 +0000 (12:05 +0000)]
Attempt to fix #2512 and #2063;  add +RTS -xm<address> -RTS option
On x86_64, the RTS needs to allocate memory in the low 2Gb of the
address space.  On Linux we can do this with MAP_32BIT, but sometimes
this doesn't work (#2512) and other OSs don't support it at all
(#2063).  So to work around this:

  - Try MAP_32BIT first, if available.

  - Otherwise, try allocating memory from a fixed address (by default
    1Gb)

  - We now provide an option to configure the address to allocate
    from.  This allows a workaround on machines where the default
    breaks, and also provides a way for people to test workarounds
    that we can incorporate in future releases.

15 years agoAnother shutdown fix
Simon Marlow [Mon, 17 Nov 2008 09:43:50 +0000 (09:43 +0000)]
Another shutdown fix
If we encounter a runnable thread during shutdown, just kill it.  All
the threads are supposed to be dead at this stage, but this catches
threads that might have just returned from a foreign call, or were
finalizers created by the GC.

Fixes memo002(threaded1)

15 years agoCorrect an example in the users guide
Ian Lynagh [Sun, 16 Nov 2008 17:49:38 +0000 (17:49 +0000)]
Correct an example in the users guide

15 years agoFix gen_contents_index when not run inplace; trac #2764
Ian Lynagh [Sun, 16 Nov 2008 17:41:22 +0000 (17:41 +0000)]
Fix gen_contents_index when not run inplace; trac #2764
Based on a patch from juhpetersen.

15 years agoclose the temporary Handle before removing the file
Simon Marlow [Fri, 14 Nov 2008 13:09:58 +0000 (13:09 +0000)]
close the temporary Handle before removing the file

15 years agorefactor: move unlockClosure() into SMPClosureOps() where it should be
Simon Marlow [Fri, 14 Nov 2008 09:58:17 +0000 (09:58 +0000)]
refactor: move unlockClosure() into SMPClosureOps() where it should be

15 years agoOmit definitions of cas() and xchg() in .hc code
Simon Marlow [Fri, 14 Nov 2008 09:57:38 +0000 (09:57 +0000)]
Omit definitions of cas() and xchg() in .hc code
They cause compilation errors (correctly) with newer gccs
Shows up compiling the RTS via C, which happens on Windows

15 years agoDon't put stdin into non-blocking mode (#2778, #2777)
Simon Marlow [Fri, 14 Nov 2008 13:05:46 +0000 (13:05 +0000)]
Don't put stdin into non-blocking mode (#2778, #2777)
This used to be necessary when our I/O library needed all FDs in
O_NONBLOCK mode, and readline used to put stdin back into blocking
mode.  Nowadays the I/O library can cope with FDs in blocking mode,
and #2778/#2777 show why this is important.

15 years agoRmoeve --enable-dotnet
Simon Marlow [Fri, 14 Nov 2008 12:49:29 +0000 (12:49 +0000)]
Rmoeve --enable-dotnet

15 years ago#2751: disourage --enable-shared in ./configure --help
Simon Marlow [Fri, 14 Nov 2008 12:47:48 +0000 (12:47 +0000)]
#2751: disourage --enable-shared in ./configure --help

15 years agoadd a warning that --enable-shared is experimental
Simon Marlow [Fri, 14 Nov 2008 10:40:34 +0000 (10:40 +0000)]
add a warning that --enable-shared is experimental

15 years agolookupSymbol: revert to looking up both with and without the @N suffix
Simon Marlow [Thu, 13 Nov 2008 12:29:27 +0000 (12:29 +0000)]
lookupSymbol: revert to looking up both with and without the @N suffix

15 years ago#2768: fix compatibility problem with newer version of mingw
Simon Marlow [Thu, 13 Nov 2008 11:46:26 +0000 (11:46 +0000)]
#2768: fix compatibility problem with newer version of mingw

15 years agonotice ^C exceptions when waiting for I/O
Simon Marlow [Thu, 13 Nov 2008 11:43:42 +0000 (11:43 +0000)]
notice ^C exceptions when waiting for I/O

15 years agoFix a bug in the recompilation checking logic.
Thomas Schilling [Thu, 13 Nov 2008 16:26:53 +0000 (16:26 +0000)]
Fix a bug in the recompilation checking logic.

Previously, using target HscNothing resulted in unnessesary
recompilation because 'upsweep_mod' treated HscInterface specially.
This patch changes relaxes this.

When running GHC with debug level 5, 'upsweep_mod' will now also be
more verbose about what it is doing.

There is (at least) one possible remaining problem, though: When using
target 'HscNothing' we generate a fake linkable to signal that we have
processed a module.  When switching to 'HscInterpreted' this may cause
objects to not be recompiled.  Switching from HscNothing to
HscInterpreted is therefore only safe if we unload everything first.

15 years agoFix another subtle shutdown deadlock
Simon Marlow [Thu, 13 Nov 2008 16:00:05 +0000 (16:00 +0000)]
Fix another subtle shutdown deadlock
The problem occurred when a thread tries to GC during shutdown.  In
order to GC it has to acquire all the Capabilities in the system, but
during shutdown, some of the Capabilities have already been closed and
can never be acquired.

15 years agoFix an extremely subtle deadlock bug on x86_64
Simon Marlow [Thu, 13 Nov 2008 15:57:30 +0000 (15:57 +0000)]
Fix an extremely subtle deadlock bug on x86_64
The recent_activity flag was an unsigned int, but we sometimes do a
64-bit xchg() on it, which overwrites the next word in memory.  This
happened to contain the sched_state flag, which is used to control the
orderly shutdown of the system.  If the xchg() happened during
shutdown, the scheduler would get confused and deadlock.  Don't you
just love C?

15 years agomove an assertion
Simon Marlow [Thu, 13 Nov 2008 15:45:42 +0000 (15:45 +0000)]
move an assertion

15 years agoAlways zap the trailing @N from symbols when looking up in a DLL
Simon Marlow [Wed, 12 Nov 2008 11:15:18 +0000 (11:15 +0000)]
Always zap the trailing @N from symbols when looking up in a DLL

Fixes win32002(ghci)

Previously we only did this for references from object files, but we
should do it for all symbols, including those that GHCi looks up due
to FFI calls from bytecode.

15 years agoOnly allocate a mark stack if we're actually doing marking
Simon Marlow [Wed, 12 Nov 2008 11:21:44 +0000 (11:21 +0000)]
Only allocate a mark stack if we're actually doing marking
saves a bit of memory in major GCs

15 years agoFix parse error with older gccs (#2752)
Simon Marlow [Tue, 11 Nov 2008 13:53:44 +0000 (13:53 +0000)]
Fix parse error with older gccs (#2752)

15 years agoFix to i386_insert_ffrees (#2724, #1944)
Simon Marlow [Tue, 11 Nov 2008 12:56:19 +0000 (12:56 +0000)]
Fix to i386_insert_ffrees (#2724, #1944)
The i386 native code generator has to arrange that the FPU stack is
clear on exit from any function that uses the FPU.  Unfortunately it
was getting this wrong (and has been ever since this code was written,
I think): it was looking for basic blocks that used the FPU and adding
the code to clear the FPU stack on any non-local exit from the block.
In fact it should be doing this on a whole-function basis, rather than
individual basic blocks.

15 years agoFix bootstrap with 6.10.1 on Windows
Simon Marlow [Mon, 10 Nov 2008 13:43:18 +0000 (13:43 +0000)]
Fix bootstrap with 6.10.1 on Windows
ghc-pkg doesn't understand the old syntax any more, so 'ghc-pkg -l' fails

15 years agoPerform case-insensitive matching of path components in getBaseDir on Windows (Fixes...
Neil Mitchell [Wed, 5 Nov 2008 13:43:15 +0000 (13:43 +0000)]
Perform case-insensitive matching of path components in getBaseDir on Windows (Fixes bug 2743)

15 years agoDocumentation only. Clarify that 'load*' may indeed throw SourceErrors.
Thomas Schilling [Mon, 10 Nov 2008 17:56:14 +0000 (17:56 +0000)]
Documentation only.  Clarify that 'load*' may indeed throw SourceErrors.

I don't think errors during dependency analysis should be passed to
the logger.

15 years agoFix documentation (to say the opposite).
Thomas Schilling [Mon, 10 Nov 2008 15:38:19 +0000 (15:38 +0000)]
Fix documentation (to say the opposite).

15 years agoFix line numbers in TAGS files.
Thomas Schilling [Mon, 10 Nov 2008 15:36:21 +0000 (15:36 +0000)]
Fix line numbers in TAGS files.

15 years agoDocumentation only.
Thomas Schilling [Mon, 10 Nov 2008 15:34:56 +0000 (15:34 +0000)]
Documentation only.

15 years agoAdd 'packageDbModules' function to GHC API.
Thomas Schilling [Mon, 10 Nov 2008 14:35:10 +0000 (14:35 +0000)]
Add 'packageDbModules' function to GHC API.

This function returns a list of all modules available through the
package DB.

MERGE TO 6.10

15 years agoWe now require GHC 6.6, so we always have Applicative
Ian Lynagh [Sat, 8 Nov 2008 14:47:23 +0000 (14:47 +0000)]
We now require GHC 6.6, so we always have Applicative

15 years agoRemove a CPP test that's always true (__GLASGOW_HASKELL__ >= 605)
Ian Lynagh [Sat, 8 Nov 2008 14:45:44 +0000 (14:45 +0000)]
Remove a CPP test that's always true (__GLASGOW_HASKELL__ >= 605)

15 years agoRemove some dead code now that __GLASGOW_HASKELL__ >= 606
Ian Lynagh [Sat, 8 Nov 2008 14:44:59 +0000 (14:44 +0000)]
Remove some dead code now that __GLASGOW_HASKELL__ >= 606

15 years agoRemove some flag duplication from a Makefile
Ian Lynagh [Sat, 8 Nov 2008 14:44:12 +0000 (14:44 +0000)]
Remove some flag duplication from a Makefile

15 years agoghc_ge_605 is now always YES
Ian Lynagh [Sat, 8 Nov 2008 14:43:28 +0000 (14:43 +0000)]
ghc_ge_605 is now always YES

15 years agoRemove the GHC 6.4 unicode compat stuff; we can now just use Data.Char
Ian Lynagh [Sat, 8 Nov 2008 14:34:23 +0000 (14:34 +0000)]
Remove the GHC 6.4 unicode compat stuff; we can now just use Data.Char

15 years agoFix libffi bindist
Clemens Fruhwirth [Sat, 8 Nov 2008 09:47:25 +0000 (09:47 +0000)]
Fix libffi bindist

15 years agoReplace couple of fromJust with expectJust
Clemens Fruhwirth [Fri, 7 Nov 2008 16:07:35 +0000 (16:07 +0000)]
Replace couple of fromJust with expectJust

15 years agoBugfix for patch "Do not filter the rts from linked libraries..." (#2745)
Simon Marlow [Fri, 7 Nov 2008 09:29:25 +0000 (09:29 +0000)]
Bugfix for patch "Do not filter the rts from linked libraries..." (#2745)
The sense of the #ifdef was wrong

15 years agofix via-C compilation: import ghczmprim_GHCziBool_False_closure
Simon Marlow [Fri, 7 Nov 2008 09:04:32 +0000 (09:04 +0000)]
fix via-C compilation: import ghczmprim_GHCziBool_False_closure

15 years agodisable instance MonadPlus CoreM for GHC <= 6.6
Simon Marlow [Fri, 7 Nov 2008 08:52:50 +0000 (08:52 +0000)]
disable instance MonadPlus CoreM for GHC <= 6.6

15 years agore-instate counting of sparks converted
Simon Marlow [Thu, 6 Nov 2008 16:08:10 +0000 (16:08 +0000)]
re-instate counting of sparks converted
lost in patch "Run sparks in batches"

15 years agofix ASSERT_SPARK_POOL_INVARIANTS(): top>bottom is valid
Simon Marlow [Thu, 6 Nov 2008 15:58:26 +0000 (15:58 +0000)]
fix ASSERT_SPARK_POOL_INVARIANTS(): top>bottom is valid

15 years agopruneSparkQueue(): fix bug when top>bottom
Simon Marlow [Thu, 6 Nov 2008 15:56:48 +0000 (15:56 +0000)]
pruneSparkQueue(): fix bug when top>bottom

15 years agodon't yield if the system is shutting down
Simon Marlow [Thu, 6 Nov 2008 15:53:56 +0000 (15:53 +0000)]
don't yield if the system is shutting down

15 years agoleave out ATTRIBUTE_ALIGNED on Windows, it gives a warning
Simon Marlow [Thu, 6 Nov 2008 13:21:05 +0000 (13:21 +0000)]
leave out ATTRIBUTE_ALIGNED on Windows, it gives a warning

15 years agoCope with ThreadRelocated when traversing the blocked_queue
Simon Marlow [Thu, 6 Nov 2008 11:40:45 +0000 (11:40 +0000)]
Cope with ThreadRelocated when traversing the blocked_queue
Fixes "invalid what_next field" in ioref001 on Windows, and perhaps others

15 years agoRemove dead code.
Thomas Schilling [Fri, 31 Oct 2008 16:20:36 +0000 (16:20 +0000)]
Remove dead code.

15 years agoRun sparks in batches, instead of creating a new thread for each one
Simon Marlow [Thu, 6 Nov 2008 11:36:39 +0000 (11:36 +0000)]
Run sparks in batches, instead of creating a new thread for each one
Signficantly reduces the overhead for par, which means that we can
make use of paralellism at a much finer granularity.

15 years agoallocateInGen(): increase alloc_blocks (#2747)
Simon Marlow [Thu, 6 Nov 2008 11:37:14 +0000 (11:37 +0000)]
allocateInGen(): increase alloc_blocks (#2747)

15 years agodisable MonadPlus instance that doesn't compile with 6.6
Simon Marlow [Thu, 6 Nov 2008 10:04:11 +0000 (10:04 +0000)]
disable MonadPlus instance that doesn't compile with 6.6

15 years agodon't yield the Capability if blackholes_need_checking
Simon Marlow [Wed, 5 Nov 2008 15:49:28 +0000 (15:49 +0000)]
don't yield the Capability if blackholes_need_checking

15 years agodeadlock fix: reset the flag *after* checking the blackhole queue
Simon Marlow [Wed, 5 Nov 2008 15:05:42 +0000 (15:05 +0000)]
deadlock fix: reset the flag *after* checking the blackhole queue

15 years agoretreat the top/bottom fields of the spark pool in pruneSparkPool()
Simon Marlow [Wed, 5 Nov 2008 15:03:59 +0000 (15:03 +0000)]
retreat the top/bottom fields of the spark pool in pruneSparkPool()

15 years agofix the :help docs for :set stop (#2737)
Simon Marlow [Tue, 4 Nov 2008 09:29:29 +0000 (09:29 +0000)]
fix the :help docs for :set stop (#2737)

15 years agobugfix: don't ingore the return value from rts_evalIO()
Simon Marlow [Tue, 4 Nov 2008 14:21:47 +0000 (14:21 +0000)]
bugfix: don't ingore the return value from rts_evalIO()

15 years agoDocument the new SPARKS statistic, and xref from the parallelism section
Simon Marlow [Fri, 24 Oct 2008 12:02:36 +0000 (12:02 +0000)]
Document the new SPARKS statistic, and xref from the parallelism section

15 years agoMove the freeing of Capabilities later in the shutdown sequence
Simon Marlow [Fri, 24 Oct 2008 10:43:01 +0000 (10:43 +0000)]
Move the freeing of Capabilities later in the shutdown sequence
Fixes a bug whereby the Capability has been freed but other
Capabilities are still trying to steal sparks from its pool.

15 years agoPad Capabilities and Tasks to 64 bytes
Simon Marlow [Thu, 23 Oct 2008 08:07:49 +0000 (08:07 +0000)]
Pad Capabilities and Tasks to 64 bytes
This is just good practice to avoid placing two structures heavily
accessed by different CPUs on the same cache line

15 years agoFix desugaring of record update (fixes Trac #2735)
simonpj@microsoft.com [Mon, 3 Nov 2008 11:08:19 +0000 (11:08 +0000)]
Fix desugaring of record update (fixes Trac #2735)

15 years agoRefuse to register packages with unversioned dependencies; trac #1837
Ian Lynagh [Fri, 31 Oct 2008 18:17:46 +0000 (18:17 +0000)]
Refuse to register packages with unversioned dependencies; trac #1837

15 years agoWe now require GHC 6.6 to build the HEAD (and thus 6.12)
Ian Lynagh [Fri, 31 Oct 2008 17:15:06 +0000 (17:15 +0000)]
We now require GHC 6.6 to build the HEAD (and thus 6.12)

15 years ago:set prompt now understand Haskell String syntax; trace #2652
Ian Lynagh [Fri, 31 Oct 2008 14:52:27 +0000 (14:52 +0000)]
:set prompt now understand Haskell String syntax; trace #2652

15 years agoComments only
simonpj@microsoft.com [Fri, 31 Oct 2008 14:02:36 +0000 (14:02 +0000)]
Comments only

15 years agoQuickfix for warning.
Thomas Schilling [Fri, 31 Oct 2008 11:31:25 +0000 (11:31 +0000)]
Quickfix for warning.

15 years agoExport typeclasses for accessing compiler results.
Thomas Schilling [Tue, 28 Oct 2008 18:23:10 +0000 (18:23 +0000)]
Export typeclasses for accessing compiler results.

MERGE TO 6.10.

15 years agoMinor refactoring.
Thomas Schilling [Tue, 28 Oct 2008 18:22:02 +0000 (18:22 +0000)]
Minor refactoring.

15 years agoInclude record fields in tags.
Thomas Schilling [Tue, 28 Oct 2008 18:05:38 +0000 (18:05 +0000)]
Include record fields in tags.