ghc-hetmet.git
21 years ago[project @ 2003-03-31 12:22:11 by simonmar]
simonmar [Mon, 31 Mar 2003 12:22:11 +0000 (12:22 +0000)]
[project @ 2003-03-31 12:22:11 by simonmar]
Tweaks to make it work again (at least with 5.04.3)

Submitted by: Urban Boquist <boquist@crt.se>

21 years ago[project @ 2003-03-31 12:17:36 by simonmar]
simonmar [Mon, 31 Mar 2003 12:17:36 +0000 (12:17 +0000)]
[project @ 2003-03-31 12:17:36 by simonmar]
Fixes to the hc-file-bundle

Submitted by: Urban Boquist <boquist@crt.se>

21 years ago[project @ 2003-03-29 00:27:11 by sof]
sof [Sat, 29 Mar 2003 00:27:11 +0000 (00:27 +0000)]
[project @ 2003-03-29 00:27:11 by sof]
startTicker(): pass in the tick handler as an arg

21 years ago[project @ 2003-03-29 00:00:41 by sof]
sof [Sat, 29 Mar 2003 00:00:44 +0000 (00:00 +0000)]
[project @ 2003-03-29 00:00:41 by sof]
win32 tidyup: exclude Select.c, Itimer.c and Signals.c from SRCS

21 years ago[project @ 2003-03-28 23:46:39 by sof]
sof [Fri, 28 Mar 2003 23:46:40 +0000 (23:46 +0000)]
[project @ 2003-03-28 23:46:39 by sof]
block_vtalrm_signal() and unblock_vtalrm_signal(): unused, disable.

21 years ago[project @ 2003-03-28 15:47:15 by sof]
sof [Fri, 28 Mar 2003 15:47:15 +0000 (15:47 +0000)]
[project @ 2003-03-28 15:47:15 by sof]
fix ProjectVersion

21 years ago[project @ 2003-03-28 15:13:52 by sof]
sof [Fri, 28 Mar 2003 15:13:52 +0000 (15:13 +0000)]
[project @ 2003-03-28 15:13:52 by sof]
FIRST_BLOCK_OFF: more parens (for prec table illiterates like me)

21 years ago[project @ 2003-03-28 01:59:05 by sof]
sof [Fri, 28 Mar 2003 01:59:08 +0000 (01:59 +0000)]
[project @ 2003-03-28 01:59:05 by sof]
Off-by-one tidyup.

ALLOC_AP, ALLOC_PAP and MKAP were all being constructed
with size arguments equal to (1+number of args/FVs) in
ByteCodeGen.schemeE, only for Interpreter.c to subtract 1
when fishing out the payloads. This commit drops the
up-and-downery.

Simplification spotted by Andy Moran

21 years ago[project @ 2003-03-27 22:35:28 by sof]
sof [Thu, 27 Mar 2003 22:35:29 +0000 (22:35 +0000)]
[project @ 2003-03-27 22:35:28 by sof]
be gone

21 years ago[project @ 2003-03-27 17:59:09 by sof]
sof [Thu, 27 Mar 2003 17:59:12 +0000 (17:59 +0000)]
[project @ 2003-03-27 17:59:09 by sof]
NCG support for f.e.d. stdcall -- Literal.MachLabels now optionally carry
the size (in bytes) of the stack frame it expects, if known. That just
so happens to match what stdcall labels need to be annotated with when
emitting them in the NCG..

21 years ago[project @ 2003-03-27 13:54:31 by simonmar]
simonmar [Thu, 27 Mar 2003 13:54:32 +0000 (13:54 +0000)]
[project @ 2003-03-27 13:54:31 by simonmar]
Two performance tweaks:

  - Use specialised indirections, which perform the right kind of
    return without needing to enter the object they point to.  This
    saves a small percentages of memory reads.

  - Tweak the update code to generate better code with gcc.  This
    saves a few instructions per update.

21 years ago[project @ 2003-03-27 08:25:31 by simonpj]
simonpj [Thu, 27 Mar 2003 08:25:31 +0000 (08:25 +0000)]
[project @ 2003-03-27 08:25:31 by simonpj]
-------------------------------------
      Fix a wibble in default-type setting for TH
-------------------------------------

When a bunch of declarations contains no 'default' declaration,
we were setting 'defaultDefaultTys' as appropriate default types.
This isn't right for Template Haskell, which may have more than
one bunch of top-level decls.  (The bunches are separated by
top-level declaration splices.)

Instead, if there is no 'default' declaration we should do nothing.

21 years ago[project @ 2003-03-27 08:21:27 by simonpj]
simonpj [Thu, 27 Mar 2003 08:21:27 +0000 (08:21 +0000)]
[project @ 2003-03-27 08:21:27 by simonpj]
-------------------------------------
      Respect SPECIALISE pragmas in instance decls
-------------------------------------

For some time now we have simply been discarding SPECIALISE pragmas
in instance declarations.  I think this was my fault, at some point
when I was re-plumbing TcClassDcl.lhs, but it's been this way for
some time.

