ghc-hetmet.git
22 years ago[project @ 2001-08-08 09:48:58 by chak]
chak [Wed, 8 Aug 2001 09:48:59 +0000 (09:48 +0000)]
[project @ 2001-08-08 09:48:58 by chak]
As discussed at HIM in Cambridge, the GHC Commentary is now located in the
main repository.  The idea is that any developer who wants to share his wisdom
with the world-at-large can alter the document.  Obviously, it would be nice
to keep the structure and style of the document as I have written it so far
(admittedly not terribly much).  In particular, please add links to the files
in CVS where appropriate.  Moreover, I have now included a version number in
the title, which should be pumped whenever there are substantial changes;
check the file index.html.

I am planing to set up a cron job that updates the version of the Commentary
on my Web page with the CVS version every night (this is also the version
linked from GHC's documentation page).

22 years ago[project @ 2001-08-08 08:44:47 by simonmar]
simonmar [Wed, 8 Aug 2001 08:44:47 +0000 (08:44 +0000)]
[project @ 2001-08-08 08:44:47 by simonmar]
Nuke the "Compilation had errors" message again.

22 years ago[project @ 2001-08-07 20:10:30 by ken]
ken [Tue, 7 Aug 2001 20:10:30 +0000 (20:10 +0000)]
[project @ 2001-08-07 20:10:30 by ken]
Back up previous change, which was not really a fix of any bug, let alone
the bug it seemed to have fixed.

22 years ago[project @ 2001-08-07 20:08:37 by ken]
ken [Tue, 7 Aug 2001 20:08:37 +0000 (20:08 +0000)]
[project @ 2001-08-07 20:08:37 by ken]
Change the number of threads to spawn in this test from 1000000 to 10000000,
to (more likely) trigger the Alpha StgRun() bug that I just fixed.

22 years ago[project @ 2001-08-07 20:06:41 by ken]
ken [Tue, 7 Aug 2001 20:06:41 +0000 (20:06 +0000)]
[project @ 2001-08-07 20:06:41 by ken]
Fixed (I hope, and have reason to believe) mysterious segfaulting problem
on the Alpha.

The problem (I hope, and have reason to believe) was that, during a few
instructions, the register saving/restoring code in StgRun() places data
below the current SP value.  (I.e., it should first reserve stack space,
then put data in said space, rather than first put data in, then reserve
the space.)

   "The SP value might be used by the hardware when raising exceptions and
    asynchronous interrupts. It must be assumed that the contents of the stack
    below the current SP value and within the stack for the current thread are
    continually and unpredictably modified, as specified in the _Alpha
    Architecture Reference Manual_, and as a result of asynchronous software
    actions."

   -- Compaq Computer Corporation, Houston. Tru64 UNIX Calling Standard for
      Alpha Systems, 5.1 edition, August 2000, section 3.2.1.  http://www.
      tru64unix.compaq.com/docs/base_doc/DOCUMENTATION/V51_PDF/ARH9MBTE.PDF

22 years ago[project @ 2001-08-07 19:34:01 by ken]
ken [Tue, 7 Aug 2001 19:34:01 +0000 (19:34 +0000)]
[project @ 2001-08-07 19:34:01 by ken]
Fix 32-bit assumptions in debugging fprintf's.

22 years ago[project @ 2001-08-07 19:33:33 by ken]
ken [Tue, 7 Aug 2001 19:33:33 +0000 (19:33 +0000)]
[project @ 2001-08-07 19:33:33 by ken]
For now, let mkMarshalCode_wrk = undefined for non-i386 architectures.

22 years ago[project @ 2001-08-07 17:07:11 by sewardj]
sewardj [Tue, 7 Aug 2001 17:07:11 +0000 (17:07 +0000)]
[project @ 2001-08-07 17:07:11 by sewardj]
Rewrite the machinery for pushing args to CCalls so that it can
suitably mangle those :: ForeignObj# and ByteArray# and PtrArray#.

22 years ago[project @ 2001-08-07 17:05:35 by ken]
ken [Tue, 7 Aug 2001 17:05:35 +0000 (17:05 +0000)]
[project @ 2001-08-07 17:05:35 by ken]
Allow (and ignore, i.e., strip away) "-optc" prefix in command-line options.
This is for mkdependC-ing and compiling C code under ghc/rts, where we
use ghc-inplace as CC and give -optc-Dxxx options in CC_OPTS.  We used to
generate inaccurate (insufficient) dependencies.

22 years ago[project @ 2001-08-07 14:45:43 by dsyme]
dsyme [Tue, 7 Aug 2001 14:45:43 +0000 (14:45 +0000)]
[project @ 2001-08-07 14:45:43 by dsyme]
This is the implementation of many of the GHC primitive operations and types for the .NET CLR port of GHC.

22 years ago[project @ 2001-08-07 11:13:46 by simonmar]
simonmar [Tue, 7 Aug 2001 11:13:46 +0000 (11:13 +0000)]
[project @ 2001-08-07 11:13:46 by simonmar]
Make this compile with newer GHCs.

22 years ago[project @ 2001-08-07 11:08:36 by simonmar]
simonmar [Tue, 7 Aug 2001 11:08:36 +0000 (11:08 +0000)]
[project @ 2001-08-07 11:08:36 by simonmar]
- describe NOTINLINE as a synonym for NOINLINE
- describe the general form of a pragma
- mention that case is irrelevant in the first word of a pragma
- mention that unrecognised pragmas are silently ignored

22 years ago[project @ 2001-08-07 10:54:01 by simonmar]
simonmar [Tue, 7 Aug 2001 10:54:01 +0000 (10:54 +0000)]
[project @ 2001-08-07 10:54:01 by simonmar]
Back out the ExitException change; it's already taken into account by
DriverUtil.handle.

Sigbjorn: I'm not sure what was going on with your Win32 build, but it
looks like it was a bug somewhere else.

22 years ago[project @ 2001-08-07 10:49:49 by simonmar]
simonmar [Tue, 7 Aug 2001 10:49:49 +0000 (10:49 +0000)]
[project @ 2001-08-07 10:49:49 by simonmar]
(forced commit)

Note that the previous commit also fixed the bug reported by Ken Shan
yesterday, namely that the conc004.hs test was failing.

22 years ago[project @ 2001-08-07 10:46:57 by simonmar]
simonmar [Tue, 7 Aug 2001 10:46:57 +0000 (10:46 +0000)]
[project @ 2001-08-07 10:46:57 by simonmar]
Note that you need to give the same -package options to ghc -M as you
would for normal compilation.  Also clarify the meaning of the
(historically named) --include-prelude option.

22 years ago[project @ 2001-08-07 10:37:04 by simonmar]
simonmar [Tue, 7 Aug 2001 10:37:04 +0000 (10:37 +0000)]
[project @ 2001-08-07 10:37:04 by simonmar]
(forced commit, the last one had the wrong message)

Make RTS flags given on the command line override those from the
GHCRTS environment variable.

22 years ago[project @ 2001-08-07 10:36:13 by simonmar]
simonmar [Tue, 7 Aug 2001 10:36:13 +0000 (10:36 +0000)]
[project @ 2001-08-07 10:36:13 by simonmar]
Move RtsFlags.h into ghc/includes, so it's available in a binary
installation.  RtsFlags.h was repository-copied behind the scenes to
keep the revision history.

22 years ago[project @ 2001-08-07 10:11:05 by simonmar]
simonmar [Tue, 7 Aug 2001 10:11:05 +0000 (10:11 +0000)]
[project @ 2001-08-07 10:11:05 by simonmar]
Move RtsFlags.h into ghc/includes, so it's available in a binary
installation.  RtsFlags.h was repository-copied behind the scenes to
keep the revision history.

22 years ago[project @ 2001-08-07 09:59:18 by simonmar]
simonmar [Tue, 7 Aug 2001 09:59:18 +0000 (09:59 +0000)]
[project @ 2001-08-07 09:59:18 by simonmar]
markup wibbles

22 years ago[project @ 2001-08-07 09:58:39 by simonmar]
simonmar [Tue, 7 Aug 2001 09:58:39 +0000 (09:58 +0000)]
[project @ 2001-08-07 09:58:39 by simonmar]
Document the GHCRTS env. var.

22 years ago[project @ 2001-08-07 09:58:15 by simonmar]
simonmar [Tue, 7 Aug 2001 09:58:15 +0000 (09:58 +0000)]
[project @ 2001-08-07 09:58:15 by simonmar]
markup wibbles

22 years ago[project @ 2001-08-07 09:57:52 by simonmar]
simonmar [Tue, 7 Aug 2001 09:57:52 +0000 (09:57 +0000)]
[project @ 2001-08-07 09:57:52 by simonmar]
mark up wibbles (don't people try to format the documentation before
checking in changes?)

22 years ago[project @ 2001-08-07 09:30:00 by sewardj]
sewardj [Tue, 7 Aug 2001 09:30:00 +0000 (09:30 +0000)]
[project @ 2001-08-07 09:30:00 by sewardj]
x86: remember to pop the floating-point stack when moving float/double
results back to the Haskell stack.  Viz, use fstps/fstpl, not fsts/fstl.

22 years ago[project @ 2001-08-07 09:20:52 by simonmar]
simonmar [Tue, 7 Aug 2001 09:20:52 +0000 (09:20 +0000)]
[project @ 2001-08-07 09:20:52 by simonmar]
- Allow RTS options to be given using the GHCRTS environment variable.

- Fix the heap size calculation to take into account all generations.
  It's more conservative than it used to be, but now it is less likely
  that the maximum heap size will be exceeded.

- Compacting collection is turned on automatically when residency
  reaches 30% of the maximum heap size, tunable with +RTS -c<n>.
  +RTS -c turns off compaction altogether.

- The maximum heap size is off by default.  NOTE: this also means no
  compaction by default.  It is recommended that people enable a maximum
  heap size for their system using the GHCRTS environment var; eg:
  GHCRTS=-M128m.

22 years ago[project @ 2001-08-07 09:16:15 by sewardj]
sewardj [Tue, 7 Aug 2001 09:16:15 +0000 (09:16 +0000)]
[project @ 2001-08-07 09:16:15 by sewardj]
This buffer is for notes you don't want to save, and for Lisp evaluation.
If you want to create a file, visit that file with C-x C-f,
then enter the text in that file's own buffer.

Interpreter FFI improvements:

* Support f-i dynamic.
* Correctly handle fns which don't return anything.
* Support x86 stdcall call-conv.

Clean-up of FFI-related code in ByteCodeGen.lhs.

22 years ago[project @ 2001-08-07 09:02:02 by sewardj]
sewardj [Tue, 7 Aug 2001 09:02:02 +0000 (09:02 +0000)]
[project @ 2001-08-07 09:02:02 by sewardj]
Do suspendThread/resumeThread round ccalls so that ccall_gc is supported.

22 years ago[project @ 2001-08-07 08:18:15 by rrt]
rrt [Tue, 7 Aug 2001 08:18:15 +0000 (08:18 +0000)]
[project @ 2001-08-07 08:18:15 by rrt]
Revert to shell-based method on Windows; the raw CreateProcess method is now
in hslibs/lang/SystemExts.

22 years ago[project @ 2001-08-07 08:16:48 by rrt]
rrt [Tue, 7 Aug 2001 08:16:48 +0000 (08:16 +0000)]
[project @ 2001-08-07 08:16:48 by rrt]
Revert to System.system using the shell, hence need to use new rawSystem on
Windows to launch GHC's sub-processes.

22 years ago[project @ 2001-08-06 20:39:32 by sof]
sof [Mon, 6 Aug 2001 20:39:32 +0000 (20:39 +0000)]
[project @ 2001-08-06 20:39:32 by sof]
Make recent _hsc.c / cbits changes work (i.e., need to add . to the include path)

22 years ago[project @ 2001-08-05 00:27:36 by ken]
ken [Sun, 5 Aug 2001 00:27:36 +0000 (00:27 +0000)]
[project @ 2001-08-05 00:27:36 by ken]
Adjustor code cleanup. Added code to generate Alpha adjustors.
The way we generate Alpha adjustors right now, it only works if the
wptr function (the stub function for the Haskell side, that is) takes
no argument other than the hptr (the Haskell closure to call)!  I believe
the same deficiency exists in the Sparc adjustors code.

22 years ago[project @ 2001-08-05 00:25:41 by ken]
ken [Sun, 5 Aug 2001 00:25:41 +0000 (00:25 +0000)]
[project @ 2001-08-05 00:25:41 by ken]
Steps towards getting GHCi working on alpha-dec-osf3 --
Clean up ghci/ByteCodeItbls.lhs, and add code for generating
a jump instruction on alpha.

22 years ago[project @ 2001-08-05 00:24:10 by ken]
ken [Sun, 5 Aug 2001 00:24:10 +0000 (00:24 +0000)]
[project @ 2001-08-05 00:24:10 by ken]
#include <string.h> for memcpy prototype.

22 years ago[project @ 2001-08-04 06:19:54 by ken]
ken [Sat, 4 Aug 2001 06:19:55 +0000 (06:19 +0000)]
[project @ 2001-08-04 06:19:54 by ken]
NB: This commit renames some files.  In each of your build directories,
    you will need to:

rm -f ghc/compiler/prelude/primops.txt
rm -f ghc/compiler/prelude/primops.i
rm -f ghc/lib/std/PrelGHC.hi-boot
lndir ../fptools # or wherever your CVS working directory is

The change:
Run PrelGHC.hi-boot through the preprocesor, as we already do primops.txt.

This commit introduces a new prefix, ".pp", which means "run through
preprocesor".  In a previous commit, I changed ghc/compiler/Makefile
to preprocess primops.txt into primops.i.  That is gone now.  We now
preprocess primops.txt.pp (a file in the CVS repository) into primops.txt
(a platform-dependent file, created at build time).  We also preprocess
PrelGHC.hi-boot.pp (a file in the CVS repository) into PrelGHC.hi-boot
(a platform-dependent file, created at build time).

The reason for using the preprocessor is because fewer primops are defined
if SUPPORT_LONG_LONGS is undefined.  SUPPORT_LONG_LONGS is undefined on
64-bit architectures such as the Alpha.

22 years ago[project @ 2001-08-04 06:11:24 by ken]
ken [Sat, 4 Aug 2001 06:11:24 +0000 (06:11 +0000)]
[project @ 2001-08-04 06:11:24 by ken]
Changed

    # Add _hsc.c files to the cbits library
    SRCS += $(wildcard ../*_hsc.c)

(which didn't work because SRCS has already been pattern-matched and
substituted into other make variables to death by then) to

    # Add _hsc.c files to the cbits library
    C_SRCS += $(wildcard ../*_hsc.c)

22 years ago[project @ 2001-08-04 06:10:04 by ken]
ken [Sat, 4 Aug 2001 06:10:04 +0000 (06:10 +0000)]
[project @ 2001-08-04 06:10:04 by ken]
Fixed assumption that int and HsInt are the same.

22 years ago[project @ 2001-08-04 06:09:24 by ken]
ken [Sat, 4 Aug 2001 06:09:24 +0000 (06:09 +0000)]
[project @ 2001-08-04 06:09:24 by ken]
Change the generation of package.conf and package.conf.inplace, so that
-lbfd and -liberty are included when necessary.

22 years ago[project @ 2001-08-04 06:07:22 by ken]
ken [Sat, 4 Aug 2001 06:07:22 +0000 (06:07 +0000)]
[project @ 2001-08-04 06:07:22 by ken]
its => it's (or as the saying goes, wibble)

22 years ago[project @ 2001-08-03 23:38:50 by ken]
ken [Fri, 3 Aug 2001 23:38:50 +0000 (23:38 +0000)]
[project @ 2001-08-03 23:38:50 by ken]
Fixed: ExitException doesn't exist in __GLASGOW_HASKELL__ < 501,
so references to ExitException should be preprocessed out.

22 years ago[project @ 2001-08-03 20:40:43 by sof]
sof [Fri, 3 Aug 2001 20:40:43 +0000 (20:40 +0000)]
[project @ 2001-08-03 20:40:43 by sof]
- have the toplevel exception handler propagate ExitExceptions, don't flag
  them as panics. i.e., when the dynamic exception handler catches a
  PhaseFailed{}, it throws an ExitException. The outer/topmost handler
  catches this (on a Win32 box, but not my other (Linux) box for some
  reason...), and maps it to a panic, which is not what you want.
- introduced the old 'Compilation had errors' message in case of a
  PhaseFailed{}; feel free to nuke that one (again).

22 years ago[project @ 2001-08-03 17:03:48 by sof]
sof [Fri, 3 Aug 2001 17:03:48 +0000 (17:03 +0000)]
[project @ 2001-08-03 17:03:48 by sof]
Keep ghci.c out of C_SRCS on non-mingw plats

22 years ago[project @ 2001-08-03 16:30:13 by sof]
sof [Fri, 3 Aug 2001 16:30:13 +0000 (16:30 +0000)]
[project @ 2001-08-03 16:30:13 by sof]
Full complement of sized Int/Word getter routines

22 years ago[project @ 2001-08-03 15:11:10 by sewardj]
sewardj [Fri, 3 Aug 2001 15:11:10 +0000 (15:11 +0000)]
[project @ 2001-08-03 15:11:10 by sewardj]
Fix enough bugs/incompletenesses so that foreign import (static) works
fairly well on x86.

Still ToDo:
* f-i dynamic
* save/restore GC/thread context around calls
* stdcall support
* pass/return of 64-bit integral quantities on x86
* sparc implementation

22 years ago[project @ 2001-08-03 15:05:52 by sewardj]
sewardj [Fri, 3 Aug 2001 15:05:52 +0000 (15:05 +0000)]
[project @ 2001-08-03 15:05:52 by sewardj]
wibble: add cast to keep gcc happy.

22 years ago[project @ 2001-08-03 07:44:47 by sof]
sof [Fri, 3 Aug 2001 07:44:48 +0000 (07:44 +0000)]
[project @ 2001-08-03 07:44:47 by sof]
Make dependency generation work a little bit better
(stage1 goes through OK; yet to do a stage2, but
thought I'd commit before I hit the sack).

22 years ago[project @ 2001-08-03 00:08:07 by sof]
sof [Fri, 3 Aug 2001 00:08:07 +0000 (00:08 +0000)]
[project @ 2001-08-03 00:08:07 by sof]
Only define i_CCALL iff bci_CCALL is defined in WithHc's ByteCodes.h

22 years ago[project @ 2001-08-02 17:15:16 by sewardj]
sewardj [Thu, 2 Aug 2001 17:15:17 +0000 (17:15 +0000)]
[project @ 2001-08-02 17:15:16 by sewardj]
Haskell-side support for FFI (foreign import only).

Since doing the FFI necessarily involves gruesome
architecture-specific knowledge about calling conventions, I have
chosen to put this knowledge in Haskell-land, in ByteCodeFFI.

The general idea is: to do a ccall, the interpreter accumulates the
args R to L on the stack, as is the normal case for tail-calls.
However, it then calls a piece of machine code created by ByteCodeFFI
and which is specific to this call site.  This glue code copies args
off the Haskell stack, calls the target function, and places the
result back into a dummy placeholder created on the Haskell stack
prior to the call.  The interpreter then SLIDEs and RETURNs in the
normal way.

The magic glue code copies args off the Haskell stack and pushes them
directly on the C stack (x86) and/or into regs (sparc et al).  Because
the code is made up specifically for this call site, it can do all
that non-interpretively.  The address (of the C fn to call) is
presented as just another tagged Addr# on the Haskell stack.  This
makes f-i-dynamic trivial since the first arg is the said Addr#.

Presently ByteCodeFFI only knows how to generate x86 code sequences.

22 years ago[project @ 2001-08-02 17:01:33 by sewardj]
sewardj [Thu, 2 Aug 2001 17:01:33 +0000 (17:01 +0000)]
[project @ 2001-08-02 17:01:33 by sewardj]
C-side support for FFI in GHCi (foreign import only).

22 years ago[project @ 2001-08-02 16:35:10 by simonmar]
simonmar [Thu, 2 Aug 2001 16:35:10 +0000 (16:35 +0000)]
[project @ 2001-08-02 16:35:10 by simonmar]
Simplify the dependency analyser to use the Finder instead of doing
its own directory searching.

22 years ago[project @ 2001-08-02 16:30:41 by simonmar]
simonmar [Thu, 2 Aug 2001 16:31:13 +0000 (16:31 +0000)]
[project @ 2001-08-02 16:30:41 by simonmar]
Turn the strictness analyser back on again.

22 years ago[project @ 2001-08-02 16:05:06 by simonmar]
simonmar [Thu, 2 Aug 2001 16:05:06 +0000 (16:05 +0000)]
[project @ 2001-08-02 16:05:06 by simonmar]
Fix something that looks wrong in an attempt to get HEAD back on the
rails again, whilst trying to get the award for the highest
size-of-commit-message-to-number-of-lines-actually-changed ratio.

The problem is this: a constructor defined as

data T = A !Int

will cause a DataCon wrapper to be generated like this:

A = \x -> case x of x' { DEFAULT -> $wA x' }

but the strictness on $wA says that it is strict in its first field.
This is where the story gets a little hazy, but it seems that the
compiler (5.00.2) happily removes the extra case thinking that x is
going to get evaluated anyway, leaving us with

A = \x -> $wA x

and the argument to A ends up not being evaluated at all.  Certain
other parts of the compiler make use of the evaluatedness of fields in
order to remove unnecessary cases, with the end result that we end up
trying to dataToTag# an unevaluated thing, and certain derived Eq
instances can give wrong results.  Phew.

Now, here's the bit I *don't* understand: I can only see the bug with
5.00.2, and only when the data type has more than one constructor:

data T = A !Int  |  B

nevertheless, the HEAD compiler when bootstrapped displays symptoms of
a broken Eq instance, so I'm trying this fix to see if it helps.

The Attempted Fix: give the DataConId a fully-lazy strictness
signature.

22 years ago[project @ 2001-08-02 15:33:35 by ken]
ken [Thu, 2 Aug 2001 15:33:35 +0000 (15:33 +0000)]
[project @ 2001-08-02 15:33:35 by ken]
Some 64-bit fixes for the new GC code.

22 years ago[project @ 2001-08-02 08:29:42 by simonmar]
simonmar [Thu, 2 Aug 2001 08:29:42 +0000 (08:29 +0000)]
[project @ 2001-08-02 08:29:42 by simonmar]
oops, only import Exception.block when compiling GHCi (and we know
we're bootstrapping)

22 years ago[project @ 2001-08-02 05:15:33 by qrczak]
qrczak [Thu, 2 Aug 2001 05:15:33 +0000 (05:15 +0000)]
[project @ 2001-08-02 05:15:33 by qrczak]
Give ghc yet more memory.

22 years ago[project @ 2001-08-02 01:01:46 by sof]
sof [Thu, 2 Aug 2001 01:01:46 +0000 (01:01 +0000)]
[project @ 2001-08-02 01:01:46 by sof]
Example invocation of 'windres' was a bit off

22 years ago[project @ 2001-08-01 21:55:04 by sof]
sof [Wed, 1 Aug 2001 21:55:04 +0000 (21:55 +0000)]
[project @ 2001-08-01 21:55:04 by sof]
Support LFNs

22 years ago[project @ 2001-08-01 20:37:00 by qrczak]
qrczak [Wed, 1 Aug 2001 20:37:00 +0000 (20:37 +0000)]
[project @ 2001-08-01 20:37:00 by qrczak]
Give ghc more heap so it can bootstrap itself until the strictness
analyser works again.

22 years ago[project @ 2001-08-01 12:07:50 by simonmar]
simonmar [Wed, 1 Aug 2001 12:07:50 +0000 (12:07 +0000)]
[project @ 2001-08-01 12:07:50 by simonmar]
Signification cleanup & rewrite of CmLink.

Fixes at least one bug: the PersistentLinkerState could sometimes get
out of step with the RTS's idea of which modules were loaded, leading
to an unloadObj failure when we try to unload the same module twice.
This could happen if a ^C exception is received in the middle of a
:load.

Fixed by keeping the part of the linker's state that must match up
with the RTS's internal state entirely private to CmLink, stored in a
global variable.  The operations in CmLink which manipulate this state
are now wrapped by Exception.block, and so are safe from ^C
exceptions.

22 years ago[project @ 2001-08-01 11:49:27 by simonmar]
simonmar [Wed, 1 Aug 2001 11:49:27 +0000 (11:49 +0000)]
[project @ 2001-08-01 11:49:27 by simonmar]
use :set rather than :s

22 years ago[project @ 2001-08-01 08:20:33 by simonmar]
simonmar [Wed, 1 Aug 2001 08:20:33 +0000 (08:20 +0000)]
[project @ 2001-08-01 08:20:33 by simonmar]
*now* UF_CCS isn't used anywhere.

(and it was wrong, too, which is why I wanted to get rid of it)

22 years ago[project @ 2001-08-01 06:56:20 by qrczak]
qrczak [Wed, 1 Aug 2001 06:56:20 +0000 (06:56 +0000)]
[project @ 2001-08-01 06:56:20 by qrczak]
Temporarily add -H80M to options for some modules, until the strictness
analyser is working again.

22 years ago[project @ 2001-07-31 18:30:22 by qrczak]
qrczak [Tue, 31 Jul 2001 18:30:22 +0000 (18:30 +0000)]
[project @ 2001-07-31 18:30:22 by qrczak]
UF_CCS was used in compiler/main/Constants.lhs

22 years ago[project @ 2001-07-31 16:44:44 by simonmar]
simonmar [Tue, 31 Jul 2001 16:44:44 +0000 (16:44 +0000)]
[project @ 2001-07-31 16:44:44 by simonmar]
Remove the out-of-date "FAQ" about GHCi not having the :add command
(it does now).

22 years ago[project @ 2001-07-31 14:31:28 by simonmar]
simonmar [Tue, 31 Jul 2001 14:31:28 +0000 (14:31 +0000)]
[project @ 2001-07-31 14:31:28 by simonmar]
GHC_INTERPRETER_DIR is unused

22 years ago[project @ 2001-07-31 13:44:37 by simonmar]
simonmar [Tue, 31 Jul 2001 13:44:37 +0000 (13:44 +0000)]
[project @ 2001-07-31 13:44:37 by simonmar]
UF_CCS is unused

22 years ago[project @ 2001-07-31 11:06:00 by simonmar]
simonmar [Tue, 31 Jul 2001 11:06:00 +0000 (11:06 +0000)]
[project @ 2001-07-31 11:06:00 by simonmar]
make -keep-hc-files and -keep-s-files work with --make

22 years ago[project @ 2001-07-31 10:58:34 by rrt]
rrt [Tue, 31 Jul 2001 10:58:34 +0000 (10:58 +0000)]
[project @ 2001-07-31 10:58:34 by rrt]
Add the --with-gcc story. Tidy up some typos.

22 years ago[project @ 2001-07-31 10:48:02 by simonmar]
simonmar [Tue, 31 Jul 2001 10:48:02 +0000 (10:48 +0000)]
[project @ 2001-07-31 10:48:02 by simonmar]
Update for changes in Haskell 98: take, drop & splitAt now don't fail
on negative arguments.

22 years ago[project @ 2001-07-31 10:06:25 by sewardj]
sewardj [Tue, 31 Jul 2001 10:06:25 +0000 (10:06 +0000)]
[project @ 2001-07-31 10:06:25 by sewardj]
Disable all strictness analysis in the HEAD compiler until such time
as we can figure out why the new analyser is not working correctly.
I realise this is a drastic measure, but all previous attempts to
either fix or work around the problem have failed.

If you are doing work which requires maxed-out performance, you may
want to revert the effects of this commit in your source tree.  The
compiler only generates wrong code under pretty obscure circumstances
(when compiling itself).  All other programs appear to work correctly
with the new analyser.

We hope this situation will not last for long.

22 years ago[project @ 2001-07-30 13:06:18 by simonmar]
simonmar [Mon, 30 Jul 2001 13:06:18 +0000 (13:06 +0000)]
[project @ 2001-07-30 13:06:18 by simonmar]
add definition of unmark()

22 years ago[project @ 2001-07-30 12:57:01 by simonmar]
simonmar [Mon, 30 Jul 2001 12:57:01 +0000 (12:57 +0000)]
[project @ 2001-07-30 12:57:01 by simonmar]
Small perf. improvement: use the next bit in the bitmap to indicate
whether the current object needs to be pushed into the next block
during compaction.  This saves having to do the double traversal of
the threaded info pointer list during the second pass in most cases.

22 years ago[project @ 2001-07-30 12:54:12 by simonmar]
simonmar [Mon, 30 Jul 2001 12:54:12 +0000 (12:54 +0000)]
[project @ 2001-07-30 12:54:12 by simonmar]
- Bugfix: mark the weak pointer list before GC, instead of the
  (strange) old mechanism which involved "cleaning it up" after GC.

- size the old generation properly when doing compacting GC.

22 years ago[project @ 2001-07-30 10:40:36 by rrt]
rrt [Mon, 30 Jul 2001 10:40:36 +0000 (10:40 +0000)]
[project @ 2001-07-30 10:40:36 by rrt]
Add Sigbjorn's wrapper for ghci on Windows. ghci.exe will work from cmd.exe,
bash, the Explorer &c. &c., i.e. it's a one-size fits all solution. Thanks,
Sigbjorn!

22 years ago[project @ 2001-07-30 09:47:13 by simonmar]
simonmar [Mon, 30 Jul 2001 09:47:13 +0000 (09:47 +0000)]
[project @ 2001-07-30 09:47:13 by simonmar]
tiny layout wibble

22 years ago[project @ 2001-07-30 09:30:07 by simonmar]
simonmar [Mon, 30 Jul 2001 09:30:07 +0000 (09:30 +0000)]
[project @ 2001-07-30 09:30:07 by simonmar]
clean up; move some code into more relevant parts of the file.

22 years ago[project @ 2001-07-26 16:22:50 by qrczak]
qrczak [Thu, 26 Jul 2001 16:22:50 +0000 (16:22 +0000)]
[project @ 2001-07-26 16:22:50 by qrczak]
Clean *_hsc.$(way_)o for other ways too.

22 years ago[project @ 2001-07-26 14:29:26 by simonmar]
simonmar [Thu, 26 Jul 2001 14:29:26 +0000 (14:29 +0000)]
[project @ 2001-07-26 14:29:26 by simonmar]
Fall back to doing a linear scan of the old generation when the mark
stack fills up.

The compacting collector should work for all programs now, but there's
still some work to do on the speed of the collector - don't expect
programs to go any faster :)

22 years ago[project @ 2001-07-26 10:06:22 by simonmar]
simonmar [Thu, 26 Jul 2001 10:06:22 +0000 (10:06 +0000)]
[project @ 2001-07-26 10:06:22 by simonmar]
Fix from Simon P.J. (committing over the phone :-)

Add missing case in lub:

lub Eval (Seq k Defer ds) = Lazy

previously lub of Eval and Defer would have defaulted to Eval, which
was overoptimistic.

22 years ago[project @ 2001-07-26 09:54:39 by simonmar]
simonmar [Thu, 26 Jul 2001 09:54:39 +0000 (09:54 +0000)]
[project @ 2001-07-26 09:54:39 by simonmar]
Make the panic case in evalAbsence into another "TELL SIMON" trace.

22 years ago[project @ 2001-07-26 03:26:28 by ken]
ken [Thu, 26 Jul 2001 03:26:28 +0000 (03:26 +0000)]
[project @ 2001-07-26 03:26:28 by ken]
The heap shall start at HEAP_BASE == 0x180000000L on alpha-osf3.

22 years ago[project @ 2001-07-26 03:24:01 by ken]
ken [Thu, 26 Jul 2001 03:24:01 +0000 (03:24 +0000)]
[project @ 2001-07-26 03:24:01 by ken]
In addition to handling SIGINT, also handle SIGFPE by ignoring it.
Apparently IEEE requires floating-point exceptions to be ignored by
default, but alpha-dec-osf3 doesn't seem to do so.

22 years ago[project @ 2001-07-26 03:20:52 by ken]
ken [Thu, 26 Jul 2001 03:20:52 +0000 (03:20 +0000)]
[project @ 2001-07-26 03:20:52 by ken]
Added to main():

   /*
    * Believe it or not, calling tzset() at startup seems to get rid of
    * a scheduler-related Heisenbug on alpha-dec-osf3.  The symptom of
    * the bug is that, when the load on the machine is high or when
    * there are many threads, the variable "Capability *cap" in the
    * function "schedule" in the file "Schedule.c" magically becomes
    * null before the line "t = cap->rCurrentTSO;".  Why, and why does
    * calling tzset() here seem to fix it?  Excellent questions!
    */
   tzset();

22 years ago[project @ 2001-07-26 03:13:37 by ken]
ken [Thu, 26 Jul 2001 03:13:37 +0000 (03:13 +0000)]
[project @ 2001-07-26 03:13:37 by ken]
Fixed code to not return an undefined value on platforms that are
neither OBJFORMAT_ELF nor OBJFORMAT_PEi386.

22 years ago[project @ 2001-07-26 03:08:38 by ken]
ken [Thu, 26 Jul 2001 03:08:39 +0000 (03:08 +0000)]
[project @ 2001-07-26 03:08:38 by ken]
Run prelude/primops.txt through the preprocessor, to weed out
primitives that don't (need to) exist on 64-bit architectures.

22 years ago[project @ 2001-07-25 15:55:30 by simonpj]
simonpj [Wed, 25 Jul 2001 15:55:30 +0000 (15:55 +0000)]
[project @ 2001-07-25 15:55:30 by simonpj]
-----------------------------------------
Fix a bug in the monomorphism restriction
------------------------------------------

Thanks for Koen for reporting this bug.

In tcSimplifyRestricted, I wrongly called tcSimpifyToDicts,
whereas actually we have to simplfy further than simply to
a dictionary.

The test for this is in typecheck/should_compile/tc132.hs

22 years ago[project @ 2001-07-25 13:29:07 by simonpj]
simonpj [Wed, 25 Jul 2001 13:29:07 +0000 (13:29 +0000)]
[project @ 2001-07-25 13:29:07 by simonpj]
---------------------------------
Fix a bug in the defn of "both"
---------------------------------

This bug made the bootstrapped GHC enter an absent argument.

The change is from

both Lazy (Seq k Now ds) = Seq Keep Now ds
to
both Lazy (Seq k l ds) = Seq Keep l ds

Simple, eh?  (Comments with the code.)

22 years ago[project @ 2001-07-25 12:18:26 by simonmar]
simonmar [Wed, 25 Jul 2001 12:18:26 +0000 (12:18 +0000)]
[project @ 2001-07-25 12:18:26 by simonmar]
- move the call to scavenge_mark_stack() inside the inner scavenge loop,
  so it gets called more often and there's less chance of the mark
  stack filling up.  None of the nofib tests cause the mark stack to
  fill up now.

- remove some experimental code from scavenge_mark_stack().

22 years ago[project @ 2001-07-25 11:55:57 by simonmar]
simonmar [Wed, 25 Jul 2001 11:55:57 +0000 (11:55 +0000)]
[project @ 2001-07-25 11:55:57 by simonmar]
Specialise thread_static() a little bit: improves performance for
threading the static object list.

22 years ago[project @ 2001-07-25 10:49:46 by simonpj]
simonpj [Wed, 25 Jul 2001 10:49:46 +0000 (10:49 +0000)]
[project @ 2001-07-25 10:49:46 by simonpj]
Do for evalStrictness the same as for evalAbsence

22 years ago[project @ 2001-07-25 10:10:25 by simonmar]
simonmar [Wed, 25 Jul 2001 10:10:25 +0000 (10:10 +0000)]
[project @ 2001-07-25 10:10:25 by simonmar]
- Move FptoolsHcOpts out of the hslibs section of this file (which was
  *exactly* the wrong place for it).

- Clarify the meaning of FptoolsHcOpts and GhcHcOpts.

NOTE: $(FptoolsHcOpts) gets added to every Haskell compilation for
Haskell *programs* (not libraries), including GHC itself.  By default,
it contains only -O.  To remove the -O, you need to override
FptoolsHcOpts in build.mk, not GhcHcOpts.

GhcHcOpts is still there, and contains options to be added when
compiling GHC only.

22 years ago[project @ 2001-07-25 09:19:41 by simonpj]
simonpj [Wed, 25 Jul 2001 09:19:41 +0000 (09:19 +0000)]
[project @ 2001-07-25 09:19:41 by simonpj]
---------------------------------
Another long-standing infelicity!
---------------------------------

CoreTidy was throwing away demand info on let-binders.
This meant that CorePrep would build a let (thunk) instead of
a case, even if the Id is sure to be demanded.

Easily fixed by making CoreTidy retain the demand info.

This demand-analysis stuff is having the excellent side effect
of flushing out performance bugs!

22 years ago[project @ 2001-07-25 09:14:21 by simonmar]
simonmar [Wed, 25 Jul 2001 09:14:21 +0000 (09:14 +0000)]
[project @ 2001-07-25 09:14:21 by simonmar]
- bugfix (was erroneously ignoring the return value from scavenge_one() and
  checking failed_to_evac instead, which was always false)

- printf format fix (shut gcc up).

22 years ago[project @ 2001-07-25 08:04:00 by simonpj]
simonpj [Wed, 25 Jul 2001 08:04:00 +0000 (08:04 +0000)]
[project @ 2001-07-25 08:04:00 by simonpj]
Change pretty-print of DmdType slightly

22 years ago[project @ 2001-07-25 07:43:53 by simonpj]
simonpj [Wed, 25 Jul 2001 07:43:53 +0000 (07:43 +0000)]
[project @ 2001-07-25 07:43:53 by simonpj]
---------------------------
Fix another bad DmdAnal bug
---------------------------

The `both` operator wasn't commutative, leading to most
strange results.  In particular, the fixpoint finder went into
an infinite fip/flop loop on Marcin's program.

22 years ago[project @ 2001-07-25 07:42:23 by simonpj]
simonpj [Wed, 25 Jul 2001 07:42:23 +0000 (07:42 +0000)]
[project @ 2001-07-25 07:42:23 by simonpj]
---------------------------------------
Fix a grevious dict-inlining infelicity
---------------------------------------

This commit fixes an infelicity that must have been there
for a long time.  The problem was that dictionary functions
(arising from instance declarations) were treated as GlobalIds,
and hence no taken account of when doing free variable and dependency
analysis.    As a result, the specialiser was messing up dependency
order, so the program was considerably more complex than it should
be by the time it got to the strictness analyser.

Net result:
PrelRead.$sreduce :: Integer -> Integer -> (Integer,Integer)
didn't get detected as strict.

Easily fixed, by making DictFunIds into LocalIds (albeit exported ones).

22 years ago[project @ 2001-07-24 18:04:01 by sof]
sof [Tue, 24 Jul 2001 18:04:01 +0000 (18:04 +0000)]
[project @ 2001-07-24 18:04:01 by sof]
Capture the dependency of PrelIO.hsc on PrelHandle_hsc.h (as was, 'make clean; make all' broke)

22 years ago[project @ 2001-07-24 16:47:40 by simonpj]
simonpj [Tue, 24 Jul 2001 16:47:40 +0000 (16:47 +0000)]
[project @ 2001-07-24 16:47:40 by simonpj]
Print a bit more info in an old strictness analyser assert fail

22 years ago[project @ 2001-07-24 16:46:51 by simonpj]
simonpj [Tue, 24 Jul 2001 16:46:51 +0000 (16:46 +0000)]
[project @ 2001-07-24 16:46:51 by simonpj]
Print a bit more info in the dmdFix loop

22 years ago[project @ 2001-07-24 16:42:11 by simonpj]
simonpj [Tue, 24 Jul 2001 16:42:11 +0000 (16:42 +0000)]
[project @ 2001-07-24 16:42:11 by simonpj]
A major demand-analyser fix, which made it say something was
absent when it wasn't at all.  Here's the comment from the
Case equation of dmdAnal.

-- Figure out whether the case binder is used, and use
-- that to set the keepity of the demand.  This is utterly essential.
-- Consider f x = case x of y { (a,b) -> k y a }
-- If we just take scrut_demand = U(L,A), then we won't pass x to the
-- worker, so the worker will rebuild
-- x = (a, absent-error)
-- and that'll crash.

22 years ago[project @ 2001-07-24 16:36:43 by simonmar]
simonmar [Tue, 24 Jul 2001 16:36:44 +0000 (16:36 +0000)]
[project @ 2001-07-24 16:36:43 by simonmar]
Bugfixes; take large objects into account in stats output.

22 years ago[project @ 2001-07-24 16:09:48 by simonpj]
simonpj [Tue, 24 Jul 2001 16:09:48 +0000 (16:09 +0000)]
[project @ 2001-07-24 16:09:48 by simonpj]
wibble