ghc-hetmet.git
23 years ago[project @ 2000-08-22 08:03:15 by chak]
chak [Tue, 22 Aug 2000 08:03:15 +0000 (08:03 +0000)]
[project @ 2000-08-22 08:03:15 by chak]
Works now independent of whether GNU make is installed as gmake or make on the
system.

[lewie: It was not so good to just change `make' to `gmake'; broke the thing
on our Solaris boxen, which have GNU make as the default make.]

23 years ago[project @ 2000-08-21 15:40:14 by sewardj]
sewardj [Mon, 21 Aug 2000 15:40:15 +0000 (15:40 +0000)]
[project @ 2000-08-21 15:40:14 by sewardj]
Make the register allocator deal properly with switch tables.
Previously, it didn't calculate the correct flow edges away from the
indirect jump (in fact it didn't reckon there were any flow edges
leaving it :) which makes a nonsense of the live variable analysis in
the branches.

A jump insn can now optionally be annotated with a list of destination
labels, and if so, the register allocator creates flow edges to all of
them.

Jump tables are now re-enabled.  They remain disabled for 4.08.1,
since we aren't fixing the problem properly on that branch.

I assume this problem wasn't exposed by the old register allocator
because of the live-range-approximation hacks used in it.  Since it
was undocumented, we'll never know.

Sparc builds will now break until I fix them.

23 years ago[project @ 2000-08-21 15:28:30 by simonmar]
simonmar [Mon, 21 Aug 2000 15:28:30 +0000 (15:28 +0000)]
[project @ 2000-08-21 15:28:30 by simonmar]
look for GMP 3, not GMP 2.

23 years ago[project @ 2000-08-21 15:27:18 by simonmar]
simonmar [Mon, 21 Aug 2000 15:27:18 +0000 (15:27 +0000)]
[project @ 2000-08-21 15:27:18 by simonmar]
Connect up the new GMP.

23 years ago[project @ 2000-08-21 15:21:52 by simonmar]
simonmar [Mon, 21 Aug 2000 15:21:53 +0000 (15:21 +0000)]
[project @ 2000-08-21 15:21:52 by simonmar]
Our local changes to GMP 3.1: disconnect the bits we're not interested
in (mpf, mpq, tests subdirs etc.).

23 years ago[project @ 2000-08-21 15:12:04 by simonmar]
simonmar [Mon, 21 Aug 2000 15:12:07 +0000 (15:12 +0000)]
[project @ 2000-08-21 15:12:04 by simonmar]
merge conflicts (I hope)

23 years ago[project @ 2000-08-21 14:16:57 by simonmar]
simonmar [Mon, 21 Aug 2000 14:16:57 +0000 (14:16 +0000)]
[project @ 2000-08-21 14:16:57 by simonmar]
- add touch# and foreignObjToAddr# primops.

- add these functions to ForeignObj:

withForeignObj  :: ForeignObj -> (Addr -> IO a) -> IO a
touchForeignObj :: ForeignObj -> IO ()

- foreignObjToAddr, which was previously implemented using a _casm_, now
  uses the foreignObjToAddr# primop.

- replace implementations of readXXXOffForeignObj and writeXXXOffForeignObj
  using the withForeignObj and the Addr operations.  ForeignObj.lhs now has
  no _casms_ in it!  (it still can't be compiled with the NCG though, because
  it has a f.i.d.)

23 years ago[project @ 2000-08-21 14:12:17 by simonmar]
simonmar [Mon, 21 Aug 2000 14:12:17 +0000 (14:12 +0000)]
[project @ 2000-08-21 14:12:17 by simonmar]
remove an unused import

23 years ago[project @ 2000-08-21 14:11:35 by simonmar]
simonmar [Mon, 21 Aug 2000 14:11:35 +0000 (14:11 +0000)]
[project @ 2000-08-21 14:11:35 by simonmar]
make this file independent of the actual word size.

23 years ago[project @ 2000-08-21 13:35:46 by simonmar]
simonmar [Mon, 21 Aug 2000 13:35:46 +0000 (13:35 +0000)]
[project @ 2000-08-21 13:35:46 by simonmar]
Fix up a PrimOp dependency.

23 years ago[project @ 2000-08-21 13:34:44 by simonmar]
simonmar [Mon, 21 Aug 2000 13:34:44 +0000 (13:34 +0000)]
[project @ 2000-08-21 13:34:44 by simonmar]
Add touch# and foreignObjToAddr#.

23 years ago[project @ 2000-08-21 13:34:06 by simonmar]
simonmar [Mon, 21 Aug 2000 13:34:06 +0000 (13:34 +0000)]
[project @ 2000-08-21 13:34:06 by simonmar]
- Add touch# and foreignObjToAddr#.

- Add a long comment to the beginning of this file listing the files
  that need to be updated when adding a new primop.