The only uses of this facility in the Prelude are in GHC/Float.lhs
and GHC/Real.lhs, which affected the efficiency of the Float and
Double instance of properFraction, floor, ceiling, etc.

Ah well, it's fixed now.

21 years ago[project @ 2003-03-27 08:18:21 by simonpj]
simonpj [Thu, 27 Mar 2003 08:18:21 +0000 (08:18 +0000)]
[project @ 2003-03-27 08:18:21 by simonpj]
Reduce tctrace verbosity

21 years ago[project @ 2003-03-27 08:16:29 by simonpj]
simonpj [Thu, 27 Mar 2003 08:17:59 +0000 (08:17 +0000)]
[project @ 2003-03-27 08:16:29 by simonpj]
Import wibbles

21 years ago[project @ 2003-03-26 18:59:34 by sof]
sof [Wed, 26 Mar 2003 18:59:34 +0000 (18:59 +0000)]
[project @ 2003-03-26 18:59:34 by sof]
allocatePinned(): move large-object check to the front

21 years ago[project @ 2003-03-26 17:43:05 by sof]
sof [Wed, 26 Mar 2003 17:43:05 +0000 (17:43 +0000)]
[project @ 2003-03-26 17:43:05 by sof]
bring rts_mainLazyIO() into scope

21 years ago[project @ 2003-03-26 17:40:57 by sof]
sof [Wed, 26 Mar 2003 17:40:58 +0000 (17:40 +0000)]
[project @ 2003-03-26 17:40:57 by sof]
wibbles - drop references to PleaseStopAllocating(), use CloseNursery() to express ExtendNursery()

