sof [Wed, 13 Feb 2002 15:29:27 +0000 (15:29 +0000)]
[project @ 2002-02-13 15:29:27 by sof]
Tweaks to the Windows section, in part. commented out
the InstallShield section as it is no longer used.
simonpj [Wed, 13 Feb 2002 15:19:21 +0000 (15:19 +0000)]
[project @ 2002-02-13 15:19:17 by simonpj]
----------------------------------
Do the Right Thing for TyCons where we
can't see all their constructors.
----------------------------------
Inside a TyCon, three things can happen
1. GHC knows all the constructors, and has them to hand.
(Nowadays, there may be zero constructors.)
2. GHC knows all the constructors, but has declined to slurp
them all in, to avoid sucking in more declarations than
necessary. All we remember is the number of constructors,
so we can get the return convention right.
3. GHC doesn't know anything. This happens *only* for decls
coming from .hi-boot files, where the programmer declines to
supply a representation.
Until now, these three cases have been conflated together. Matters
are worse now that a TyCon really can have zero constructors. In
fact, by confusing (3) with (1) we can actually generate bogus code.
With this commit, the dataCons field of a TyCon is of type:
data DataConDetails datacon
= DataCons [datacon] -- Its data constructors, with fully polymorphic types
-- A type can have zero constructors
| Unknown -- We're importing this data type from an hi-boot file
-- and we don't know what its constructors are
| HasCons Int -- In a quest for compilation speed we have imported
-- only the number of constructors (to get return
-- conventions right) but not the constructors themselves
This says exactly what is going on. There are lots of consequential small
changes.
simonpj [Wed, 13 Feb 2002 15:14:07 +0000 (15:14 +0000)]
[project @ 2002-02-13 15:14:06 by simonpj]
--------------------------------------------
Fix a bugs in type inference for rank-N types
--------------------------------------------
We discovered this bug when looking at type rules!
1. When type checking (e :: sigma-ty), we must specialise sigma-ty,
else we lose the invariant that tcMonoType has.
2. In tcExpr_id, we should pass in a Hole tyvar not an ordinary tyvar.
As usual, I moved some functions around in consequence.
simonmar [Wed, 13 Feb 2002 15:08:00 +0000 (15:08 +0000)]
[project @ 2002-02-13 15:07:59 by simonmar]
Don't translate out negative (boxed) literals too early.
simonmar [Wed, 13 Feb 2002 14:52:43 +0000 (14:52 +0000)]
[project @ 2002-02-13 14:52:43 by simonmar]
Catch up with Haskell 98 revisions: allow sections like (++ x ++ y)
and (3 + 4 +).
simonpj [Wed, 13 Feb 2002 14:14:09 +0000 (14:14 +0000)]
[project @ 2002-02-13 14:14:09 by simonpj]
------------------------------
Fix the "occurs check" so that
it handles unifying a type variable
with a type scheme
------------------------------
It's illegal to unify a type variable with a type scheme:
a :=: (forall b. b->b) -> Int
But I wasn't detecting that properly. Now, the same code
that does the occurs check also looks for foralls.
simonpj [Wed, 13 Feb 2002 14:06:00 +0000 (14:06 +0000)]
[project @ 2002-02-13 14:05:50 by simonpj]
Import wibbles
simonmar [Wed, 13 Feb 2002 12:17:48 +0000 (12:17 +0000)]
[project @ 2002-02-13 12:17:48 by simonmar]
Add {-# OPTIONS -fno-implicit-prelude #-} to the top of GHC/PrimopWrappers.hs
simonmar [Wed, 13 Feb 2002 11:51:40 +0000 (11:51 +0000)]
[project @ 2002-02-13 11:51:40 by simonmar]
- Detect presence of a POSIX-compatible regex interface in configure,
and omit Text.Regex.Posix (and hence Text.Regex) if it is missing.
ToDo: pull in a suitably-licensed implementation of POSIX regex
to be used in the event that the system doesn't supply one.
- Rename old HaveRegex to HaveGNURegex.
simonmar [Wed, 13 Feb 2002 10:45:28 +0000 (10:45 +0000)]
[project @ 2002-02-13 10:45:28 by simonmar]
Use --update-package rather than --remove-package followed by --add-package
simonmar [Wed, 13 Feb 2002 10:40:24 +0000 (10:40 +0000)]
[project @ 2002-02-13 10:40:24 by simonmar]
Fixes to SplitObjs: we now put the split object files in a
subdirectory M_split/ rather than just M/, because the latter
interacts badly with our hierarchical module structure.
simonpj [Wed, 13 Feb 2002 10:39:36 +0000 (10:39 +0000)]
[project @ 2002-02-13 10:39:36 by simonpj]
-------------------------------
dosifyPath before opening files
-------------------------------
If you call
hsc2hs foo/baz
you get the amazing response:
'foo' is not recognized as an internal or external command,
operable program or batch file.
On the other hand
hsc2hs foo\baz
works fine. Solution: call dosifyPath before opening or writing the file.
Somehow we should make it less easy to trip up when doing file I/O on
Windows. And provide a library of path-manipulation primitives.
sof [Wed, 13 Feb 2002 08:48:07 +0000 (08:48 +0000)]
[project @ 2002-02-13 08:48:06 by sof]
Revised implementation of multi-threaded callouts (and callins):
- unified synchronisation story for threaded and SMP builds,
following up on SimonM's suggestion. The following synchro
variables are now used inside the Scheduler:
+ thread_ready_cond - condition variable that is signalled
when a H. thread has become runnable (via the THREAD_RUNNABLE()
macro) and there are available capabilities. Waited on:
+ upon schedule() entry (iff no caps. available).
+ when a thread inside of the Scheduler spots that there
are no runnable threads to service, but one or more
external call is in progress.
+ in resumeThread(), waiting for a capability to become
available.
Prior to waiting on thread_ready_cond, a counter rts_n_waiting_tasks
is incremented, so that we can keep track of the number of
readily available worker threads (need this in order to make
an informed decision on whether or not to create a new thread
when an external call is made).
+ returning_worker_cond - condition variable that is waited
on by an OS thread that has finished executing and external
call & now want to feed its result back to the H thread
that made the call. Before doing so, the counter
rts_n_returning_workers is incremented.
Upon entry to the Scheduler, this counter is checked for &
if it is non-zero, the thread gives up its capability and
signals returning_worker_cond before trying to re-grab a
capability. (releaseCapability() takes care of this).
+ sched_mutex - protect Scheduler data structures.
+ gc_pending_cond - SMP-only condition variable for signalling
completion of GCs.
- initial implementation of call-ins, i.e., multiple OS threads
may concurrently call into the RTS without interfering with
each other. Implementation uses cheesy locking protocol to
ensure that only one OS thread at a time can construct a
function application -- stop-gap measure until the RtsAPI
is revised (as discussed last month) *and* a designated
block is used for allocating these applications.
- In the implementation of call-ins, the OS thread blocks
waiting for an RTS worker thread to complete the evaluation
of the function application. Since main() also uses the
RtsAPI, provide a separate entry point for it (rts_mainEvalIO()),
which avoids creating a separate thread to evaluate Main.main,
that can be done by the thread exec'ing main() directly.
[Maybe there's a tidier way of doing this, a bit ugly the
way it is now..]
There are a couple of dark corners that needs to be looked at,
such as conditions for shutting down (and how) + consider what
ought to happen when async I/O is thrown into the mix (I know
what will happen, but that's maybe not what we want).
Other than that, things are in a generally happy state & I hope
to declare myself done before the week is up.
sof [Wed, 13 Feb 2002 07:51:01 +0000 (07:51 +0000)]
[project @ 2002-02-13 07:51:01 by sof]
removed taskNotAvailable(), taskAvailable() and getTaskCount() - simplified away
sof [Wed, 13 Feb 2002 07:48:19 +0000 (07:48 +0000)]
[project @ 2002-02-13 07:48:18 by sof]
moved defn of RTS_SUPPORTS_THREADS from Rts.h to Stg.h
sof [Wed, 13 Feb 2002 07:47:41 +0000 (07:47 +0000)]
[project @ 2002-02-13 07:47:41 by sof]
uh, make that the StgTSOBlockReason enum
sof [Wed, 13 Feb 2002 07:46:42 +0000 (07:46 +0000)]
[project @ 2002-02-13 07:46:42 by sof]
Add BlockedOnCCall to StgTSOBlockInfo enum
njn [Tue, 12 Feb 2002 17:20:36 +0000 (17:20 +0000)]
[project @ 2002-02-12 17:20:36 by njn]
Added note about the mangler removing unneeded SRTs.
simonmar [Tue, 12 Feb 2002 16:55:22 +0000 (16:55 +0000)]
[project @ 2002-02-12 16:55:22 by simonmar]
Must add 'depend' before 'all' in the boot target so that we get
dependencies in time.
simonmar [Tue, 12 Feb 2002 16:52:37 +0000 (16:52 +0000)]
[project @ 2002-02-12 16:52:37 by simonmar]
This isn't needed any more
simonmar [Tue, 12 Feb 2002 15:45:46 +0000 (15:45 +0000)]
[project @ 2002-02-12 15:45:46 by simonmar]
Use LIBOBJS rather than OBJS when building the GHCi library.
sof [Tue, 12 Feb 2002 15:39:49 +0000 (15:39 +0000)]
[project @ 2002-02-12 15:39:49 by sof]
THREAD_RUNNABLE(): make available in threaded mode
sof [Tue, 12 Feb 2002 15:38:08 +0000 (15:38 +0000)]
[project @ 2002-02-12 15:38:08 by sof]
Snapshot (before heading into work):
- thread_ready_aux_mutex is no more; use sched_mutex instead.
- gc_pending_cond only used in SMP mode.
- document the condition that thread_ready_cond captures.
sof [Tue, 12 Feb 2002 15:34:25 +0000 (15:34 +0000)]
[project @ 2002-02-12 15:34:25 by sof]
- give rts_n_free_capabilities an interpretation
in threaded mode (possible values: 0,1)
- noFreeCapabilities() -? noCapabilities()
simonmar [Tue, 12 Feb 2002 15:17:36 +0000 (15:17 +0000)]
[project @ 2002-02-12 15:17:13 by simonmar]
Switch over to the new hierarchical libraries
---------------------------------------------
This commit reorganises our libraries to use the new hierarchical
module namespace extension.
The basic story is this:
- fptools/libraries contains the new hierarchical libraries.
Everything in here is "clean", i.e. most deprecated stuff has
been removed.
- fptools/libraries/base is the new base package
(replacing "std") and contains roughly what was previously
in std, lang, and concurrent, minus deprecated stuff.
Things that are *not allowed* in libraries/base include:
Addr, ForeignObj, ByteArray, MutableByteArray,
_casm_, _ccall_, ``'', PrimIO
For ByteArrays and MutableByteArrays we use UArray and
STUArray/IOUArray respectively now.
Modules previously called PrelFoo are now under
fptools/libraries/GHC. eg. PrelBase is now GHC.Base.
- fptools/libraries/haskell98 provides the Haskell 98 std.
libraries (Char, IO, Numeric etc.) as a package. This
package is enabled by default.
- fptools/libraries/network is a rearranged version of
the existing net package (the old package net is still
available; see below).
- Other packages will migrate to fptools/libraries in
due course.
NB. you need to checkout fptools/libraries as well as
fptools/hslibs now. The nightly build scripts will need to be
tweaked.
- fptools/hslibs still contains (almost) the same stuff as before.
Where libraries have moved into the new hierarchy, the hslibs
version contains a "stub" that just re-exports the new version.
The idea is that code will gradually migrate from fptools/hslibs
into fptools/libraries as it gets cleaned up, and in a version or
two we can remove the old packages altogether.
- I've taken the opportunity to make some changes to the build
system, ripping out the old hslibs Makefile stuff from
mk/target.mk; the new package building Makefile code is in
mk/package.mk (auto-included from mk/target.mk).
The main improvement is that packages now register themselves at
make boot time using ghc-pkg, and the monolithic package.conf
in ghc/driver is gone.
I've updated the standard packages but haven't tested win32,
graphics, xlib, object-io, or OpenGL yet. The Makefiles in
these packages may need some further tweaks, and they'll need
pkg.conf.in files added.
- Unfortunately all this rearrangement meant I had to bump the
interface-file version and create a bunch of .hi-boot-6 files :-(
simonmar [Tue, 12 Feb 2002 11:44:54 +0000 (11:44 +0000)]
[project @ 2002-02-12 11:44:54 by simonmar]
Fix bug in previous commit
simonmar [Tue, 12 Feb 2002 09:43:08 +0000 (09:43 +0000)]
[project @ 2002-02-12 09:43:08 by simonmar]
fromInt ==> fromIntegral
sof [Tue, 12 Feb 2002 05:01:26 +0000 (05:01 +0000)]
[project @ 2002-02-12 05:01:26 by sof]
bring stuff in parallel/ into scope when running 'mkdependC'
sof [Tue, 12 Feb 2002 04:49:13 +0000 (04:49 +0000)]
[project @ 2002-02-12 04:49:13 by sof]
comment wibble
chak [Tue, 12 Feb 2002 03:52:09 +0000 (03:52 +0000)]
[project @ 2002-02-12 03:52:08 by chak]
This fixes a problem with the recent clean up in the parsing of type
declarations. The cleaned up version was correct by H98 (I think), but
unfortunately won't compile the Prelude anymore.
I made the definition a little bit more liberal as follows:
- In `tycl_hdr' allow `gtycon' instead of just `tycon' for the defined type
constructor. This allows beyond H98 special syntax like "[]" etc as well as
tycon ops in parenthesis. Moreover, it allows qualified names, but the
renamer flags the latter as errors.
- Allow `gtycon' instead of only `qtycon' for the class name in definitions of
the form `Eq a => T a' to avoid a whole list of s/r conflicts. (I have *not*
checked that the renamer flags misuse, but I would expect that it does.)
ToDo: I think, the renamer should raise an error for all these additional
forms *unless* -fglasgow-exts is given.
In PrelBase, I needed to replace the infix notation by prefix notation in the
definition of `:+:' and `:*:'.
simonmar [Mon, 11 Feb 2002 16:03:36 +0000 (16:03 +0000)]
[project @ 2002-02-11 16:03:36 by simonmar]
- Addr ==> Ptr
- Don't directly import PrelIOBase & PrelBase
simonmar [Mon, 11 Feb 2002 15:48:58 +0000 (15:48 +0000)]
[project @ 2002-02-11 15:48:58 by simonmar]
fromInt ==> fromIntegral
simonpj [Mon, 11 Feb 2002 15:41:18 +0000 (15:41 +0000)]
[project @ 2002-02-11 15:41:18 by simonpj]
Wibble
simonmar [Mon, 11 Feb 2002 15:23:12 +0000 (15:23 +0000)]
[project @ 2002-02-11 15:23:12 by simonmar]
Fix lexer bug: we didn't look far enough ahead when parsing 1.0e+x
(i.e. the e+x shouldn't be treated as an exponent).
simonpj [Mon, 11 Feb 2002 15:21:20 +0000 (15:21 +0000)]
[project @ 2002-02-11 15:21:20 by simonpj]
Documentation for kinded declarations
simonpj [Mon, 11 Feb 2002 15:16:27 +0000 (15:16 +0000)]
[project @ 2002-02-11 15:16:25 by simonpj]
----------------------------------
Implement kinded type declarations
----------------------------------
This commit allows the programmer to supply kinds in
* data decls
* type decls
* class decls
* 'forall's in types
e.g. data T (x :: *->*) = MkT
type Composer c = forall (x :: * -> *) (y :: * -> *) (z :: * -> *).
(c y z) -> (c x y) -> (c x z);
This is occasionally useful.
It turned out to be convenient to add the form
(type :: kind)
to the syntax of types too, so you can put kind signatures in types as well.
simonmar [Mon, 11 Feb 2002 14:52:11 +0000 (14:52 +0000)]
[project @ 2002-02-11 14:52:11 by simonmar]
fromInt ==> fromIntegral
chak [Mon, 11 Feb 2002 14:42:54 +0000 (14:42 +0000)]
[project @ 2002-02-11 14:42:53 by chak]
Documentation for the parallel array extension merged earlier. (This
documents Milestone 1 as well as some of the basics of flattening.)
simonmar [Mon, 11 Feb 2002 13:59:01 +0000 (13:59 +0000)]
[project @ 2002-02-11 13:59:01 by simonmar]
Add a missing dependency (submitted by Volker Stolz; thanks)
simonpj [Mon, 11 Feb 2002 09:27:22 +0000 (09:27 +0000)]
[project @ 2002-02-11 09:27:21 by simonpj]
------------------------------
Towards kinded data type decls
------------------------------
Move towards being able to have 'kinded' data type decls.
The burden of this commit, though, is to tidy up the parsing
of data type decls. Previously we had
data ctype '=' constrs
where the 'ctype' is a completetely general polymorphic type.
forall a. (Eq a) => T a
Then a separate function checked that it was of a suitably restricted
form. The reason for this is the usual thing --- it's hard to tell
when looking at
data Eq a => T a = ...
whether you are reading the data type or the context when you have
only got as far as 'Eq a'.
However, the 'ctype' trick doesn't work if we want to allow
data T (a :: * -> *) = ...
So we have to parse the data type decl in a more serious way.
That's what this commit does, and it makes the grammar look much nicer.
The main new producion is tycl_hdr.
simonpj [Mon, 11 Feb 2002 09:21:52 +0000 (09:21 +0000)]
[project @ 2002-02-11 09:21:52 by simonpj]
Remove unused rules
chak [Mon, 11 Feb 2002 08:58:43 +0000 (08:58 +0000)]
[project @ 2002-02-11 08:58:43 by chak]
Updated to the use of [~N] in rules implementing foldr/build.
chak [Mon, 11 Feb 2002 08:20:50 +0000 (08:20 +0000)]
[project @ 2002-02-11 08:20:38 by chak]
*******************************
* Merging from ghc-ndp-branch *
*******************************
This commit merges the current state of the "parallel array extension" and
includes the following:
* (Almost) completed Milestone 1:
- The option `-fparr' activates the H98 extension for parallel arrays.
- These changes have a high likelihood of conflicting (in the CVS sense)
with other changes to GHC and are the reason for merging now.
- ToDo: There are still some (less often used) functions not implemented in
`PrelPArr' and a mechanism is needed to automatically import
`PrelPArr' iff `-fparr' is given. Documentation that should go into
the Commentary is currently in `ghc/compiler/ndpFlatten/TODO'.
* Partial Milestone 2:
- The option `-fflatten' activates the flattening transformation and `-ndp'
selects the "ndp" way (where all libraries have to be compiled with
flattening). The way option `-ndp' automagically turns on `-fparr' and
`-fflatten'.
- Almost all changes are in the new directory `ndpFlatten' and shouldn't
affect the rest of the compiler. The only exception are the options and
the points in `HscMain' where the flattening phase is called when
`-fflatten' is given.
- This isn't usable yet, but already implements function lifting,
vectorisation, and a new analysis that determines which parts of a module
have to undergo the flattening transformation. Missing are data structure
and function specialisation, the unboxed array library (including fusion
rules), and lots of testing.
I have just run the regression tests on the thing without any problems. So,
it seems, as if we haven't broken anything crucial.
simonmar [Fri, 8 Feb 2002 15:02:30 +0000 (15:02 +0000)]
[project @ 2002-02-08 15:02:30 by simonmar]
Remove dependency on package text.
simonmar [Fri, 8 Feb 2002 15:00:40 +0000 (15:00 +0000)]
[project @ 2002-02-08 15:00:40 by simonmar]
Avoid using findPS/packString where simple string matching will do.
simonmar [Fri, 8 Feb 2002 14:59:19 +0000 (14:59 +0000)]
[project @ 2002-02-08 14:59:19 by simonmar]
Don't use RegexString to parse OPTIONS pragmas, instead do the
matching by hand, thereby removing a dependency on RegexString (and
hence Regex).
sewardj [Fri, 8 Feb 2002 14:04:29 +0000 (14:04 +0000)]
[project @ 2002-02-08 14:04:29 by sewardj]
Back out rev 1.28. In retrospect saving the pre-messed-with %esp in a
global location is thread/reentrancy unsafe and a brain-dead thing to
do, and we can't think of a clean way to fix this. So am backing it out.
simonpj [Fri, 8 Feb 2002 08:42:05 +0000 (08:42 +0000)]
[project @ 2002-02-08 08:42:05 by simonpj]
Improve wording slightly
sof [Fri, 8 Feb 2002 08:26:01 +0000 (08:26 +0000)]
[project @ 2002-02-08 08:26:01 by sof]
naive script for preparing a binary-dist tree for the installer
sof [Fri, 8 Feb 2002 03:44:01 +0000 (03:44 +0000)]
[project @ 2002-02-08 03:44:01 by sof]
declare MainCapability + simplify releaseCapability()
sewardj [Thu, 7 Feb 2002 16:11:42 +0000 (16:11 +0000)]
[project @ 2002-02-07 16:11:42 by sewardj]
Describe ultrakludge^Hclever engineering which makes IO types work in the
interpreter.
sewardj [Thu, 7 Feb 2002 15:31:20 +0000 (15:31 +0000)]
[project @ 2002-02-07 15:31:20 by sewardj]
Add many details about bytecode generation, the interpreter, and
compiled/interpreted code interop.
simonpj [Thu, 7 Feb 2002 14:56:29 +0000 (14:56 +0000)]
[project @ 2002-02-07 14:56:29 by simonpj]
Remove duplication of CVS info, and improve Win32 notes
simonpj [Thu, 7 Feb 2002 14:06:01 +0000 (14:06 +0000)]
[project @ 2002-02-07 14:06:00 by simonpj]
-------------------------------------------
Improve the "stragely-kinded tyvar" problem
-------------------------------------------
When the type checker finds a type variable with no binding,
which means it can be instantiated with an arbitrary type, it
usually instantiates it to Void. Eg.
length []
===>
length Void (Nil Void)
But in really obscure programs, the type variable might have
a kind other than *, so we need to invent a suitably-kinded type.
This commit uses
Void for kind *
List for kind *->*
Tuple for kind *->...*->*
which deals with most cases. (Previously, it only dealt with
kind *.)
In the other cases, it just makes up a TyCon with a suitable
kind. If this gets into an interface file, anyone reading that
file won't understand it. This is fixable (by making the client
of the interface file make up a TyCon too) but it is tiresome and
never happens, so I am leaving it.
Most of the added lines are comments.
simonpj [Thu, 7 Feb 2002 12:51:47 +0000 (12:51 +0000)]
[project @ 2002-02-07 12:51:47 by simonpj]
--------------------------------------------------
Slurp in a few more instance decls with ghc --make
--------------------------------------------------
ghc --make wasn't slurping in quite enough instance decls.
The relevant comment is in RnIfaces; the new part is marked.
George Russel's Uniform showed this up.
We slurp in an instance decl from the gated instance pool iff
all its gates are either in the gates of the module,
or are a previously-loaded tycon or class.
The latter constraint is because there might have been an instance
decl slurped in during an earlier compilation, like this:
instance Foo a => Baz (Maybe a) where ...
In the module being compiled we might need (Baz (Maybe T)), where T
is defined in this module, and hence we need (Foo T). So @Foo@ becomes
a gate. But there's no way to 'see' that.
NEW: More generally, types might be involved as well:
NEW: instance Foo2 T a => Baz2 a where ...
NEW:
NEW: Now we must treat T as a gate too, as well as Foo. So the solution
NEW: we adopt is:
NEW:
NEW: we simply treat all previously-loaded
NEW: tycons and classes as gates.
NEW:
NEW: This gloss only affects ghc --make and ghc --interactive.
simonpj [Thu, 7 Feb 2002 12:51:35 +0000 (12:51 +0000)]
[project @ 2002-02-07 12:51:34 by simonpj]
----------------------------------------------------
Make TcType.match and TcUnify.uUnboundVar kind-aware
----------------------------------------------------
George Russel had apparently-overlapping (ha) instance decls like
instance .. => C (a b) where
instance .. => C (x y) where
But the a,b and x,y were different kinds! Turned out that TcType.unify
was kind-aware (so we didn't report a duplicate instance decl, but TcType.match
was not (so we simply selected the wrong one, and got a mis-kinded constraint
popping up from the ".." part. Very exciting to track down.
I also make the ordinary unification kind-aware in the same way. It's
quite legitimate to attempt to unify, say,
(a b) with (c d)
but the unification should fail if a's kind differs from c's.
(There was a kind of debug warning before, but it's actually not an error
in the compiler... so it should just make unification fail gracefully.)
simonpj [Thu, 7 Feb 2002 12:50:47 +0000 (12:50 +0000)]
[project @ 2002-02-07 12:50:00 by simonpj]
Better pretty printing
simonmar [Thu, 7 Feb 2002 10:20:05 +0000 (10:20 +0000)]
[project @ 2002-02-07 10:20:05 by simonmar]
clean $(HC_OBJS) too
simonmar [Thu, 7 Feb 2002 10:15:39 +0000 (10:15 +0000)]
[project @ 2002-02-07 10:15:39 by simonmar]
- update some comments
- split up DERIVED_SRCS into separate variables so we can refer to
them separately in the specification of the various CLEAN_FILES
variables.
- only clean happy-generated files in maintainer-clean mode
sof [Thu, 7 Feb 2002 06:33:20 +0000 (06:33 +0000)]
[project @ 2002-02-07 06:33:20 by sof]
Little bit more doc on suspended_ccalling_threads
sof [Wed, 6 Feb 2002 20:52:51 +0000 (20:52 +0000)]
[project @ 2002-02-06 20:52:51 by sof]
unbreak stdcall handling (caused by recent change to Outputable instance for CCallConv)
simonpj [Wed, 6 Feb 2002 15:54:26 +0000 (15:54 +0000)]
[project @ 2002-02-06 15:54:23 by simonpj]
Eliminate all vestiages of UsageTy, in preparation for
Keith's new version. Hurrah!
Keith: LBVarInfo and usOnce,usMany are still there,
because I know you have eliminated LBVarInfo, and I didn't
want to cause unnecessary conflicts.
sewardj [Wed, 6 Feb 2002 15:48:56 +0000 (15:48 +0000)]
[project @ 2002-02-06 15:48:56 by sewardj]
x86 only: make %esp be 8-aligned before entering HC-world code.
This avoids misalignment penalties for C doubles stored on the C
stack. A quick test using nofib/imaginary/rfib shows that getting
this wrong increases run time by about 10% on our 1 GHz PIII.
keithw [Wed, 6 Feb 2002 12:12:26 +0000 (12:12 +0000)]
[project @ 2002-02-06 12:12:25 by keithw]
Merging the following onto the HEAD:
| 1.61.2.1 +2 -4 fptools/ghc/compiler/rename/RnHsSyn.lhs
| 1.135.2.1 +10 -0 fptools/ghc/compiler/rename/RnSource.lhs
Original comment (keithw):
Remove derivings FVs from tyClDeclFVs, because they aren't needed by
interface files. Instead, we return these FVs from
finishSourceTyClDecl.
simonmar [Wed, 6 Feb 2002 11:41:01 +0000 (11:41 +0000)]
[project @ 2002-02-06 11:41:01 by simonmar]
Take into account the patchlevel when figuring out if we're
bootstrapping or not.
sewardj [Wed, 6 Feb 2002 11:34:01 +0000 (11:34 +0000)]
[project @ 2002-02-06 11:34:01 by sewardj]
wibble
chak [Wed, 6 Feb 2002 11:19:51 +0000 (11:19 +0000)]
[project @ 2002-02-06 11:19:51 by chak]
Add Julian to the author's list as he seems to shy to do it himself ;-)
sewardj [Wed, 6 Feb 2002 11:13:49 +0000 (11:13 +0000)]
[project @ 2002-02-06 11:13:47 by sewardj]
Clean up the AbsC -> AbsC translation of array operations.
* MachOps MO_ReadOSBI and MO_WriteOSBI, which previously did
array indexing, are gone. We translate now just to plain
memory references and explicit address computations. This
has the happy side effect that all MachOps now return exactly
one result (previously it was 0 or 1), cleaning up various
bits of code.
As a result the Abstract C structure now contains an unneccessary
restriction, which is that the result of a MachOp can only be
assigned to a temporary. This made sense when MachOps had variable
numbers of results (0, 1 or 2, originally), but is no longer needed.
MachOps applied to args could now be allowed to appear as
arbitrary nodes in expression trees, but so far they are not.
* Get rid of CAddrMode constructor CMem, since it is a special case of
CVal with a RegRelative of CIndex.
AbstractC is inconsistent and non-orthogonal. The StixStmt + StixExpr
combination expresses a large part of what AbstractC does in a cleaner
and simpler way, IMO.
simonmar [Wed, 6 Feb 2002 11:00:58 +0000 (11:00 +0000)]
[project @ 2002-02-06 11:00:58 by simonmar]
Import lookupModuleEnv inside #ifdef GHCI
sof [Wed, 6 Feb 2002 01:29:27 +0000 (01:29 +0000)]
[project @ 2002-02-06 01:29:27 by sof]
- use task manager API to keep track of the number
of tasks that are blocked waiting on the RTS lock.
- comment updates/additions.
sof [Wed, 6 Feb 2002 01:26:14 +0000 (01:26 +0000)]
[project @ 2002-02-06 01:26:14 by sof]
- in the threaded case, keep track of the number of
tasks/threads that are currently waiting to enter
the RTS.
- taskStart():
+ only start up a new thread/task if there aren't
any already waiting to gain RTS access.
+ honour thread/task limits (if any).
sof [Wed, 6 Feb 2002 01:21:41 +0000 (01:21 +0000)]
[project @ 2002-02-06 01:21:40 by sof]
make stat_getElapsedTime(), SMP-only again
sewardj [Tue, 5 Feb 2002 16:56:39 +0000 (16:56 +0000)]
[project @ 2002-02-05 16:56:38 by sewardj]
[non-code-change] complaint --> compliant
keithw [Tue, 5 Feb 2002 16:44:37 +0000 (16:44 +0000)]
[project @ 2002-02-05 16:44:37 by keithw]
Generalise types of minusUFM and intersectUFM_C (this was applied long
ago to FiniteMap, IIRC).
Untested: I haven't got a build tree handy, so please shoot me if this
2-line change to two type signatures is type-incorrect. Sorry!
simonpj [Tue, 5 Feb 2002 15:42:11 +0000 (15:42 +0000)]
[project @ 2002-02-05 15:42:04 by simonpj]
---------
Main.main
---------
A bunch of related fixes concerning 'main'
* Arrange that 'main' doesn't need to be defined in module Main;
it can be imported.
* The typechecker now injects a binding
Main.$main = PrelTopHandler.runMain main
So the runtime system now calls Main.$main, not PrelMain.main.
With z-encoding, this look like
Main_zdmain_closure
* The function
PrelTopHandler.runMain :: IO a -> IO ()
wraps the programmer's 'main' in an exception-cacthing wrapper.
* PrelMain.hs and Main.hi-boot are both removed from lib/std, along
with multiple lines of special case handling in lib/std/Makefile.
This is a worthwhile cleanup.
* Since we now pick up whatever 'main' is in scope, the ranamer gets
in on the act (RnRnv.checkMain). There is a little more info to
get from the renamer to the typechecker, so I've defined a new type
Rename.RnResult (c.f. TcModule.TcResult)
* With GHCi, it's now a warning, not an error, to omit the binding
of main (RnEnv.checkMain)
* It would be easy to add a flag "-main-is foo"; the place to use
that information is in RnEnv.checkMain.
-------
On the way I made a new type,
type HscTypes.FixityEnv = NameEnv Fixity
and used it in various places I'd tripped over
simonpj [Tue, 5 Feb 2002 15:37:01 +0000 (15:37 +0000)]
[project @ 2002-02-05 15:37:01 by simonpj]
add renamer stuff
simonpj [Tue, 5 Feb 2002 15:34:32 +0000 (15:34 +0000)]
[project @ 2002-02-05 15:34:32 by simonpj]
Add a bit of renamer documentation
simonpj [Tue, 5 Feb 2002 15:02:24 +0000 (15:02 +0000)]
[project @ 2002-02-05 15:02:23 by simonpj]
Imports only
simonpj [Tue, 5 Feb 2002 14:46:27 +0000 (14:46 +0000)]
[project @ 2002-02-05 14:46:26 by simonpj]
Imports only
simonpj [Tue, 5 Feb 2002 14:43:35 +0000 (14:43 +0000)]
[project @ 2002-02-05 14:43:35 by simonpj]
Imports and comments only
simonpj [Tue, 5 Feb 2002 14:42:08 +0000 (14:42 +0000)]
[project @ 2002-02-05 14:39:24 by simonpj]
Imports only
simonmar [Tue, 5 Feb 2002 10:06:24 +0000 (10:06 +0000)]
[project @ 2002-02-05 10:06:24 by simonmar]
Fix bad bugs in deleteAllThreds: we were looping through the thread
queues calling deleteThread() on each thread as we go, but calling
deleteThread() has the side effect of removing the thread from the
relevant queue, so we would end up breaking out of the loop after
processing only a single thread.
This may fix problems like "resurrectThreads: thread blocked in a
strange way" seen after pressing ^C.
Aside: we really shouldn't be using deleteThread() at all, since it
doesn't give the thread a chance to clean up & release locks. To be
well-behaved a program has to catch ^C itself at the moment.
sof [Mon, 4 Feb 2002 22:17:50 +0000 (22:17 +0000)]
[project @ 2002-02-04 22:17:50 by sof]
.y/.ly handling: patsubst'ery broke when HAPPY_SRCS suddenly contained two file extensions; now fixed.
sof [Mon, 4 Feb 2002 20:56:53 +0000 (20:56 +0000)]
[project @ 2002-02-04 20:56:53 by sof]
resumeThread: ifdef threads-specific code
sof [Mon, 4 Feb 2002 20:40:37 +0000 (20:40 +0000)]
[project @ 2002-02-04 20:40:36 by sof]
Snapshot of 'native thread'-friendly extension:
- call-outs now work, i.e., a Concurrent Haskell thread which
makes an external (C) call no longer stop other CH threads
dead in their tracks. [More testing and tightening up of
invariants reqd, this is just a snapshot].
- separated task handling into sep. module.
sof [Mon, 4 Feb 2002 20:26:25 +0000 (20:26 +0000)]
[project @ 2002-02-04 20:26:25 by sof]
wibble
sof [Mon, 4 Feb 2002 20:25:39 +0000 (20:25 +0000)]
[project @ 2002-02-04 20:25:39 by sof]
startupHaskell: Scheduler startup now handles task creation
sof [Mon, 4 Feb 2002 20:24:14 +0000 (20:24 +0000)]
[project @ 2002-02-04 20:24:14 by sof]
Factor out the task handling into separate 'module'.
[Tasks represent native threads that execute STG code, with this
module providing the API which the Scheduler uses to control
their creation and destruction.]
sof [Mon, 4 Feb 2002 20:21:22 +0000 (20:21 +0000)]
[project @ 2002-02-04 20:21:16 by sof]
- sm_mutex is now a Mutex (not a pthread_mutex_t).
- sm_mutex lock/unlocks are only done for SMP builds.
sof [Mon, 4 Feb 2002 20:18:26 +0000 (20:18 +0000)]
[project @ 2002-02-04 20:18:26 by sof]
- renamed MutexVar to Mutex, CondVar to Condition.
- added yieldThread().
- simplified/specialised type of entry point to new (native) threads;
now takes no args & returns no result.
sof [Mon, 4 Feb 2002 20:14:56 +0000 (20:14 +0000)]
[project @ 2002-02-04 20:14:56 by sof]
simplified startup of this 'sub-system', initCapabilities() takes care of it all
sof [Mon, 4 Feb 2002 20:12:09 +0000 (20:12 +0000)]
[project @ 2002-02-04 20:12:08 by sof]
stat_getElapsedTime(): now visible when RTS_SUPPORTS_THREADS is defined (was: SMP only)
sof [Mon, 4 Feb 2002 20:10:47 +0000 (20:10 +0000)]
[project @ 2002-02-04 20:10:47 by sof]
moved {ACQUIRE,RELEASE}_LOCK to OSThreads.h
sewardj [Mon, 4 Feb 2002 17:09:02 +0000 (17:09 +0000)]
[project @ 2002-02-04 17:09:02 by sewardj]
Also implement MO_32U_to_8U for sparc. sigh.
sewardj [Mon, 4 Feb 2002 16:47:47 +0000 (16:47 +0000)]
[project @ 2002-02-04 16:47:47 by sewardj]
Implement missing MachOp, MO_8U_to_32U, for sparc. (duh!)
sewardj [Mon, 4 Feb 2002 16:30:20 +0000 (16:30 +0000)]
[project @ 2002-02-04 16:30:20 by sewardj]
Adding section descriptions, for ELF: don't record sections satisfying
size == 0
||
kind `notElem` [SECTIONKIND_CODE_OR_RODATA, SECTIONKIND_RWDATA]
The latter condition is really an optimisation based on knowledge of
what queries will be made of the table. Still, seems to work, and
reduces the number of sections in the list by about a factor of 3,
so hopefully will improve GC performance in GHCi.
If you get wierd GC problems in GHCi ... this may be to blame.
simonmar [Mon, 4 Feb 2002 13:59:48 +0000 (13:59 +0000)]
[project @ 2002-02-04 13:59:48 by simonmar]
wibble
sewardj [Mon, 4 Feb 2002 13:54:53 +0000 (13:54 +0000)]
[project @ 2002-02-04 13:54:53 by sewardj]
Expand out use of modifyIORef because 4.08.2 doesn't have that.
simonmar [Mon, 4 Feb 2002 12:23:02 +0000 (12:23 +0000)]
[project @ 2002-02-04 12:23:02 by simonmar]
HC_OPTS is now used in both .c and .hc compilations (again).
simonmar [Mon, 4 Feb 2002 12:22:33 +0000 (12:22 +0000)]
[project @ 2002-02-04 12:22:33 by simonmar]
GhcRtsHcOpts is included in both .c and .hc compilations (again).