23 years ago[project @ 2000-08-21 13:13:15 by rrt]
rrt [Mon, 21 Aug 2000 13:13:15 +0000 (13:13 +0000)]
[project @ 2000-08-21 13:13:15 by rrt]
Added a worked example of how to export Haskell functions from a DLL
(provided by Sigbj\orn).

23 years ago[project @ 2000-08-18 18:08:48 by qrczak]
qrczak [Fri, 18 Aug 2000 18:08:48 +0000 (18:08 +0000)]
[project @ 2000-08-18 18:08:48 by qrczak]
#include "config.h", to be able to use HsFFI.h from standalone C files.

23 years ago[project @ 2000-08-18 15:44:28 by simonmar]
simonmar [Fri, 18 Aug 2000 15:44:37 +0000 (15:44 +0000)]
[project @ 2000-08-18 15:44:28 by simonmar]
Import stripped-down gmp-3.1.

This will cause severe breakage until I can resolve the conflicts and
check in the rest of the changes, so I'd advise not updating this
directory for a while (unless you're using a system-installed gmp, in
which case it won't matter).

23 years ago[project @ 2000-08-18 15:44:26 by simonmar]
simonmar [Fri, 18 Aug 2000 15:44:26 +0000 (15:44 +0000)]
[project @ 2000-08-18 15:44:26 by simonmar]
Initial revision

23 years ago[project @ 2000-08-18 15:44:25 by simonmar]
simonmar [Fri, 18 Aug 2000 15:44:26 +0000 (15:44 +0000)]
[project @ 2000-08-18 15:44:25 by simonmar]
Import stripped-down gmp-3.1.

This will cause severe breakage until I can resolve the conflicts and
check in the rest of the changes, so I'd advise not updating this
directory for a while (unless you're using a system-installed gmp, in
which case it won't matter).

23 years ago[project @ 2000-08-18 13:30:35 by simonmar]
simonmar [Fri, 18 Aug 2000 13:30:35 +0000 (13:30 +0000)]
[project @ 2000-08-18 13:30:35 by simonmar]
Disable jump tables for the time being; the register allocator gets confused about them.

23 years ago[project @ 2000-08-18 13:29:07 by simonmar]
simonmar [Fri, 18 Aug 2000 13:29:07 +0000 (13:29 +0000)]
[project @ 2000-08-18 13:29:07 by simonmar]
Gratuitously remove a gratuitous ineficiency in allocatableRegs.

23 years ago[project @ 2000-08-18 10:50:37 by rrt]
rrt [Fri, 18 Aug 2000 10:50:37 +0000 (10:50 +0000)]
[project @ 2000-08-18 10:50:37 by rrt]
Revoked comments about not using -static under Windows.

23 years ago[project @ 2000-08-18 06:44:05 by qrczak]
qrczak [Fri, 18 Aug 2000 06:44:05 +0000 (06:44 +0000)]
[project @ 2000-08-18 06:44:05 by qrczak]
Typo s/Lhar/List/

23 years ago[project @ 2000-08-18 06:42:37 by qrczak]
qrczak [Fri, 18 Aug 2000 06:42:37 +0000 (06:42 +0000)]
[project @ 2000-08-18 06:42:37 by qrczak]
Oops, #include reordering does not work if -#include refers to names
from Stg.h. Changes reverted. The original problem requires -optc-Dfoo
workaround.

23 years ago[project @ 2000-08-18 06:34:26 by qrczak]
qrczak [Fri, 18 Aug 2000 06:34:26 +0000 (06:34 +0000)]
[project @ 2000-08-18 06:34:26 by qrczak]
Unused Prelude import check moved to a better place.

23 years ago[project @ 2000-08-18 06:03:26 by qrczak]
qrczak [Fri, 18 Aug 2000 06:03:26 +0000 (06:03 +0000)]
[project @ 2000-08-18 06:03:26 by qrczak]
Never say:
"Warning: Module `Prelude' is imported, but nothing from it is used"

23 years ago[project @ 2000-08-18 04:04:48 by qrczak]
qrczak [Fri, 18 Aug 2000 04:04:48 +0000 (04:04 +0000)]
[project @ 2000-08-18 04:04:48 by qrczak]
Output -#include options before packages' C includes, to be able to
-#include a file that #defines e.g. _XOPEN_SOURCE and #includes a C
header depending on _XOPEN_SOURCE that is also included from Stg.h.
First inclusion of this header should be after the #define.

23 years ago[project @ 2000-08-17 16:28:44 by simonmar]
simonmar [Thu, 17 Aug 2000 16:28:44 +0000 (16:28 +0000)]
[project @ 2000-08-17 16:28:44 by simonmar]
Replace a zipEqual with a zip in tcPat when checking a record pat.
The former version caused a panic with DEBUG on if a record pattern
was used with a non-record constructor.

23 years ago[project @ 2000-08-17 16:15:15 by simonmar]
simonmar [Thu, 17 Aug 2000 16:15:15 +0000 (16:15 +0000)]
[project @ 2000-08-17 16:15:15 by simonmar]
Add some tests for unboxing strict record fields.

23 years ago[project @ 2000-08-17 16:10:01 by simonmar]
simonmar [Thu, 17 Aug 2000 16:10:01 +0000 (16:10 +0000)]
[project @ 2000-08-17 16:10:01 by simonmar]
unboxing strict fields, bug #2:

the unfolding in a record selector id was
completely bogus when -funbox-strict-fields
was in effect.

23 years ago[project @ 2000-08-17 16:04:34 by rrt]
rrt [Thu, 17 Aug 2000 16:04:34 +0000 (16:04 +0000)]
[project @ 2000-08-17 16:04:34 by rrt]
Sorry, that's "RTS hooks work under Windows when the *program* is built
statically, not the compiler".

23 years ago[project @ 2000-08-17 16:03:43 by rrt]
rrt [Thu, 17 Aug 2000 16:03:43 +0000 (16:03 +0000)]
[project @ 2000-08-17 16:03:43 by rrt]
Revised note about RTS hooks under Windows: they should still work for
statically-built compilers.

23 years ago[project @ 2000-08-17 16:02:42 by rrt]
rrt [Thu, 17 Aug 2000 16:02:42 +0000 (16:02 +0000)]
[project @ 2000-08-17 16:02:42 by rrt]
Added a note about RTS hooks not working under Windows with DLLs.

23 years ago[project @ 2000-08-17 16:01:34 by simonmar]
simonmar [Thu, 17 Aug 2000 16:01:34 +0000 (16:01 +0000)]
[project @ 2000-08-17 16:01:34 by simonmar]
remove unused imports.

23 years ago[project @ 2000-08-17 15:21:55 by rrt]
rrt [Thu, 17 Aug 2000 15:21:55 +0000 (15:21 +0000)]
[project @ 2000-08-17 15:21:55 by rrt]
barf when a DLLized RTS tries to allocate a 2nd Windows monster block;
is_heap_alloced stops working at this point. No problem for the static
build.

23 years ago[project @ 2000-08-17 15:19:17 by rrt]
rrt [Thu, 17 Aug 2000 15:19:17 +0000 (15:19 +0000)]
[project @ 2000-08-17 15:19:17 by rrt]
Changed HAVE_WIN32_DLL_SUPPORT to ENABLE_WIN32_DLL_SUPPORT so that the
relevant bits are only used in the dynamic Windows build (as they should be).

23 years ago[project @ 2000-08-17 15:00:13 by simonmar]
simonmar [Thu, 17 Aug 2000 15:00:13 +0000 (15:00 +0000)]
[project @ 2000-08-17 15:00:13 by simonmar]
unboxing strict fields, bug #1:

desugaring a record pattern used the
rep args rather than the original args when
expanding the pattern into a ConPat.

23 years ago[project @ 2000-08-17 14:30:26 by simonmar]
simonmar [Thu, 17 Aug 2000 14:30:26 +0000 (14:30 +0000)]
[project @ 2000-08-17 14:30:26 by simonmar]
Complete the removal of tso->splim (these are the NCG bits).

23 years ago[project @ 2000-08-17 11:36:47 by rrt]
rrt [Thu, 17 Aug 2000 11:36:47 +0000 (11:36 +0000)]
[project @ 2000-08-17 11:36:47 by rrt]
This test used a library module that no longer exists (Printf).

23 years ago[project @ 2000-08-17 11:24:49 by rrt]
rrt [Thu, 17 Aug 2000 11:24:49 +0000 (11:24 +0000)]
[project @ 2000-08-17 11:24:49 by rrt]
Test no longer applicable (fails for non-typechecking reasons: multiple
definition of main)

23 years ago[project @ 2000-08-17 11:22:33 by rrt]
rrt [Thu, 17 Aug 2000 11:22:33 +0000 (11:22 +0000)]
[project @ 2000-08-17 11:22:33 by rrt]
Updated error message.

23 years ago[project @ 2000-08-16 15:29:34 by rrt]
rrt [Wed, 16 Aug 2000 15:29:34 +0000 (15:29 +0000)]
[project @ 2000-08-16 15:29:34 by rrt]
Change use of HAVE_WIN32_DLL_SUPPORT to ENABLE_WIN32_DLL_SUPPORT, to stop
things going horribly wrong with static linking on win32.

23 years ago[project @ 2000-08-16 13:28:25 by simonmar]
simonmar [Wed, 16 Aug 2000 13:28:25 +0000 (13:28 +0000)]
[project @ 2000-08-16 13:28:25 by simonmar]
Don't just pick the back edges ({-# SOURCE #-} imports) when
collecting the list of imports for module initialisation.  It's
entirely possible that a module is only reachable from Main via {-#
SOURCE #-} imports.

23 years ago[project @ 2000-08-15 14:22:24 by simonmar]
simonmar [Tue, 15 Aug 2000 14:22:24 +0000 (14:22 +0000)]
[project @ 2000-08-15 14:22:24 by simonmar]
oops, revert part of previous commit that sneaked in by accident

23 years ago[project @ 2000-08-15 14:18:43 by simonmar]
simonmar [Tue, 15 Aug 2000 14:18:43 +0000 (14:18 +0000)]
[project @ 2000-08-15 14:18:43 by simonmar]
Make the TSO structure shorter by 2 words:

- remove splim.  It was always equal to &(tso->stack) +
  RESERVED_STACK_WORDS.

- make two enum fields 16 bits each instead of 32.

23 years ago[project @ 2000-08-15 14:12:18 by simonmar]
simonmar [Tue, 15 Aug 2000 14:12:18 +0000 (14:12 +0000)]
[project @ 2000-08-15 14:12:18 by simonmar]
this test had random end conditions; make it a bit more deterministic

23 years ago[project @ 2000-08-15 11:56:08 by simonmar]
simonmar [Tue, 15 Aug 2000 11:56:08 +0000 (11:56 +0000)]
[project @ 2000-08-15 11:56:08 by simonmar]
fail properly in ghcExit, now that we don't call error any more.

23 years ago[project @ 2000-08-15 11:48:06 by simonmar]
simonmar [Tue, 15 Aug 2000 11:48:06 +0000 (11:48 +0000)]
[project @ 2000-08-15 11:48:06 by simonmar]
Minor cleanups to a few closure types: we don't use StgPtr in
Closures.h anymore.

23 years ago[project @ 2000-08-15 11:41:19 by rrt]
rrt [Tue, 15 Aug 2000 11:41:19 +0000 (11:41 +0000)]
[project @ 2000-08-15 11:41:19 by rrt]
Add -fvia-C to cg026 (which it needs).

23 years ago[project @ 2000-08-15 11:39:17 by rrt]
rrt [Tue, 15 Aug 2000 11:39:17 +0000 (11:39 +0000)]
[project @ 2000-08-15 11:39:17 by rrt]
Updated error message for "Compilation had errors" so as not to break tests.

23 years ago[project @ 2000-08-10 10:31:46 by simonmar]
simonmar [Thu, 10 Aug 2000 10:33:22 +0000 (10:33 +0000)]
[project @ 2000-08-10 10:31:46 by simonmar]
remove unused imports

23 years ago[project @ 2000-08-10 10:20:03 by rrt]
rrt [Thu, 10 Aug 2000 10:20:03 +0000 (10:20 +0000)]
[project @ 2000-08-10 10:20:03 by rrt]
Reinstated isLocallyDefinedName test in isDllName, because nameModule can't
cope with local names.

23 years ago[project @ 2000-08-09 15:19:58 by rrt]
rrt [Wed, 9 Aug 2000 15:19:58 +0000 (15:19 +0000)]
[project @ 2000-08-09 15:19:58 by rrt]
Changed use of error for "Compilation failed" message to hPutStr stderr;
seemed better to SWM, and stops error messages being different on Windows
where RTS hooks don't work with DLLs.

23 years ago[project @ 2000-08-09 13:39:54 by rrt]
rrt [Wed, 9 Aug 2000 13:39:54 +0000 (13:39 +0000)]
[project @ 2000-08-09 13:39:54 by rrt]
Changes to Windows docs; specifically, remove advice to use -static.

23 years ago[project @ 2000-08-09 13:37:56 by rrt]
rrt [Wed, 9 Aug 2000 13:37:56 +0000 (13:37 +0000)]
[project @ 2000-08-09 13:37:56 by rrt]
Updates to Windows docs to cope with changes in new Cygwin and head of tree
GHC.

23 years ago[project @ 2000-08-09 12:05:39 by rrt]
rrt [Wed, 9 Aug 2000 12:05:39 +0000 (12:05 +0000)]
[project @ 2000-08-09 12:05:39 by rrt]
Clarified remarks about memory usage, and zapped bits specifically about
resources required to compile GHC (this is not ANNOUNCE material).

23 years ago[project @ 2000-08-09 11:45:17 by simonmar]
simonmar [Wed, 9 Aug 2000 11:45:44 +0000 (11:45 +0000)]
[project @ 2000-08-09 11:45:17 by simonmar]
remove unused import

23 years ago[project @ 2000-08-09 11:44:51 by simonmar]
simonmar [Wed, 9 Aug 2000 11:44:51 +0000 (11:44 +0000)]
[project @ 2000-08-09 11:44:51 by simonmar]
remove unused imports

23 years ago[project @ 2000-08-09 11:39:02 by simonmar]
simonmar [Wed, 9 Aug 2000 11:39:02 +0000 (11:39 +0000)]
[project @ 2000-08-09 11:39:02 by simonmar]
avoid some repetition of filenames in the primop rules.

23 years ago[project @ 2000-08-09 11:21:21 by simonmar]
simonmar [Wed, 9 Aug 2000 11:21:21 +0000 (11:21 +0000)]
[project @ 2000-08-09 11:21:21 by simonmar]
build genprimopcode at boot time.

23 years ago[project @ 2000-08-09 10:59:12 by rrt]
rrt [Wed, 9 Aug 2000 10:59:12 +0000 (10:59 +0000)]
[project @ 2000-08-09 10:59:12 by rrt]
werid -> weird

23 years ago[project @ 2000-08-09 09:56:08 by simonmar]
simonmar [Wed, 9 Aug 2000 09:56:08 +0000 (09:56 +0000)]
[project @ 2000-08-09 09:56:08 by simonmar]
make this compile with pre-4.09 GHCs.

23 years ago[project @ 2000-08-08 17:21:12 by rrt]
rrt [Tue, 8 Aug 2000 17:21:12 +0000 (17:21 +0000)]
[project @ 2000-08-08 17:21:12 by rrt]
Fix so that libHS_imp_stub is made before HSrts.dll.

23 years ago[project @ 2000-08-08 16:11:04 by rrt]
rrt [Tue, 8 Aug 2000 16:11:04 +0000 (16:11 +0000)]
[project @ 2000-08-08 16:11:04 by rrt]
Changed DLL_IMPORT_RTS to DLL_IMPORT (I had it the wrong way around).

23 years ago[project @ 2000-08-08 15:16:09 by sewardj]
sewardj [Tue, 8 Aug 2000 15:16:09 +0000 (15:16 +0000)]
[project @ 2000-08-08 15:16:09 by sewardj]
Give the included bits of Haskell their own rules in the Makefile, so
that make boot/depend work properly.

23 years ago[project @ 2000-08-07 23:37:19 by qrczak]
qrczak [Mon, 7 Aug 2000 23:37:24 +0000 (23:37 +0000)]
[project @ 2000-08-07 23:37:19 by qrczak]
Now Char, Char#, StgChar have 31 bits (physically 32).
"foo"# is still an array of bytes.

CharRep represents 32 bits (on a 64-bit arch too). There is also
Int8Rep, used in those places where bytes were originally meant.
readCharArray, indexCharOffAddr etc. still use bytes. Storable and
{I,M}Array use wide Chars.

In future perhaps all sized integers should be primitive types. Then
some usages of indexing primops scattered through the code could
be changed to then-available Int8 ones, and then Char variants of
primops could be made wide (other usages that handle text should use
conversion that will be provided later).

I/O and _ccall_ arguments assume ISO-8859-1. UTF-8 is internally used
for string literals (only).

Z-encoding is ready for Unicode identifiers.

Ranges of intlike and charlike closures are more easily configurable.

I've probably broken nativeGen/MachCode.lhs:chrCode for Alpha but I
don't know the Alpha assembler to fix it (what is zapnot?). Generally
I'm not sure if I've done the NCG changes right.

This commit breaks the binary compatibility (of course).

TODO:
* is* and to{Lower,Upper} in Char (in progress).
* Libraries for text conversion (in design / experiments),
  to be plugged to I/O and a higher level foreign library.
* PackedString.
* StringBuffer and accepting source in encodings other than ISO-8859-1.

23 years ago[project @ 2000-08-07 23:29:46 by qrczak]
qrczak [Mon, 7 Aug 2000 23:29:46 +0000 (23:29 +0000)]
[project @ 2000-08-07 23:29:46 by qrczak]
Use \{ \} in regex instead of { } for literal { }.
Hope it should be OK in theory; needed in practice here.

23 years ago[project @ 2000-08-07 16:09:03 by rrt]
rrt [Mon, 7 Aug 2000 16:09:03 +0000 (16:09 +0000)]
[project @ 2000-08-07 16:09:03 by rrt]
Add COMPILING_STDLIB symbol analagous to COMPILING_RTS for the extern vars
in stgio.h.

23 years ago[project @ 2000-08-07 16:07:53 by rrt]
rrt [Mon, 7 Aug 2000 16:07:53 +0000 (16:07 +0000)]
[project @ 2000-08-07 16:07:53 by rrt]
Add gmp.h to boot target so that it gets copied during booting (otherwise
make boot breaks down).

23 years ago[project @ 2000-08-07 16:06:38 by rrt]
rrt [Mon, 7 Aug 2000 16:06:38 +0000 (16:06 +0000)]
[project @ 2000-08-07 16:06:38 by rrt]
Use $(MV) not mv.

23 years ago[project @ 2000-08-07 14:15:43 by sewardj]
sewardj [Mon, 7 Aug 2000 14:15:43 +0000 (14:15 +0000)]
[project @ 2000-08-07 14:15:43 by sewardj]
This is the program which generates bits of primop-related Haskell
(and, soon, C) code from ghc/compiler/prelude/primops.txt.

23 years ago[project @ 2000-08-07 14:11:48 by sewardj]
sewardj [Mon, 7 Aug 2000 14:11:49 +0000 (14:11 +0000)]
[project @ 2000-08-07 14:11:48 by sewardj]
Reorganise the way primops are done.  Most of the information about
primops, their types and relevant attributes is in prelude/primops.txt.
A supporting program in fptools/ghc/utils/genprimopcode reads this
file and generates various bits of code which are #include'd into
prelude/PrimOp.lhs.  Eventually this mechanism will be extended to
generate PrelGHC.hi and C code for primops in the bytecode evaluator.

Also, add a few primops for creating, reading and writing BCOs.

23 years ago[project @ 2000-08-06 12:22:32 by panne]
panne [Sun, 6 Aug 2000 12:22:32 +0000 (12:22 +0000)]
[project @ 2000-08-06 12:22:32 by panne]
Fixed conversion of MachWord to MachInt for large literals. Although
completely untested, I believe this fixes bug #111021.

23 years ago[project @ 2000-08-06 12:19:21 by panne]
panne [Sun, 6 Aug 2000 12:19:21 +0000 (12:19 +0000)]
[project @ 2000-08-06 12:19:21 by panne]
Replaced `catchIO justIoErrors' with `catchJust ioErrors'

23 years ago[project @ 2000-08-04 23:31:43 by lewie]
lewie [Fri, 4 Aug 2000 23:31:44 +0000 (23:31 +0000)]
[project @ 2000-08-04 23:31:43 by lewie]
Port to OpenBSD from Thomas Nordin.  Please merge with 4.08 (you'll also
need the new config.guess and config.sub from the previous commit).

23 years ago[project @ 2000-08-04 23:28:04 by lewie]
lewie [Fri, 4 Aug 2000 23:28:04 +0000 (23:28 +0000)]
[project @ 2000-08-04 23:28:04 by lewie]
Pulled in latest versions from autoconf 2.13.  Necessary for OpenBSD port.

23 years ago[project @ 2000-08-04 12:04:08 by simonmar]
simonmar [Fri, 4 Aug 2000 12:04:08 +0000 (12:04 +0000)]
[project @ 2000-08-04 12:04:08 by simonmar]
wibble

23 years ago[project @ 2000-08-04 09:45:20 by simonmar]
simonmar [Fri, 4 Aug 2000 09:45:20 +0000 (09:45 +0000)]
[project @ 2000-08-04 09:45:20 by simonmar]
Another attempt at getting the pipeline stuff right.  Fixed at least
one bug.

23 years ago[project @ 2000-08-04 09:02:56 by simonmar]
simonmar [Fri, 4 Aug 2000 09:02:56 +0000 (09:02 +0000)]
[project @ 2000-08-04 09:02:56 by simonmar]
-split-objs is entirely reasonable in conjunction with -fasm

23 years ago[project @ 2000-08-03 16:47:51 by simonmar]
simonmar [Thu, 3 Aug 2000 16:47:51 +0000 (16:47 +0000)]
[project @ 2000-08-03 16:47:51 by simonmar]
wibble

23 years ago[project @ 2000-08-03 13:43:00 by simonmar]
simonmar [Thu, 3 Aug 2000 13:43:00 +0000 (13:43 +0000)]
[project @ 2000-08-03 13:43:00 by simonmar]
- Implement the mkdepend -X<dir> and --exclude-directory=<dir> options.
- some small cleanups

23 years ago[project @ 2000-08-03 13:29:46 by rrt]
rrt [Thu, 3 Aug 2000 13:29:46 +0000 (13:29 +0000)]
[project @ 2000-08-03 13:29:46 by rrt]
Removed isLocallyDefinedName test in isDllName, as SPJ's with SM's suggestion
that it's redundant.

23 years ago[project @ 2000-08-03 13:22:47 by simonmar]
simonmar [Thu, 3 Aug 2000 13:22:47 +0000 (13:22 +0000)]
[project @ 2000-08-03 13:22:47 by simonmar]
The parser didn't properly check that the constructor in a data
declaration really are constructors (ie. begin with an upper case
character).  This patch fixes the problem.

bug reported by: Tim Giesler, a couple of weeks ago.

23 years ago[project @ 2000-08-03 11:34:41 by simonmar]
simonmar [Thu, 3 Aug 2000 11:34:41 +0000 (11:34 +0000)]
[project @ 2000-08-03 11:34:41 by simonmar]
Update the documentation on the +RTS -C option, and remove the note
saying that it doesn't work.

23 years ago[project @ 2000-08-03 11:28:35 by simonmar]
simonmar [Thu, 3 Aug 2000 11:28:35 +0000 (11:28 +0000)]
[project @ 2000-08-03 11:28:35 by simonmar]
Implement +RTS -C<n>, the context switch interval flag.  This was
previously advertised in the usage message, but there was a note in
the Users' Guide stating that it didn't work.  Anwyay, I'm going to
consider it a bug and backport to 4.08.1.

23 years ago[project @ 2000-08-03 10:19:40 by simonmar]
simonmar [Thu, 3 Aug 2000 10:19:40 +0000 (10:19 +0000)]
[project @ 2000-08-03 10:19:40 by simonmar]
Add a cross-ref to the section on Packages from the mention of the
-package flag in the section on linking.

23 years ago[project @ 2000-08-02 16:32:51 by simonmar]
simonmar [Wed, 2 Aug 2000 16:32:51 +0000 (16:32 +0000)]
[project @ 2000-08-02 16:32:51 by simonmar]
remove mkdependHS from the list of directories.

23 years ago[project @ 2000-08-02 15:39:11 by simonmar]
simonmar [Wed, 2 Aug 2000 15:39:11 +0000 (15:39 +0000)]
[project @ 2000-08-02 15:39:11 by simonmar]
Remove the old mkdependHS cruft.

23 years ago[project @ 2000-08-02 15:27:25 by simonmar]
simonmar [Wed, 2 Aug 2000 15:27:25 +0000 (15:27 +0000)]
[project @ 2000-08-02 15:27:25 by simonmar]
Assimilate mkdependHS into the driver, obsoleting the old Perl version.

The functionality is pretty much identical, except a few of the flags
accepted by the old version aren't implemented (--exclude-module,
--exclude-directory, --include-module).  If anyone needs these
options, please speak up.

23 years ago[project @ 2000-08-02 14:13:26 by rrt]
rrt [Wed, 2 Aug 2000 14:13:28 +0000 (14:13 +0000)]
[project @ 2000-08-02 14:13:26 by rrt]
Many fixes to DLLisation. These were previously covered up because code was
leaking into the import libraries for DLLs, so the fact that some symbols
were thought of as local rather than in another DLL wasn't a problem.

The main problems addressed by this commit are:

1. Fixes RTS symbols working properly when DLLised. They didn't before.
2. Uses NULL instead of stg_error_entry, because DLL entry points can't be
   used as static initialisers.
3. PrelGHC.hi-boot changed to be in package RTS, and export of PrelNum and
   PrelErr moved to PrelBase, so that references to primops & the like
   are cross-DLL as they should be.
4. Pass imports around as Modules rather than ModuleNames, so that
   ModuleInitLabels can be checked to see if they're in a DLL or not.

23 years ago[project @ 2000-08-02 13:42:32 by rrt]
rrt [Wed, 2 Aug 2000 13:42:32 +0000 (13:42 +0000)]
[project @ 2000-08-02 13:42:32 by rrt]
Now copied from ghc/rts/gmp.h

23 years ago[project @ 2000-08-02 13:38:13 by rrt]
rrt [Wed, 2 Aug 2000 13:38:13 +0000 (13:38 +0000)]
[project @ 2000-08-02 13:38:13 by rrt]
Allow GMP to be compiled as a DLL.

23 years ago[project @ 2000-08-01 09:08:25 by simonpj]
simonpj [Tue, 1 Aug 2000 09:08:30 +0000 (09:08 +0000)]
[project @ 2000-08-01 09:08:25 by simonpj]
Simon's Marktoberdorf Commits

1.  Tidy up the renaming story for "system binders", such as
dictionary functions, default methods, constructor workers etc.  These
are now documented in HsDecls.  The main effect of the change, apart
from tidying up, is to make the *type-checker* (instead of the
renamer) generate names for dict-funs and default-methods.  This is
good because Sergei's generic-class stuff generates new classes at
typecheck time.

2.  Fix the CSE pass so it does not require the no-shadowing invariant.
Keith discovered that the simplifier occasionally returns a result
with shadowing.  After much fiddling around (which has improved the
code in the simplifier a bit) I found that it is nearly impossible to
arrange that it really does do no-shadowing.  So I gave up and fixed
the CSE pass (which is the only one to rely on it) instead.

3. Fix a performance bug in the simplifier.  The change is in
SimplUtils.interestingArg.  It computes whether an argment should
be considered "interesting"; if a function is applied to an interesting
argument, we are more likely to inline that function.
Consider this case
let x = 3 in f x
The 'x' argument was considered "uninteresting" for a silly reason.
Since x only occurs once, it was unconditionally substituted, but
interestingArg didn't take account of that case.  Now it does.

I also made interestingArg a bit more liberal.  Let's see if we
get too much inlining now.

4.  In the occurrence analyser, we were choosing a bad loop breaker.
Here's the comment that's now in OccurAnal.reOrderRec

    score ((bndr, rhs), _, _)
| exprIsTrivial rhs     = 3 -- Practically certain to be inlined
-- Used to have also: && not (isExportedId bndr)
-- But I found this sometimes cost an extra iteration when we have
-- rec { d = (a,b); a = ...df...; b = ...df...; df = d }
-- where df is the exported dictionary. Then df makes a really
-- bad choice for loop breaker

I also increased the score for bindings with a non-functional type, so that
dictionaries have a better chance of getting inlined early

5. Add a hash code to the InScopeSet (and make it properly abstract)
This should make uniqAway a lot more robust.  Simple experiments suggest
that uniqAway no longer gets into the long iteration chains that it used
to.

6.  Fix a bug in the inliner that made the simplifier tend to get into
a loop where it would keep iterating ("4 iterations, bailing out" message).
In SimplUtils.mkRhsTyLam we float bindings out past a big lambda, thus:
x = /\ b -> let g = \x -> f x x
    in E
becomes
g* = /\a -> \x -> f x x
x = /\ b -> let g = g* b in E

It's essential that we don't simply inling g* back into the RHS of g,
else we will be back to square 1.  The inliner is meant not to do this
because there's no benefit to the inlining, but the size calculation
was a little off in CoreUnfold.

7.  In SetLevels we were bogus-ly building a Subst with an empty in-scope
set, so a WARNING popped up when compiling some modules.  (knights/ChessSetList
was the example that tickled it.)  Now in fact the warning wasn't an error,
but the Right Thing to do is to carry down a proper Subst in SetLevels, so
that is what I have now done.  It is very little more expensive.

23 years ago[project @ 2000-07-31 10:12:19 by simonmar]
simonmar [Mon, 31 Jul 2000 10:12:19 +0000 (10:12 +0000)]
[project @ 2000-07-31 10:12:19 by simonmar]
include GMP's configure files in a src dist.

23 years ago[project @ 2000-07-31 10:06:30 by simonmar]
simonmar [Mon, 31 Jul 2000 10:06:30 +0000 (10:06 +0000)]
[project @ 2000-07-31 10:06:30 by simonmar]
x.yy.DDMMYYYY should be x.yy.YYYYMMDD for unstable snapshots.

23 years ago[project @ 2000-07-27 15:29:31 by michaelw]
michaelw [Thu, 27 Jul 2000 15:29:31 +0000 (15:29 +0000)]
[project @ 2000-07-27 15:29:31 by michaelw]
typo

23 years ago[project @ 2000-07-27 10:46:00 by simonmar]
simonmar [Thu, 27 Jul 2000 10:46:00 +0000 (10:46 +0000)]
[project @ 2000-07-27 10:46:00 by simonmar]
fix for .hc files

23 years ago[project @ 2000-07-27 10:26:04 by simonmar]
simonmar [Thu, 27 Jul 2000 10:26:04 +0000 (10:26 +0000)]
[project @ 2000-07-27 10:26:04 by simonmar]
Cleanup of the compilation pipeline.  Now the list of phases to run
for each filename is generated statically, rather than on-the-fly.

Things should be more robust; some nonsense combinations of flags and
input files are now thrown out.

23 years ago[project @ 2000-07-27 09:02:05 by sewardj]
sewardj [Thu, 27 Jul 2000 09:02:05 +0000 (09:02 +0000)]
[project @ 2000-07-27 09:02:05 by sewardj]
Redo the sparc Ccall machinery, so as to correctly handle the case
where one or more of the args to a Ccall is itself a Ccall.  Prior to
the advent of the Stix inliner, this could never happen, but now it
does.

23 years ago[project @ 2000-07-26 20:47:21 by michaelw]
michaelw [Wed, 26 Jul 2000 20:47:21 +0000 (20:47 +0000)]
[project @ 2000-07-26 20:47:21 by michaelw]
* backup files are only generated, if there is an old dependency file.

* if $Makefile is "-", print dependencies to STDOUT *without* creating
  a backup file.

*** MERGE with 4.08.1 ***

23 years ago[project @ 2000-07-26 18:11:06 by michaelw]
michaelw [Wed, 26 Jul 2000 18:11:06 +0000 (18:11 +0000)]
[project @ 2000-07-26 18:11:06 by michaelw]
added newline at EOF of package files

23 years ago[project @ 2000-07-26 14:48:16 by simonmar]
simonmar [Wed, 26 Jul 2000 14:48:16 +0000 (14:48 +0000)]
[project @ 2000-07-26 14:48:16 by simonmar]
Panic if we try to allocate more than a block's worth of memory in one
go.  No fix yet, but at least this is better than going into an
infinite loop at runtime.