21 years ago[project @ 2003-03-26 17:33:49 by sof]
sof [Wed, 26 Mar 2003 17:33:49 +0000 (17:33 +0000)]
[project @ 2003-03-26 17:33:49 by sof]
initStorage(): sm_mutex not correctly initialised (guess no one's done an SMP build for the past 12 months :)

21 years ago[project @ 2003-03-26 15:56:25 by simonmar]
simonmar [Wed, 26 Mar 2003 15:56:25 +0000 (15:56 +0000)]
[project @ 2003-03-26 15:56:25 by simonmar]
Add __attribute__((regparm(1))) to evacuate()'s prototype.  This
avoids a lot of stack assignments between scavenge() and
evacuate().  Performance isn't affected measurably, though.

21 years ago[project @ 2003-03-26 14:52:02 by simonmar]
simonmar [Wed, 26 Mar 2003 14:52:02 +0000 (14:52 +0000)]
[project @ 2003-03-26 14:52:02 by simonmar]
Fix bug in previous two commits: must check HEAP_ALLOCED() before
using Bdescr().

21 years ago[project @ 2003-03-26 12:33:10 by simonmar]
simonmar [Wed, 26 Mar 2003 12:33:11 +0000 (12:33 +0000)]
[project @ 2003-03-26 12:33:10 by simonmar]
Check for the rlim_t type

21 years ago[project @ 2003-03-26 02:12:38 by sof]
sof [Wed, 26 Mar 2003 02:12:38 +0000 (02:12 +0000)]
[project @ 2003-03-26 02:12:38 by sof]
gen_map_mblocks(): add comment re: issues that need to be addressed should anyone want to tackle the ToDo item

21 years ago[project @ 2003-03-25 18:00:19 by sof]
sof [Tue, 25 Mar 2003 18:00:19 +0000 (18:00 +0000)]
[project @ 2003-03-25 18:00:19 by sof]
bring rts_mainLazyIO() into scope

21 years ago[project @ 2003-03-25 17:58:47 by sof]
sof [Tue, 25 Mar 2003 17:58:51 +0000 (17:58 +0000)]
[project @ 2003-03-25 17:58:47 by sof]
to ease replacement of the underlying allocator used by stgMallocBytes() and friends, provide (&use) RtsUtils.c:stgFree()

21 years ago[project @ 2003-03-25 17:26:08 by sof]
sof [Tue, 25 Mar 2003 17:26:09 +0000 (17:26 +0000)]
[project @ 2003-03-25 17:26:08 by sof]
wibble wrt stgMallocBytes()

21 years ago[project @ 2003-03-25 17:24:30 by sof]
sof [Tue, 25 Mar 2003 17:24:30 +0000 (17:24 +0000)]
[project @ 2003-03-25 17:24:30 by sof]
msTime(): only used with PAR

21 years ago[project @ 2003-03-25 17:23:05 by sof]
sof [Tue, 25 Mar 2003 17:23:05 +0000 (17:23 +0000)]
[project @ 2003-03-25 17:23:05 by sof]
leave out unused statics when not using BFD

21 years ago[project @ 2003-03-25 17:22:27 by simonmar]
simonmar [Tue, 25 Mar 2003 17:22:27 +0000 (17:22 +0000)]
[project @ 2003-03-25 17:22:27 by simonmar]
Update ghc-pkg documentation w.r.t. multiple config files, and add
documentation for 'auto' packages.

21 years ago[project @ 2003-03-25 17:15:07 by sof]
sof [Tue, 25 Mar 2003 17:15:07 +0000 (17:15 +0000)]
[project @ 2003-03-25 17:15:07 by sof]
code wibbles

21 years ago[project @ 2003-03-25 17:04:09 by sof]
sof [Tue, 25 Mar 2003 17:04:09 +0000 (17:04 +0000)]
[project @ 2003-03-25 17:04:09 by sof]
BCO_INSTRS() is no more

21 years ago[project @ 2003-03-25 16:50:18 by simonmar]
simonmar [Tue, 25 Mar 2003 16:50:18 +0000 (16:50 +0000)]
[project @ 2003-03-25 16:50:18 by simonmar]
Handle multiple config files correctly.  Now it is possible to specify
a dependency on a package in another config file, and --list-packages
lists all the packages in each file.

The last file mentioned on the command line is the one to which
updates are applied, packages are added, etc.

21 years ago[project @ 2003-03-25 16:19:55 by sof]
sof [Tue, 25 Mar 2003 16:19:56 +0000 (16:19 +0000)]
[project @ 2003-03-25 16:19:55 by sof]
wibble - move LARGE_OBJECT_THRESHOLD from Constants.h to Block.h, as it's defined in terms of Block.h defines

21 years ago[project @ 2003-03-25 16:06:39 by sof]
sof [Tue, 25 Mar 2003 16:06:39 +0000 (16:06 +0000)]
[project @ 2003-03-25 16:06:39 by sof]
upd MAX_SPEC_SELECTEE_SIZE comment

21 years ago[project @ 2003-03-25 09:40:06 by simonmar]
simonmar [Tue, 25 Mar 2003 09:40:06 +0000 (09:40 +0000)]
[project @ 2003-03-25 09:40:06 by simonmar]
Update the out-of-memory error message: the request size isn't known
any more.

21 years ago[project @ 2003-03-24 16:18:26 by simonmar]
simonmar [Mon, 24 Mar 2003 16:18:26 +0000 (16:18 +0000)]
[project @ 2003-03-24 16:18:26 by simonmar]
warning elimination

21 years ago[project @ 2003-03-24 15:33:25 by simonmar]
simonmar [Mon, 24 Mar 2003 15:33:25 +0000 (15:33 +0000)]
[project @ 2003-03-24 15:33:25 by simonmar]
A couple of changes related to bug #2 in the previous commit:

 - follow IND_STATICs, now that we can check whether
   we end up in to-space or not

 - improve the commentary

21 years ago[project @ 2003-03-24 14:46:53 by simonmar]
simonmar [Mon, 24 Mar 2003 14:46:57 +0000 (14:46 +0000)]
[project @ 2003-03-24 14:46:53 by simonmar]
Fix some bugs in compacting GC.

Bug 1: When threading the fields of an AP or PAP, we were grabbing the
info table of the function without unthreading it first.

Bug 2: eval_thunk_selector() might accidentally find itself in
to-space when going through indirections in a compacted generation.
We must check for this case and bale out if necessary.

Bug 3: This is somewhat more nasty.  When we have an AP or PAP that
points to a BCO, the layout info for the AP/PAP is in the BCO's
instruction array, which is two objects deep from the AP/PAP itself.
The trouble is, during compacting GC, we can only safely look one
object deep from the current object, because pointers from objects any
deeper might have been already updated to point to their final
destinations.

The solution is to put the arity and bitmap info for a BCO into the
BCO object itself.  This means BCOs become variable-length, which is a
slight annoyance, but it also means that looking up the arity/bitmap
is quicker.  There is a slight reduction in complexity in the byte
code generator due to not having to stuff the bitmap at the front of
the instruction stream.

21 years ago[project @ 2003-03-24 11:23:20 by simonmar]
simonmar [Mon, 24 Mar 2003 11:23:21 +0000 (11:23 +0000)]
[project @ 2003-03-24 11:23:20 by simonmar]
#ifdef some more code that belongs to the old strictness analyser.

It turns out we were still compiling the Demand and SaLib modules,
which aren't required unless OLD_STRICTNESS is on (do we still need
OLD_STRICTNESS?).

21 years ago[project @ 2003-03-22 06:28:58 by sof]
sof [Sat, 22 Mar 2003 06:28:58 +0000 (06:28 +0000)]
[project @ 2003-03-22 06:28:58 by sof]
dsForeigns: common up header files

21 years ago[project @ 2003-03-21 16:18:37 by sof]
sof [Fri, 21 Mar 2003 16:18:39 +0000 (16:18 +0000)]
[project @ 2003-03-21 16:18:37 by sof]
Friday morning code-wibbling:
- made RetainerProfile.c:firstStack a 'static'
- added RetainerProfile.c:retainerStackBlocks()

