simonmar [Fri, 6 Jan 2006 16:30:19 +0000 (16:30 +0000)]
[project @ 2006-01-06 16:30:17 by simonmar]
Add support for UTF-8 source files
GHC finally has support for full Unicode in source files. Source
files are now assumed to be UTF-8 encoded, and the full range of
Unicode characters can be used, with classifications recognised using
the implementation from Data.Char. This incedentally means that only
the stage2 compiler will recognise Unicode in source files, because I
was too lazy to port the unicode classifier code into libcompat.
Additionally, the following synonyms for keywords are now recognised:
forall symbol (U+2200) forall
right arrow (U+2192) ->
left arrow (U+2190) <-
horizontal ellipsis (U+22EF) ..
there are probably more things we could add here.
This will break some source files if Latin-1 characters are being used.
In most cases this should result in a UTF-8 decoding error. Later on
if we want to support more encodings (perhaps with a pragma to specify
the encoding), I plan to do it by recoding into UTF-8 before parsing.
Internally, there were some pretty big changes:
- FastStrings are now stored in UTF-8
- Z-encoding has been moved right to the back end. Previously we
used to Z-encode every identifier on the way in for simplicity,
and only decode when we needed to show something to the user.
Instead, we now keep every string in its UTF-8 encoding, and
Z-encode right before printing it out. To avoid Z-encoding the
same string multiple times, the Z-encoding is cached inside the
FastString the first time it is requested.
This speeds up the compiler - I've measured some definite
improvement in parsing at least, and I expect compilations overall
to be faster too. It also cleans up a lot of cruft from the
OccName interface. Z-encoding is nicely hidden inside the
Outputable instance for Names & OccNames now.
- StringBuffers are UTF-8 too, and are now represented as
ForeignPtrs.
- I've put together some test cases, not by any means exhaustive,
but there are some interesting UTF-8 decoding error cases that
aren't obvious. Also, take a look at unicode001.hs for a demo.
simonmar [Fri, 6 Jan 2006 11:04:07 +0000 (11:04 +0000)]
[project @ 2006-01-06 11:04:07 by simonmar]
Document -Rghc-timing
simonpj [Thu, 5 Jan 2006 13:10:55 +0000 (13:10 +0000)]
[project @ 2006-01-05 13:10:55 by simonpj]
MERGE TO STABLE
This commit fixes a nasty problem discovered by Volker Stolz.
The problem is described in Note [Multiple instantiation] in
TcExpr, which is reproduced below.
(Core Lint identifies the problem, incidentally.)
tc200 is a test case.
Note [Multiple instantiation]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We are careful never to make a MethodInst that has, as its meth_id, another MethodInst.
For example, consider
f :: forall a. Eq a => forall b. Ord b => a -> b
At a call to f, at say [Int, Bool], it's tempting to translate the call to
f_m1
where
f_m1 :: forall b. Ord b => Int -> b
f_m1 = f Int dEqInt
f_m2 :: Int -> Bool
f_m2 = f_m1 Bool dOrdBool
But notice that f_m2 has f_m1 as its meth_id. Now the danger is that if we do
a tcSimplCheck with a Given f_mx :: f Int dEqInt, we may make a binding
f_m1 = f_mx
But it's entirely possible that f_m2 will continue to float out, because it
mentions no type variables. Result, f_m1 isn't in scope.
Here's a concrete example that does this (test tc200):
class C a where
f :: Eq b => b -> a -> Int
baz :: Eq a => Int -> a -> Int
instance C Int where
baz = f
Current solution: only do the "method sharing" thing for the first type/dict
application, not for the iterated ones. A horribly subtle point.
simonpj [Thu, 5 Jan 2006 10:02:58 +0000 (10:02 +0000)]
[project @ 2006-01-05 10:02:58 by simonpj]
'newtype' declarations are now parsed exactly like data type declarations,
so that you can declare newtypes using GADT syntax. But that means we
must check all the newtype restrictions separately, and I mised one.
This commit checks that there is no existential context on the newtype.
Test is tcfail156
simonmar [Thu, 5 Jan 2006 09:42:54 +0000 (09:42 +0000)]
[project @ 2006-01-05 09:42:54 by simonmar]
This file is not quite POSIX compliant; hopefully fix build on MacOS X
(Tiger)
simonmar [Wed, 4 Jan 2006 12:51:59 +0000 (12:51 +0000)]
[project @ 2006-01-04 12:51:59 by simonmar]
remove duplicate definition
simonmar [Wed, 4 Jan 2006 12:49:38 +0000 (12:49 +0000)]
[project @ 2006-01-04 12:49:38 by simonmar]
make 3.79.1 is ok
simonpj [Wed, 4 Jan 2006 11:52:54 +0000 (11:52 +0000)]
[project @ 2006-01-04 11:52:54 by simonpj]
Resolve ticket 644; crash when data con returns wrong type
simonmar [Tue, 3 Jan 2006 16:15:37 +0000 (16:15 +0000)]
[project @ 2006-01-03 16:15:37 by simonmar]
setContextAfterLoad: try to load a target if possible, otherwise load
the topmost module in the graph. Previously we were loading the first
module in the list, which happened to be right a lot of the time, but
not always.
Fixes ticket #642
simonmar [Tue, 3 Jan 2006 16:14:20 +0000 (16:14 +0000)]
[project @ 2006-01-03 16:14:20 by simonmar]
export ModLocation(..)
simonmar [Tue, 3 Jan 2006 12:57:10 +0000 (12:57 +0000)]
[project @ 2006-01-03 12:57:10 by simonmar]
sanity bugfix: use TSO_OFFSET_stack instead of OFFSET_stack
simonmar [Tue, 3 Jan 2006 12:56:10 +0000 (12:56 +0000)]
[project @ 2006-01-03 12:56:10 by simonmar]
two fixes for the case when a (synchronous) exception is propagated to
the top of a thread's stack, i.e. it is unhandled.
1. store the exception in the right place (we were using the
OFFSET_StgTSO_stack macro and not accounting for the TSO's
header size)
2. put an stg_enter_info on the stack so that the GC can understand
this thread's stack.
simonmar [Tue, 3 Jan 2006 12:53:40 +0000 (12:53 +0000)]
[project @ 2006-01-03 12:53:40 by simonmar]
for TSO fields, define a Cmm macro TSO_OFFSET_xxx to get the actual
offset including the header and variable parts (we were misusing the
headerless OFFSET_xxx macros in a couple of places).
simonmar [Tue, 3 Jan 2006 12:16:26 +0000 (12:16 +0000)]
[project @ 2006-01-03 12:16:26 by simonmar]
wibble in panic message
simonmar [Tue, 3 Jan 2006 11:06:45 +0000 (11:06 +0000)]
[project @ 2006-01-03 11:06:45 by simonmar]
emit an error message if GNU make 3.7x is found (3.80 is required).
simonmar [Tue, 3 Jan 2006 11:01:09 +0000 (11:01 +0000)]
[project @ 2006-01-03 11:01:09 by simonmar]
mention that GNU make 3.80 is required.
simonpj [Thu, 29 Dec 2005 12:06:13 +0000 (12:06 +0000)]
[project @ 2005-12-29 12:06:13 by simonpj]
Trim imports
simonpj [Thu, 29 Dec 2005 09:19:24 +0000 (09:19 +0000)]
[project @ 2005-12-29 09:19:24 by simonpj]
Document SPECIALISE INLNE
simonpj [Wed, 21 Dec 2005 11:43:29 +0000 (11:43 +0000)]
[project @ 2005-12-21 11:43:29 by simonpj]
Missing Show instance for FreeRegs on PowerPC
simonpj [Mon, 19 Dec 2005 13:08:19 +0000 (13:08 +0000)]
[project @ 2005-12-19 13:08:19 by simonpj]
Wibble to printing FunTyCon in GHCi that makes :b GHC.Base work
simonpj [Mon, 19 Dec 2005 11:00:59 +0000 (11:00 +0000)]
[project @ 2005-12-19 11:00:59 by simonpj]
Marginally improve the error message on a failure in DsMeta
simonpj [Mon, 19 Dec 2005 11:00:40 +0000 (11:00 +0000)]
[project @ 2005-12-19 11:00:40 by simonpj]
Tiny fix to patterns with type sigs
simonpj [Mon, 19 Dec 2005 09:48:14 +0000 (09:48 +0000)]
[project @ 2005-12-19 09:48:14 by simonpj]
Allow trailing parens in GADT signatures
simonpj [Mon, 19 Dec 2005 09:32:33 +0000 (09:32 +0000)]
[project @ 2005-12-19 09:32:33 by simonpj]
** Wibble to Friday's commit (fixes HEAD build) **
-----------------------------------------
Make deriving work for infix constructors
-----------------------------------------
Merge to stable branch
Back quotes were not being done correctly in deriving Read and Show.
Now they are. I think.
Test is drvrun018
simonpj [Fri, 16 Dec 2005 16:04:03 +0000 (16:04 +0000)]
[project @ 2005-12-16 16:04:03 by simonpj]
-----------------------------------------
Make deriving work for infix constructors
-----------------------------------------
Merge to stable branch
Back quotes were not being done correctly in deriving Read and Show.
Now they are. I think.
Test is drvrun018
simonpj [Fri, 16 Dec 2005 15:17:29 +0000 (15:17 +0000)]
[project @ 2005-12-16 15:17:29 by simonpj]
Document that type variables in instance context must be distinct; merge to stable
simonpj [Fri, 16 Dec 2005 15:15:08 +0000 (15:15 +0000)]
[project @ 2005-12-16 15:15:08 by simonpj]
-----------------------------------------
Test for repated type variables in an instance decl context;
this should require -fallow-undecidable-instances'
-----------------------------------------
Merge to stable branch
simonmar [Fri, 16 Dec 2005 11:41:51 +0000 (11:41 +0000)]
[project @ 2005-12-16 11:41:51 by simonmar]
Avoid building the GHCi version of this lib
simonmar [Fri, 16 Dec 2005 11:26:01 +0000 (11:26 +0000)]
[project @ 2005-12-16 11:26:01 by simonmar]
Use standard calloc rather than rolling our own.
As a small bonus, the standard libc version is more effecient about zeroing
the memory.
From: Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
desrt [Thu, 15 Dec 2005 23:32:29 +0000 (23:32 +0000)]
[project @ 2005-12-15 23:32:29 by desrt]
(( PLEASE MERGE TO STABLE ))
Linker.c: linux/ppc: We call mmap() to allocate additional pages to
create jump islands. In the case where no
additional memory was needed the mmap call was
being made with a size of 0 which would fail.
The call is now conditionalised and documentation
has been added to the code. Closes trac #439.
simonmar [Thu, 15 Dec 2005 10:36:03 +0000 (10:36 +0000)]
[project @ 2005-12-15 10:36:03 by simonmar]
ignore _darcs
simonmar [Thu, 15 Dec 2005 10:05:54 +0000 (10:05 +0000)]
[project @ 2005-12-15 10:05:54 by simonmar]
fix missing symbol
simonmar [Tue, 13 Dec 2005 15:57:50 +0000 (15:57 +0000)]
[project @ 2005-12-13 15:57:49 by simonmar]
Raise the (new) exception NestedAtomically when atomically is nested
(using unsafePerformIO). This is a small improvement over crashing.
simonmar [Tue, 13 Dec 2005 12:52:25 +0000 (12:52 +0000)]
[project @ 2005-12-13 12:52:25 by simonmar]
fix FAQ links
simonmar [Tue, 13 Dec 2005 12:45:08 +0000 (12:45 +0000)]
[project @ 2005-12-13 12:45:08 by simonmar]
the FAQ is now in the Wiki
simonmar [Tue, 13 Dec 2005 12:42:51 +0000 (12:42 +0000)]
[project @ 2005-12-13 12:42:51 by simonmar]
while I'm here, bring various other bits of this page up to date
simonmar [Tue, 13 Dec 2005 12:26:06 +0000 (12:26 +0000)]
[project @ 2005-12-13 12:26:06 by simonmar]
Update bug reporting instructions to point to the new bug tracker
simonmar [Tue, 13 Dec 2005 12:18:51 +0000 (12:18 +0000)]
[project @ 2005-12-13 12:18:51 by simonmar]
Update the bug reporting instructions, I've now installed a redirect from
http://www.haskel.org/ghc/reportabug
to the bug reporting instructions, just in case we want to move that
page in the future.
simonmar [Tue, 13 Dec 2005 12:09:42 +0000 (12:09 +0000)]
[project @ 2005-12-13 12:09:42 by simonmar]
In the panic message, point to the bug reporting page in the User's
Guide rather than directly to the bug reporting page. That way people
will see the bug reporting instructions as well as the direct link
(which has now changed).
simonmar [Tue, 13 Dec 2005 11:30:33 +0000 (11:30 +0000)]
[project @ 2005-12-13 11:30:33 by simonmar]
undo accidental commit of snapshot version number
simonmar [Mon, 12 Dec 2005 15:06:11 +0000 (15:06 +0000)]
[project @ 2005-12-12 15:06:11 by simonmar]
Add -threaded for stage[23]
simonmar [Mon, 12 Dec 2005 14:22:30 +0000 (14:22 +0000)]
[project @ 2005-12-12 14:22:30 by simonmar]
Prevent --: from being interpreted as a comment
simonmar [Fri, 9 Dec 2005 11:35:44 +0000 (11:35 +0000)]
[project @ 2005-12-09 11:35:44 by simonmar]
Make the front panel compile again, submitted by Duncan Coutts
<duncan.coutts@worc.ox.ac.uk>. From his email:
Attached is a patch to port the GHC RTS font panel to Gtk+ 2.x rather
than the obsolete Gtk+ 1.2.
There were basically two changes needed. Change the configure check to
look for the pkg-config utility rather than the old gtk-config. At it's
just checking for Gtk+ 2.0 or later. It may be that the new code
actually needs a slightly later version than that. I'm not quite sure.
The other change was to convert the ghc-fontpanel.glade file to the
glade-2 format using the libglade-convert script and then to re-generate
the C code for constructing the GUI, that is the Vis*.c Vis*.h files in
ghc/rts.
The front panel has been bit-rotting for quite some time so it has not
kept up with changes in the rts structures. So I had to comment out
references to 3 bits that no longer exist. I've left FIXMEs in the code
at the appropriate places so that someone wiser than me can make the
appropriate changes.
So the thing does now build though I have no doubt that it will not run,
or at least will not do the right thing because it has not yet been
updated to the current state of the rts. However hopefully now that it
is at least buildable with a modern Gtk+ version someone else might be
able to fix it up.
This also relates to trac ticket #599:
http://cvs.haskell.org/trac/ghc/ticket/599
simonmar [Fri, 2 Dec 2005 15:16:08 +0000 (15:16 +0000)]
[project @ 2005-12-02 15:16:08 by simonmar]
remove one mention of hslibs
simonmar [Fri, 2 Dec 2005 14:22:06 +0000 (14:22 +0000)]
[project @ 2005-12-02 14:22:06 by simonmar]
- remove hslibs link
- add Building Guide link
- remove the word "hierarchical" from "hierarchical libraries"
simonmar [Fri, 2 Dec 2005 14:09:21 +0000 (14:09 +0000)]
[project @ 2005-12-02 14:09:21 by simonmar]
revert rev. 1.22 again, just in case this is the cause of the
segfaults reported on OpenBSD and SuSE.
simonmar [Fri, 2 Dec 2005 12:45:16 +0000 (12:45 +0000)]
[project @ 2005-12-02 12:45:16 by simonmar]
Fix Windows build
Patch submitted by: Esa Ilari Vuokko <eivuokko at gmail.com>
simonmar [Wed, 30 Nov 2005 16:56:51 +0000 (16:56 +0000)]
[project @ 2005-11-30 16:56:51 by simonmar]
fix bug in the case of an uncaught exception
simonmar [Wed, 30 Nov 2005 15:58:47 +0000 (15:58 +0000)]
[project @ 2005-11-30 15:58:47 by simonmar]
check for overrun of the fd_set, some OSs give you more descriptors
than FD_SETSIZE
simonpj [Wed, 30 Nov 2005 14:20:06 +0000 (14:20 +0000)]
[project @ 2005-11-30 14:20:06 by simonpj]
-----------------------------------------
Fix 'mkName' operator in Template Haskell
so that it handles built-in syntax
-----------------------------------------
Merge to stable branch
The 'mkName' function in Template Haskell wasn't dealing correctly with
built-in syntax. The parser generates Exact RdrNames for built-in syntax
operators, such as ':' and '[]'; and hence so should Convert.
At the same time I'm now generating a better error message in TH when
you use a constructor as a variable or vice versa.
John Goerzen [Wed, 30 Nov 2005 18:58:34 +0000 (18:58 +0000)]
.hi is now boring
John Goerzen [Wed, 30 Nov 2005 17:15:50 +0000 (17:15 +0000)]
TAG Last state before ghc 6.4 branch split
John Goerzen [Wed, 30 Nov 2005 17:15:26 +0000 (17:15 +0000)]
Removed more obsolete dirs
John Goerzen [Wed, 30 Nov 2005 17:14:53 +0000 (17:14 +0000)]
Removed obsolete directories
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
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.
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
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
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)
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
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.
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
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
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)
simonmar [Fri, 25 Nov 2005 13:10:04 +0000 (13:10 +0000)]
[project @ 2005-11-25 13:10:04 by simonmar]
#include SMP.h
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
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
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
simonmar [Fri, 25 Nov 2005 09:46:19 +0000 (09:46 +0000)]
[project @ 2005-11-25 09:46:19 by simonmar]
fix comment
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.
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.
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
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).
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.
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
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
simonmar [Thu, 24 Nov 2005 10:41:57 +0000 (10:41 +0000)]
[project @ 2005-11-24 10:41:57 by simonmar]
wibble
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.
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_
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
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
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.
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
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?"
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!
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
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
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)
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.
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.
simonmar [Fri, 18 Nov 2005 15:38:26 +0000 (15:38 +0000)]
[project @ 2005-11-18 15:38:26 by simonmar]
fix threaded build
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.
simonmar [Fri, 18 Nov 2005 15:23:09 +0000 (15:23 +0000)]
[project @ 2005-11-18 15:23:09 by simonmar]
cosmetic
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)
simonmar [Fri, 18 Nov 2005 15:10:31 +0000 (15:10 +0000)]
[project @ 2005-11-18 15:10:31 by simonmar]
cosmetic
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.
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.
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
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
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.