21 years ago[project @ 2003-03-21 15:48:06 by sof]
sof [Fri, 21 Mar 2003 15:48:06 +0000 (15:48 +0000)]
[project @ 2003-03-21 15:48:06 by sof]
drop FILE_SIZE (hasn't been needed by NCG for the past 5 years or so)

21 years ago[project @ 2003-03-21 15:45:56 by sof]
sof [Fri, 21 Mar 2003 15:45:56 +0000 (15:45 +0000)]
[project @ 2003-03-21 15:45:56 by sof]
reliably clean out mk* binaries

21 years ago[project @ 2003-03-21 13:54:27 by simonmar]
simonmar [Fri, 21 Mar 2003 13:54:28 +0000 (13:54 +0000)]
[project @ 2003-03-21 13:54:27 by simonmar]
Modifications to the way we calculate CafInfo during tidying (again).

The previous hack of setting the CafInfo on all non-top-level bindings
to NoCafRefs was a hack, and it came back to bite us: when CorePrep
floats out a let to the top level it doesn't create a new binding, and
the existing let binder happens to say NoCafRefs which is unsafe.  It
was caught by an ASSERT in the CoreToStg when compiling the libraries
without -O - compiling without -O tends to result in more
opportunities for CorePrep to float things to the top level.

Now, we calculate CafInfo on the pre-tidied expressions, using the
mapping from Ids to Ids that is being built up during tidying.  This
avoids one loop, but will be slightly slower due to the extra lookups.
However, it means we don't need to set the CafInfo on non-top-level
binders to NoCafRefs.

21 years ago[project @ 2003-03-21 10:59:20 by simonmar]
simonmar [Fri, 21 Mar 2003 10:59:20 +0000 (10:59 +0000)]
[project @ 2003-03-21 10:59:20 by simonmar]
GNU ar seems to have trouble with duplicate object file names if you
use the 's' modifier, so detect GNU ar here and use a simple 'ar q'
command to create archives.

This bug was tickled when I replaced an 'ar q' with '$(AR)' in
target.mk yesterday: the default $(AR) is 'ar clqs'.

21 years ago[project @ 2003-03-21 09:22:28 by simonpj]
simonpj [Fri, 21 Mar 2003 09:22:28 +0000 (09:22 +0000)]
[project @ 2003-03-21 09:22:28 by simonpj]
Notes about constructor info tables

21 years ago[project @ 2003-03-20 15:56:31 by simonmar]
simonmar [Thu, 20 Mar 2003 15:56:31 +0000 (15:56 +0000)]
[project @ 2003-03-20 15:56:31 by simonmar]
replace one instance of ar with $(AR).

21 years ago[project @ 2003-03-20 15:43:31 by simonmar]
simonmar [Thu, 20 Mar 2003 15:43:31 +0000 (15:43 +0000)]
[project @ 2003-03-20 15:43:31 by simonmar]
Out of memory should be a belch(), not a barf().

21 years ago[project @ 2003-03-20 12:32:22 by simonmar]
simonmar [Thu, 20 Mar 2003 12:32:22 +0000 (12:32 +0000)]
[project @ 2003-03-20 12:32:22 by simonmar]
Compile libraries with -O

21 years ago[project @ 2003-03-20 12:20:06 by simonpj]
simonpj [Thu, 20 Mar 2003 12:20:06 +0000 (12:20 +0000)]
[project @ 2003-03-20 12:20:06 by simonpj]
----------------------------------
      Fix a long-standing egregious CorePrep bug
----------------------------------

**** Merge to Stable branch ****

CorePrep was eta-reducing

\x -> (# a,x #)
to
(#,#) a

which is utterly wrong.  Easily fixed though.

21 years ago[project @ 2003-03-20 11:53:57 by simonmar]
simonmar [Thu, 20 Mar 2003 11:53:57 +0000 (11:53 +0000)]
[project @ 2003-03-20 11:53:57 by simonmar]
Reformat this section a bit, and add a note about the poor performance
of mutable arrays in the garbage collector.

21 years ago[project @ 2003-03-20 08:52:55 by simonpj]
simonpj [Thu, 20 Mar 2003 08:52:55 +0000 (08:52 +0000)]
[project @ 2003-03-20 08:52:55 by simonpj]
Correct file names in RULES documentation

21 years ago[project @ 2003-03-19 19:07:31 by sof]
sof [Wed, 19 Mar 2003 19:07:31 +0000 (19:07 +0000)]
[project @ 2003-03-19 19:07:31 by sof]
threadLabels: not public

21 years ago[project @ 2003-03-19 18:56:14 by sof]
sof [Wed, 19 Mar 2003 18:56:14 +0000 (18:56 +0000)]
[project @ 2003-03-19 18:56:14 by sof]
protoize heapCheckFail()

21 years ago[project @ 2003-03-19 18:41:18 by sof]
sof [Wed, 19 Mar 2003 18:41:20 +0000 (18:41 +0000)]
[project @ 2003-03-19 18:41:18 by sof]
drop Main.h

21 years ago[project @ 2003-03-19 18:33:31 by sof]
sof [Wed, 19 Mar 2003 18:33:31 +0000 (18:33 +0000)]
[project @ 2003-03-19 18:33:31 by sof]
no longer used

21 years ago[project @ 2003-03-19 17:33:29 by wolfgang]
wolfgang [Wed, 19 Mar 2003 17:33:29 +0000 (17:33 +0000)]
[project @ 2003-03-19 17:33:29 by wolfgang]
Correct error in MacOS-specific configure code.

21 years ago[project @ 2003-03-18 14:36:56 by simonmar]
simonmar [Tue, 18 Mar 2003 14:36:56 +0000 (14:36 +0000)]
[project @ 2003-03-18 14:36:56 by simonmar]
Fix a profiling crash on Windows.

fprint_ccs used snprintf() to avoid overflowing a buffer; on mingw32
where snprintf() doesn't exist we were just using the straight
sprintf(), which inevitably lead to a crash.  Rewritten to use a
homegrown non-overflowing string copying function - it actually looks
nicer now, anwyay.

21 years ago[project @ 2003-03-18 10:28:15 by simonmar]
simonmar [Tue, 18 Mar 2003 10:28:15 +0000 (10:28 +0000)]
[project @ 2003-03-18 10:28:15 by simonmar]
This should have been committed along with rev. 1.36 of Main.c (and
others) yesterday, but for some reason it got left out.

Change the way Main.main is run, so it now doesn't force the return
value.  Now 'main = return undefined' will run and exit successfully.

The change affects finalizers too - but since they have type IO (), it
won't do any harm not to evaluate the ().

21 years ago[project @ 2003-03-18 10:12:37 by simonmar]
simonmar [Tue, 18 Mar 2003 10:12:37 +0000 (10:12 +0000)]
[project @ 2003-03-18 10:12:37 by simonmar]
Fix wibble in previous commit (fixes broken bootstrap)

21 years ago[project @ 2003-03-17 14:51:00 by simonmar]
simonmar [Mon, 17 Mar 2003 14:51:00 +0000 (14:51 +0000)]
[project @ 2003-03-17 14:51:00 by simonmar]
Fix for lexing of floating point numbers.  '9e2' should be a float.

Noticed-by: Ross Paterson.

21 years ago[project @ 2003-03-17 14:47:47 by simonmar]
simonmar [Mon, 17 Mar 2003 14:47:48 +0000 (14:47 +0000)]
[project @ 2003-03-17 14:47:47 by simonmar]
Haskell quiz:  what should this program do?

  main = return undefined

answer: run to completion and exit successfully.  GHC erroneously
evaluates the returned value from main, which causes this example to
fail with an uncaught exception (the evaluation is even done outside
of the main exception handler!).

21 years ago[project @ 2003-03-16 14:15:21 by igloo]
igloo [Sun, 16 Mar 2003 14:15:22 +0000 (14:15 +0000)]
[project @ 2003-03-16 14:15:21 by igloo]
Support for contexts on data types and records from Derek Elkins.

21 years ago[project @ 2003-03-14 16:51:59 by simonmar]
simonmar [Fri, 14 Mar 2003 16:51:59 +0000 (16:51 +0000)]
[project @ 2003-03-14 16:51:59 by simonmar]
Fix tryM for GHC 5.00.x and 5.02.x.

21 years ago[project @ 2003-03-11 12:26:14 by stolz]
stolz [Tue, 11 Mar 2003 12:26:14 +0000 (12:26 +0000)]
[project @ 2003-03-11 12:26:14 by stolz]
Add comment about lack of instance-support in .hi-boot

21 years ago[project @ 2003-03-11 10:34:58 by simonmar]
simonmar [Tue, 11 Mar 2003 10:34:58 +0000 (10:34 +0000)]
[project @ 2003-03-11 10:34:58 by simonmar]
- Remove mention of MutableByteArray and ByteArray

- Add section on memory allocation in the FFI, with emphasis on how
  GHC's implementations of the various kinds of allocation perform.

21 years ago[project @ 2003-03-11 09:16:02 by simonpj]
simonpj [Tue, 11 Mar 2003 09:16:02 +0000 (09:16 +0000)]
[project @ 2003-03-11 09:16:02 by simonpj]
----------------------------------
      Fix a long-standing egregious parser bug
----------------------------------

*** MERGE TO STABLE ***

*** NB: the important part of this commit
*** got committed by accident with an
*** unrelated message.  This commit
*** should be from rev 1.50 to 1.52 of RdrHsSyn

GHC has parsed

data T String = T String

without complaint, ever since day 1!  This led to consequential
incomprehensible messages.  The fix is easy.

21 years ago[project @ 2003-03-11 09:08:38 by simonpj]
simonpj [Tue, 11 Mar 2003 09:08:38 +0000 (09:08 +0000)]
[project @ 2003-03-11 09:08:38 by simonpj]
Document external core a bit more

21 years ago[project @ 2003-03-11 09:07:15 by simonpj]
simonpj [Tue, 11 Mar 2003 09:07:15 +0000 (09:07 +0000)]
[project @ 2003-03-11 09:07:15 by simonpj]
Restructure documentation about undecidable instances

21 years ago[project @ 2003-03-11 09:04:59 by simonpj]
simonpj [Tue, 11 Mar 2003 09:05:00 +0000 (09:05 +0000)]
[project @ 2003-03-11 09:04:59 by simonpj]
Buglet in external-core parsing

21 years ago[project @ 2003-03-10 13:27:34 by simonmar]
simonmar [Mon, 10 Mar 2003 13:27:34 +0000 (13:27 +0000)]
[project @ 2003-03-10 13:27:34 by simonmar]
Use STK_CHK_NP rather than STK_CHK_GEN in the entry code for AP and
AP_STACK thunks.

The reason is that if the check fails, on return the closure might
have been blackholed (perhaps due to lazy blackholing, or even because
another thread has entered it), so we *must* enter the closure to
continue, rather than just continuing at the original entry point.

All compiler-generated thunks do this anyway, I think these are the
only cases of thunks which don't follow the rule.

Thanks to Robert Ennals for spotting, and correctly diagnosing, the
bug.

21 years ago[project @ 2003-03-10 12:48:10 by stolz]
stolz [Mon, 10 Mar 2003 12:48:10 +0000 (12:48 +0000)]
[project @ 2003-03-10 12:48:10 by stolz]
Fix typo

21 years ago[project @ 2003-03-10 10:30:26 by umuta]
umuta [Mon, 10 Mar 2003 10:30:26 +0000 (10:30 +0000)]
[project @ 2003-03-10 10:30:26 by umuta]
Fix compilation problem on mingw32

21 years ago[project @ 2003-03-07 13:37:15 by simonpj]
simonpj [Fri, 7 Mar 2003 13:37:15 +0000 (13:37 +0000)]
[project @ 2003-03-07 13:37:15 by simonpj]
Minor wording

21 years ago[project @ 2003-03-07 13:36:59 by simonpj]
simonpj [Fri, 7 Mar 2003 13:36:59 +0000 (13:36 +0000)]
[project @ 2003-03-07 13:36:59 by simonpj]
Update docs on class method types

21 years ago[project @ 2003-03-07 13:36:00 by simonpj]
simonpj [Fri, 7 Mar 2003 13:36:28 +0000 (13:36 +0000)]
[project @ 2003-03-07 13:36:00 by simonpj]
Markup glitch

21 years ago[project @ 2003-03-07 11:22:06 by simonmar]
simonmar [Fri, 7 Mar 2003 11:22:06 +0000 (11:22 +0000)]
[project @ 2003-03-07 11:22:06 by simonmar]
Oops, byteCodeGen should get the bindings from CorePrep, not CoreTidy
(should fix last night's GHCi breakage).

21 years ago[project @ 2003-03-06 15:23:35 by ross]
ross [Thu, 6 Mar 2003 15:23:35 +0000 (15:23 +0000)]
[project @ 2003-03-06 15:23:35 by ross]
some rearrangement.

21 years ago[project @ 2003-03-06 15:16:31 by ross]
ross [Thu, 6 Mar 2003 15:16:31 +0000 (15:16 +0000)]
[project @ 2003-03-06 15:16:31 by ross]
also install libraries.html

21 years ago[project @ 2003-03-06 13:24:46 by ross]
ross [Thu, 6 Mar 2003 13:24:46 +0000 (13:24 +0000)]
[project @ 2003-03-06 13:24:46 by ross]
notes for Hugs

21 years ago[project @ 2003-03-06 13:24:08 by ross]
ross [Thu, 6 Mar 2003 13:24:08 +0000 (13:24 +0000)]
[project @ 2003-03-06 13:24:08 by ross]
generate docs/libraries.html

21 years ago[project @ 2003-03-06 12:03:34 by simonmar]
simonmar [Thu, 6 Mar 2003 12:03:34 +0000 (12:03 +0000)]
[project @ 2003-03-06 12:03:34 by simonmar]
Split off the hierarchical libraries page, so the Hugs folks can use it too.

21 years ago[project @ 2003-03-05 10:22:22 by simonmar]
simonmar [Wed, 5 Mar 2003 10:22:22 +0000 (10:22 +0000)]
[project @ 2003-03-05 10:22:22 by simonmar]
Duh.  hsc2hs should be in $(GhcBinDistShScripts), not
$(GhcBinDistBins), otherwise it doesn't get the right directories
tacked on the front at installation time.  Strange that nobody
complained that hsc2hs wasn't working from a binary dist *shrug*.

21 years ago[project @ 2003-03-04 11:12:11 by simonmar]
simonmar [Tue, 4 Mar 2003 11:12:11 +0000 (11:12 +0000)]
[project @ 2003-03-04 11:12:11 by simonmar]
Make it compile again with 5.04.x

21 years ago[project @ 2003-03-04 10:39:58 by simonmar]
simonmar [Tue, 4 Mar 2003 10:39:59 +0000 (10:39 +0000)]
[project @ 2003-03-04 10:39:58 by simonmar]
Fix compilation breakage with GHC 4.08.x.

21 years ago[project @ 2003-03-04 01:29:25 by sof]
sof [Tue, 4 Mar 2003 01:29:25 +0000 (01:29 +0000)]
[project @ 2003-03-04 01:29:25 by sof]
win32/Ticker.c:startTicker(),
win32/IOManager.c:NewIOWorkerThread():
  pass in non-NULL pointer to _beginthreadex()'s outgoing thread ID arg.
  Needed to work with Win9x's impl of CreateThread().

21 years ago[project @ 2003-03-03 12:43:31 by simonmar]
simonmar [Mon, 3 Mar 2003 12:43:42 +0000 (12:43 +0000)]
[project @ 2003-03-03 12:43:31 by simonmar]
A round of space-leak fixing.

  - re-instate zapping of the PersistentCompilerState at various
    points during the compilation cycle in HscMain.  This affects
    one-shot compilation only, since in this mode the information
    collected in the PCS is not required after creating the final
    interface file.

  - Unravel the recursive dependency between MkIface and
    CoreTidy/CoreToStg.  Previously the CafInfo for each binding was
    calculated by CoreToStg, and fed back into the IdInfo of the Ids
    generated by CoreTidy (an earlier pass).  MkIface then took this
    IdInfo and the bindings from CoreTidy to generate the interface;
    but it couldn't do this until *after* CoreToStg, because the CafInfo
    hadn't been calculated yet.  The result was that the CoreTidy
    output lived until after CoreToStg, and at the same time as the
    CorePrep and STG syntax, which is wasted space, not to mention
    the complexity and general ugliness in HscMain.

    So now we calculate CafInfo directly in CoreTidy.  The downside is
    that we have to predict what CorePrep is going to do to the
    bindings so we can tell what will turn into a CAF later, but it's
    no worse than before (it turned out that we were doing this
    prediction before in CoreToStg anyhow).

  - The typechecker lazilly typechecks unfoldings.  It turns out that
    this is a good idea from a performance perspective, but it also
    means that it must hang on to all the information it needs to
    do the typechecking.  Previously this meant holding on to the
    whole of the typechecker's environment, which includes all sorts
    of stuff which isn't necessary to typecheck unfoldings.  By paring
    down the environment captured by the lazy unfoldings, we can
    save quite a bit of space in the phases after typechecking.

21 years ago[project @ 2003-03-03 12:31:55 by simonmar]
simonmar [Mon, 3 Mar 2003 12:31:55 +0000 (12:31 +0000)]
[project @ 2003-03-03 12:31:55 by simonmar]
Use listArray rather than array in (un)?boxedTupleArr.

21 years ago[project @ 2003-03-03 12:30:59 by simonmar]
simonmar [Mon, 3 Mar 2003 12:30:59 +0000 (12:30 +0000)]
[project @ 2003-03-03 12:30:59 by simonmar]
Remove unused export.

21 years ago[project @ 2003-03-03 12:30:39 by simonmar]
simonmar [Mon, 3 Mar 2003 12:30:39 +0000 (12:30 +0000)]
[project @ 2003-03-03 12:30:39 by simonmar]
underscore some variables that aren't used.

21 years ago[project @ 2003-03-03 12:30:11 by simonmar]
simonmar [Mon, 3 Mar 2003 12:30:11 +0000 (12:30 +0000)]
[project @ 2003-03-03 12:30:11 by simonmar]
Compilation fix after recent addition of environment stuff to System.Posix.

21 years ago[project @ 2003-02-26 17:04:11 by simonpj]
simonpj [Wed, 26 Feb 2003 17:04:16 +0000 (17:04 +0000)]
[project @ 2003-02-26 17:04:11 by simonpj]
----------------------------------
Improve higher-rank type inference
----------------------------------

Yanling Wang pointed out that if we have

f = \ (x :: forall a. a->a). x

it would be reasonable to expect that type inference would get the "right"
rank-2 type for f.  She also found that the plausible definition

f :: (forall a. a->a) = \x -> x

acutally failed to type check.

This commit fixes up TcBinds.tcMonoBinds so that it does a better job.
The main idea is that there are three cases to consider in a function binding:

  a) 'f' has a separate type signature
In this case, we know f's type everywhere

  b) The binding is recursive, and there is no type sig
In this case we must give f a monotype in its RHS

  c) The binding is non-recursive, and there is no type sig
Then we do not need to add 'f' to the envt, and can
simply infer a type for the RHS, which may be higher
ranked.

21 years ago[project @ 2003-02-24 13:12:08 by simonmar]
simonmar [Mon, 24 Feb 2003 13:12:08 +0000 (13:12 +0000)]
[project @ 2003-02-24 13:12:08 by simonmar]
Remove mention of man pages, which we don't have, and clarify a couple
of other things while I'm here.

21 years ago[project @ 2003-02-24 12:44:38 by simonpj]
simonpj [Mon, 24 Feb 2003 12:44:38 +0000 (12:44 +0000)]
[project @ 2003-02-24 12:44:38 by simonpj]
*** My last commit had a bogus commit message **
*** This is the right one.  I've appended the **
*** list of files changed as well.

-------------------------------------
   Fix up HOST/TARGET_OS ifdefs
-------------------------------------

Sigbjorn and Simon helped me to understand when it's appropriate to
say 'ifdef mingw32_HOST_OS' and when 'ifdef mingw32_TARGET_OS'.  I've
documented this in the building guide.

I've fixed up the ifdefs I erroneously changed last week, in this
commit.  I'm not certain about all of them.  For examples, in
DriverPhases there's an ifdef that deals with filename suffices.
Should this be the filename suffices for the system on which GHC runs
(HOST), or the system on which the compiled code will run (TARGET)?
Currently it's the latter.

Similarly, there's some path mangling ('/' vs '\') in DriverState:
should this be for the system on which GHC runs (HOST) or the system
on which the compiled code will run (TARGET)?  Currently the former.

I think some of the darwin_TARGET_OS should be darwin_HOST_OS's.

Finally, for the GHCi stuff we require that HOST_OS = TARGET_OS.  Rather than
make an arbitrary choice in (e.g.) Linker.lhs, it's be better to say
'#ifdef mingw32_OS', and arrange that this macro is set only in stage-2.
I have not done this.

I think these are 'right'.  But I'm not sure the filename mangling is
consistent throughout.

[Changes in the original commit, which had a bogus message.]

  Revision  Changes    Path
  1.46      +30 -0     fptools/docs/building/building.sgml
  1.148     +4 -4      fptools/ghc/compiler/ghci/InteractiveUI.hs
  1.114     +2 -2      fptools/ghc/compiler/main/DriverFlags.hs
  1.23      +3 -1      fptools/ghc/compiler/main/DriverPhases.hs
  1.85      +11 -11    fptools/ghc/compiler/main/SysTools.lhs
  1.20      +3 -3      fptools/ghc/compiler/utils/Panic.lhs

21 years ago[project @ 2003-02-24 12:39:24 by simonpj]
simonpj [Mon, 24 Feb 2003 12:39:27 +0000 (12:39 +0000)]
[project @ 2003-02-24 12:39:24 by simonpj]
Three Template Haskell improvements

a) Add type synonyms to THSyntax (and DsMeta, Convert)

b) Make Q into a newtype instead of a type synonym

c) Eliminate tiresome and error prone argument to DsMeta.wrapGenSyms
   and similarly addTyVarBinds

21 years ago[project @ 2003-02-22 06:13:41 by sof]
sof [Sat, 22 Feb 2003 06:13:41 +0000 (06:13 +0000)]
[project @ 2003-02-22 06:13:41 by sof]
bring getourtimeofday() proto into scope

21 years ago[project @ 2003-02-22 04:51:50 by sof]
sof [Sat, 22 Feb 2003 04:51:58 +0000 (04:51 +0000)]
[project @ 2003-02-22 04:51:50 by sof]
Clean up code&interfaces that deals with timers and asynchrony:

- Timer.{c,h} now defines the platform-independent interface
  to the timing services needed by the RTS. Itimer.{c,h} +
  win32/Ticker.{c,h} defines the OS-specific services that
  creates/destroys a timer.
- For win32 plats, drop the long-standing use of the 'multimedia'
  API timers and implement the ticking service ourselves. Simpler
  and more flexible.
- Select.c is now solely for platforms that use select() to handle
  non-blocking I/O & thread delays. win32/AwaitEvent.c provides
  the same API on the Win32 side.
- support threadDelay on win32 platforms via worker threads.

Not yet compiled up on non-win32 platforms; will do once checked in.

21 years ago[project @ 2003-02-21 14:52:54 by simonpj]
simonpj [Fri, 21 Feb 2003 14:52:55 +0000 (14:52 +0000)]
[project @ 2003-02-21 14:52:54 by simonpj]
Typos

21 years ago[project @ 2003-02-21 14:52:31 by simonpj]
simonpj [Fri, 21 Feb 2003 14:52:31 +0000 (14:52 +0000)]
[project @ 2003-02-21 14:52:31 by simonpj]
Fix buglets in new unused-binding story

21 years ago[project @ 2003-02-21 13:35:18 by simonpj]
simonpj [Fri, 21 Feb 2003 13:35:18 +0000 (13:35 +0000)]
[project @ 2003-02-21 13:35:18 by simonpj]
Use old-style foreign import for bkwd compatibility