ghc-hetmet.git
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

22 years ago[project @ 2001-07-24 16:04:21 by simonpj]
simonpj [Tue, 24 Jul 2001 16:04:21 +0000 (16:04 +0000)]
[project @ 2001-07-24 16:04:21 by simonpj]
Add errorCString

22 years ago[project @ 2001-07-24 15:57:27 by simonpj]
simonpj [Tue, 24 Jul 2001 15:57:27 +0000 (15:57 +0000)]
[project @ 2001-07-24 15:57:27 by simonpj]
Make absent-arg errors more descriptive

22 years ago[project @ 2001-07-24 15:13:01 by simonmar]
simonmar [Tue, 24 Jul 2001 15:13:01 +0000 (15:13 +0000)]
[project @ 2001-07-24 15:13:01 by simonmar]
More tweaks.  Getting usable now.

22 years ago[project @ 2001-07-24 14:29:13 by simonmar]
simonmar [Tue, 24 Jul 2001 14:29:13 +0000 (14:29 +0000)]
[project @ 2001-07-24 14:29:13 by simonmar]
Make compacting GC faster, stage 1.

A cunning trick from Simon P.J. to avoid needing to call the
potentially expensive LOOKS_LIKE_GHC_INFO() a lot.

22 years ago[project @ 2001-07-24 10:38:48 by simonmar]
simonmar [Tue, 24 Jul 2001 10:38:48 +0000 (10:38 +0000)]
[project @ 2001-07-24 10:38:48 by simonmar]
remove extra SRC_MKDEPENDC_OPTS, since we shouldn't be doing a
mkdependC in this directory at all.

22 years ago[project @ 2001-07-24 10:37:57 by simonmar]
simonmar [Tue, 24 Jul 2001 10:37:57 +0000 (10:37 +0000)]
[project @ 2001-07-24 10:37:57 by simonmar]
Remove whitespace from the end of lines.  The extra whitespace is
syntactically meaningful to make(!) and was causing us to do
a superfluous mkdependC in directories without any C files.

22 years ago[project @ 2001-07-24 10:31:07 by simonmar]
simonmar [Tue, 24 Jul 2001 10:31:07 +0000 (10:31 +0000)]
[project @ 2001-07-24 10:31:07 by simonmar]
libm is a dependency of the RTS now, so don't also depend on it for
package "std".

22 years ago[project @ 2001-07-24 10:28:51 by simonmar]
simonmar [Tue, 24 Jul 2001 10:28:51 +0000 (10:28 +0000)]
[project @ 2001-07-24 10:28:51 by simonmar]
back the last change out; a better way to get all the hc files you need is

SRC_HC_OPTS += -keep-hc-files

in your build.mk.

22 years ago[project @ 2001-07-24 09:55:16 by simonpj]
simonpj [Tue, 24 Jul 2001 09:55:16 +0000 (09:55 +0000)]
[project @ 2001-07-24 09:55:16 by simonpj]
Two fixes to the demand analyis.

1.  Don't look inside Coerces.  These wrap recursive newtypes,
and we might fail to find a fixpoint if we look inside them.

2.  Polymorphic 'seq' is represented by a (Seq _ _ []) demand,
so lub/both must be prepared to take a Seq with an empty list
of demands without complaint.

22 years ago[project @ 2001-07-24 09:53:27 by simonpj]
simonpj [Tue, 24 Jul 2001 09:53:27 +0000 (09:53 +0000)]
[project @ 2001-07-24 09:53:27 by simonpj]
Keep the printed stuff for Demand and DmdResult separate, else
we can get confused when parsing a strictness signature.  For
example, previously

LX

could have been parsed as L  -> X
or as LX -> T

Urk!  I've taken the simple path of making DmdResults print in
lower case.  Thus

Lx  means L  -> x
LX means LX -> t

22 years ago[project @ 2001-07-24 09:46:55 by simonmar]
simonmar [Tue, 24 Jul 2001 09:46:55 +0000 (09:46 +0000)]
[project @ 2001-07-24 09:46:55 by simonmar]
Add Ken Shan to the contributor's list for his heroic work on the
Alpha port of GHC.  Thanks Ken!

22 years ago[project @ 2001-07-24 09:08:47 by simonpj]
simonpj [Tue, 24 Jul 2001 09:08:47 +0000 (09:08 +0000)]
[project @ 2001-07-24 09:08:47 by simonpj]
Add missing cases to newDemand

22 years ago[project @ 2001-07-24 06:31:35 by ken]
ken [Tue, 24 Jul 2001 06:31:36 +0000 (06:31 +0000)]
[project @ 2001-07-24 06:31:35 by ken]
Innocent changes to resurrect/add 64-bit support.

22 years ago[project @ 2001-07-24 06:02:21 by ken]
ken [Tue, 24 Jul 2001 06:02:21 +0000 (06:02 +0000)]
[project @ 2001-07-24 06:02:21 by ken]
Fix typo in StgRun() for the Alpha

22 years ago[project @ 2001-07-24 06:01:21 by ken]
ken [Tue, 24 Jul 2001 06:01:21 +0000 (06:01 +0000)]
[project @ 2001-07-24 06:01:21 by ken]
#include <string.h> to get proper prototypes

22 years ago[project @ 2001-07-24 05:53:27 by ken]
ken [Tue, 24 Jul 2001 05:53:27 +0000 (05:53 +0000)]
[project @ 2001-07-24 05:53:27 by ken]
Removed debugging (tracing) code.

22 years ago[project @ 2001-07-24 05:49:32 by ken]
ken [Tue, 24 Jul 2001 05:49:32 +0000 (05:49 +0000)]
[project @ 2001-07-24 05:49:32 by ken]
Fixed punctuation typo.

22 years ago[project @ 2001-07-24 05:17:52 by ken]
ken [Tue, 24 Jul 2001 05:17:52 +0000 (05:17 +0000)]
[project @ 2001-07-24 05:17:52 by ken]
Added -I$(GHC_INCLUDE_DIR) to $(SRC_MKDEPENDC_OPTS), so that
mkdependC can find its include files properly.

22 years ago[project @ 2001-07-24 05:08:51 by ken]
ken [Tue, 24 Jul 2001 05:08:51 +0000 (05:08 +0000)]
[project @ 2001-07-24 05:08:51 by ken]
Made "nat" 64-bit ("unsigned long") rather than 32-bit ("unsigned int")
on 64-bit machines.  This fixes some problems caused by code elsewhere
assuming that sizeof(nat) == sizeof(void *).

22 years ago[project @ 2001-07-24 05:07:37 by ken]
ken [Tue, 24 Jul 2001 05:07:37 +0000 (05:07 +0000)]
[project @ 2001-07-24 05:07:37 by ken]
Added -lm to the extra_libraries list for the rts package.  This is
because ldexp() is used by StgPrimFloat.c and is in -lm on alpha-osf3.

22 years ago[project @ 2001-07-24 05:05:41 by ken]
ken [Tue, 24 Jul 2001 05:05:41 +0000 (05:05 +0000)]
[project @ 2001-07-24 05:05:41 by ken]
Added $(GhcHcOpts) to $(SRC_HC_OPTS), so that by setting
--keep-hc-files-too in $(GhcHcOpts) we get .hc files for the
Haskell code under this directory, ghc/driver.

22 years ago[project @ 2001-07-24 05:04:58 by ken]
ken [Tue, 24 Jul 2001 05:04:59 +0000 (05:04 +0000)]
[project @ 2001-07-24 05:04:58 by ken]
Removed 32-bit dependencies in the generation and handling of
liveness mask bitmaps.  We now support both 32-bit and 64-bit
machines with identical .hc files.  Support for >64-bit machines
would be easy to add.  Note that old .hc files are incompatible
with the changes made to ghc/include/InfoMacros.h!

22 years ago[project @ 2001-07-24 04:52:49 by ken]
ken [Tue, 24 Jul 2001 04:52:49 +0000 (04:52 +0000)]
[project @ 2001-07-24 04:52:49 by ken]
Made some code #ifdef GHCI, so that it will compile without GHCI enabled.

22 years ago[project @ 2001-07-24 04:47:06 by ken]
ken [Tue, 24 Jul 2001 04:47:06 +0000 (04:47 +0000)]
[project @ 2001-07-24 04:47:06 by ken]
Added missing hyphen in frnot of machdepCCOpts for mips and powerpc.

22 years ago[project @ 2001-07-24 04:46:37 by ken]
ken [Tue, 24 Jul 2001 04:46:37 +0000 (04:46 +0000)]
[project @ 2001-07-24 04:46:37 by ken]
Added -Xlinker -noprefix_recognition to Alpha-specific
machdepCCOpts.  We need this flag to disable the following
documented behavior of ld(1) on Digital UNIX:

   All routines that start with __init_ are treated, by default,
   as initialization routines. These are routines that are called
   without an argument when the file that contains them is loaded
   or when the program that contains them is started.

Unfortunately, this flag produces the annoying (but harmless) gcc
message

    gcc: -noprefix_recognition: linker input file unused since
    linking not done

(See also mk/bootstrap.mk)

22 years ago[project @ 2001-07-24 04:45:59 by ken]
ken [Tue, 24 Jul 2001 04:45:59 +0000 (04:45 +0000)]
[project @ 2001-07-24 04:45:59 by ken]
Added -static, a flag for compiling on the Alpha that is already
listed under machdepCCOpts in DriverFlags.hs.  Without it, the
following assert in GC.c fails:

    /* make sure the info pointer is into text space */
    ASSERT(q && (LOOKS_LIKE_GHC_INFO(GET_INFO(q))
                 || IS_HUGS_CONSTR_INFO(GET_INFO(q))));

Added -Xlinker -noprefix_recognition, a flag for Alpha compilation
that I just added to machdepCCOpts in DriverFlags.hs.  We need
this flag to disable the following documented behavior of ld(1) on
Digital UNIX:

   All routines that start with __init_ are treated, by default,
   as initialization routines. These are routines that are called
   without an argument when the file that contains them is loaded
   or when the program that contains them is started.

Unfortunately, this flag produces the annoying (but harmless) gcc
message

    gcc: -noprefix_recognition: linker input file unused since
    linking not done

(See also ghc/compiler/main/DriverFlags.hs)

22 years ago[project @ 2001-07-24 04:41:40 by ken]
ken [Tue, 24 Jul 2001 04:41:40 +0000 (04:41 +0000)]
[project @ 2001-07-24 04:41:40 by ken]
Added #include "SchedAPI.h" to fix compiler warning message.

22 years ago[project @ 2001-07-24 04:39:31 by ken]
ken [Tue, 24 Jul 2001 04:39:32 +0000 (04:39 +0000)]
[project @ 2001-07-24 04:39:31 by ken]
Make the Time module thread-safe by calling the reentrant functions
gmtime_r and localtime_r instead of gmtime and localtime wherever
they are available.

(This is necessary to make Time work at all on our Alpha machine --
perhaps GHC tickles the reentrancy of the C library or something?)

22 years ago[project @ 2001-07-24 04:35:36 by ken]
ken [Tue, 24 Jul 2001 04:35:36 +0000 (04:35 +0000)]
[project @ 2001-07-24 04:35:36 by ken]
Fixed: The type of sec and usec in struct timeval are always 32 bits,
but not always a CLong.  (On Alphas, CLong is 64 bits.)

22 years ago[project @ 2001-07-23 23:37:35 by andy]
andy [Mon, 23 Jul 2001 23:37:35 +0000 (23:37 +0000)]
[project @ 2001-07-23 23:37:35 by andy]
Adding the -Pa flag. This allows you to see all the cost centres

22 years ago[project @ 2001-07-23 23:29:47 by ken]
ken [Mon, 23 Jul 2001 23:29:47 +0000 (23:29 +0000)]
[project @ 2001-07-23 23:29:47 by ken]
Removed 32-bit assumptions.

22 years ago[project @ 2001-07-23 23:27:50 by ken]
ken [Mon, 23 Jul 2001 23:27:50 +0000 (23:27 +0000)]
[project @ 2001-07-23 23:27:50 by ken]
- Added recommended gcc warning flag: -Wcast-align

  - Fixed: "make distclean" would run in the gmp subdirectory multiple
    times, once for each way.  The second time, the Makefile in there
    is gone, causing an error.

22 years ago[project @ 2001-07-23 23:26:14 by ken]
ken [Mon, 23 Jul 2001 23:26:14 +0000 (23:26 +0000)]
[project @ 2001-07-23 23:26:14 by ken]
Changed comment to reflect reality: We now use 32-bit thread IDs, not
64-bit ones.

22 years ago[project @ 2001-07-23 23:14:58 by ken]
ken [Mon, 23 Jul 2001 23:14:58 +0000 (23:14 +0000)]
[project @ 2001-07-23 23:14:58 by ken]
Removed 32-bit assumptions in info table macros (mostly replacing
StgWord32 with StgWord).

22 years ago[project @ 2001-07-23 23:13:07 by ken]
ken [Mon, 23 Jul 2001 23:13:07 +0000 (23:13 +0000)]
[project @ 2001-07-23 23:13:07 by ken]
Brought the mangler up-to-date for the Alpha.

22 years ago[project @ 2001-07-23 23:10:03 by ken]
ken [Mon, 23 Jul 2001 23:10:03 +0000 (23:10 +0000)]
[project @ 2001-07-23 23:10:03 by ken]
Fixed: The second-stage compilation in this script should use the compiler
built in the first stage.  Also, configure wants to find Happy, so we feed
it fake-happy (presuming that the ghc-less machine also does not have happy).

22 years ago[project @ 2001-07-23 23:08:41 by sof]
sof [Mon, 23 Jul 2001 23:08:41 +0000 (23:08 +0000)]
[project @ 2001-07-23 23:08:41 by sof]
lex_demand: added a couple of missing cases for new demand type

22 years ago[project @ 2001-07-23 23:08:04 by ken]
ken [Mon, 23 Jul 2001 23:08:04 +0000 (23:08 +0000)]
[project @ 2001-07-23 23:08:04 by ken]
Rearranged the usage help message to move --no-compile to the bottom.

More importantly-- Fixed: hsc2hs was translating

    #def inline ... function(...) { ... }

into (assuming defined(__GNUC__))

    [in the _hsc.h file:]  extern inline ... function(...)
    [in the _hsc.c file:]  inline ... function(...)

while it should really be translated into

    [in the _hsc.h file:]  extern inline ... function(...)
    [in the _hsc.c file:]  ... function(...)

(without the "inline" in the _hsc.c file).  Quoting the gcc documentation
for "inline":

>    If you specify both `inline' and `extern' in the function
> definition, then the definition is used only for inlining.  In no case
> is the function compiled on its own, not even if you refer to its
> address explicitly.  Such an address becomes an external reference, as
> if you had only declared the function, and had not defined it.
>
>    This combination of `inline' and `extern' has almost the effect of a
> macro.  The way to use it is to put a function definition in a header
> file with these keywords, and put another copy of the definition
> (lacking `inline' and `extern') in a library file.  The definition in
> the header file will cause most calls to the function to be inlined.
> If any uses of the function remain, they will refer to the single copy
> in the library.

22 years ago[project @ 2001-07-23 23:02:37 by ken]
ken [Mon, 23 Jul 2001 23:02:37 +0000 (23:02 +0000)]
[project @ 2001-07-23 23:02:37 by ken]
Added documentation for hsc2hs "--no-compile" option.

22 years ago[project @ 2001-07-23 22:56:44 by ken]
ken [Mon, 23 Jul 2001 22:56:44 +0000 (22:56 +0000)]
[project @ 2001-07-23 22:56:44 by ken]
Add the *.a.list "list of object files to archive" file
to MOSTLY_CLEAN_FILES.

22 years ago[project @ 2001-07-23 22:52:33 by ken]
ken [Mon, 23 Jul 2001 22:52:33 +0000 (22:52 +0000)]
[project @ 2001-07-23 22:52:33 by ken]
Improved how we build library archives:

On Digital UNIX (or where otherwise available), use the "Z" option to
compress archives as we build them.

On Digital UNIX 5 (or where otherwise available), use the "-input" option,
which reads from a specified file the list of objects to archive.  This is
significantly faster than piping the list of objects to xargs when the
number of objects to archive is large.

22 years ago[project @ 2001-07-23 22:38:02 by ken]
ken [Mon, 23 Jul 2001 22:38:02 +0000 (22:38 +0000)]
[project @ 2001-07-23 22:38:02 by ken]
Fixed: making dependencies for Haskell source files fails if -split-objs
is present in $(HC_OPTS).

22 years ago[project @ 2001-07-23 22:33:52 by ken]
ken [Mon, 23 Jul 2001 22:33:53 +0000 (22:33 +0000)]
[project @ 2001-07-23 22:33:52 by ken]
Added "--enable-hc-boot-unregisterised" option to configure,
for bootstrapping from unregisterised HC files.

22 years ago[project @ 2001-07-23 22:26:18 by ken]
ken [Mon, 23 Jul 2001 22:26:18 +0000 (22:26 +0000)]
[project @ 2001-07-23 22:26:18 by ken]
Teach configure.in to canonicalise new-fangled Alpha system names,
such as alphaev67-dec-osf5.0, to alpha-dec-osf3.

22 years ago[project @ 2001-07-23 22:22:58 by ken]
ken [Mon, 23 Jul 2001 22:22:58 +0000 (22:22 +0000)]
[project @ 2001-07-23 22:22:58 by ken]
Added a helper script "fake-happy" that fakes "happy -v" output.
It is useful for bootstrapping on new platforms.

22 years ago[project @ 2001-07-23 22:19:59 by ken]
ken [Mon, 23 Jul 2001 22:19:59 +0000 (22:19 +0000)]
[project @ 2001-07-23 22:19:59 by ken]
Grab the latest versions of config.guess and config.sub from GNU.

22 years ago[project @ 2001-07-23 21:31:00 by sof]
sof [Mon, 23 Jul 2001 21:31:00 +0000 (21:31 +0000)]
[project @ 2001-07-23 21:31:00 by sof]
ranlib gmp/libgmp.a - needed for a.out plats (OpenBSD in particular).

22 years ago[project @ 2001-07-23 20:19:53 by sof]
sof [Mon, 23 Jul 2001 20:19:53 +0000 (20:19 +0000)]
[project @ 2001-07-23 20:19:53 by sof]
Handle leading underscores for PrelMain undefineds

22 years ago[project @ 2001-07-23 18:25:48 by sof]
sof [Mon, 23 Jul 2001 18:25:48 +0000 (18:25 +0000)]
[project @ 2001-07-23 18:25:48 by sof]
Get rid off DEBUG - prev commit didn't attack the real problem

22 years ago[project @ 2001-07-23 17:28:33 by simonmar]
simonmar [Mon, 23 Jul 2001 17:28:33 +0000 (17:28 +0000)]
[project @ 2001-07-23 17:28:33 by simonmar]
Back out change that tried to sneak in with the new garbage collector.

22 years ago[project @ 2001-07-23 17:23:19 by simonmar]
simonmar [Mon, 23 Jul 2001 17:23:20 +0000 (17:23 +0000)]
[project @ 2001-07-23 17:23:19 by simonmar]
Add a compacting garbage collector.

It isn't enabled by default, as there are still a couple of problems:
there's a fallback case I haven't implemented yet which means it will
occasionally bomb out, and speed-wise it's quite a bit slower than the
copying collector (about 1.8x slower).

Until I can make it go faster, it'll only be useful when you're
actually running low on real memory.

'+RTS -c' to enable it.

Oh, and I cleaned up a few things in the RTS while I was there, and
fixed one or two possibly real bugs in the existing GC.

22 years ago[project @ 2001-07-23 16:27:41 by simonpj]
simonpj [Mon, 23 Jul 2001 16:27:41 +0000 (16:27 +0000)]
[project @ 2001-07-23 16:27:41 by simonpj]
Wibble

22 years ago[project @ 2001-07-23 16:16:47 by sof]
sof [Mon, 23 Jul 2001 16:16:47 +0000 (16:16 +0000)]
[project @ 2001-07-23 16:16:47 by sof]
Mismatched module name in non-DEBUG case

22 years ago[project @ 2001-07-23 15:11:55 by simonmar]
simonmar [Mon, 23 Jul 2001 15:11:55 +0000 (15:11 +0000)]
[project @ 2001-07-23 15:11:55 by simonmar]
Grrr.  Do not #include "Stg.h" in plain C code, because that enables
all the global register variables.  #include "Rts.h" directly instead.

This was correct in the original StgLongLong.c, why on earth it was
changed is beyond me.

22 years ago[project @ 2001-07-23 13:49:49 by simonmar]
simonmar [Mon, 23 Jul 2001 13:49:49 +0000 (13:49 +0000)]
[project @ 2001-07-23 13:49:49 by simonmar]
add a couple of missing ';'

22 years ago[project @ 2001-07-23 11:44:15 by qrczak]
qrczak [Mon, 23 Jul 2001 11:44:15 +0000 (11:44 +0000)]
[project @ 2001-07-23 11:44:15 by qrczak]
import qualified Demand

22 years ago[project @ 2001-07-23 10:54:46 by simonpj]
simonpj [Mon, 23 Jul 2001 10:54:50 +0000 (10:54 +0000)]
[project @ 2001-07-23 10:54:46 by simonpj]
---------------------------------
Switch to the new demand analyser
---------------------------------

This commit makes the new demand analyser the main beast,
with the old strictness analyser as a backup.  When
DEBUG is on, the old strictness analyser is run too, and the
results compared.

WARNING: this isn't thorougly tested yet, so expect glitches.
Delay updating for a few days if the HEAD is mission critical
for you.

But do try it out.  I'm away for 2.5 weeks from Thursday, so
it would be good to shake out any glaring bugs before then.

22 years ago[project @ 2001-07-23 10:48:56 by simonpj]
simonpj [Mon, 23 Jul 2001 10:48:56 +0000 (10:48 +0000)]
[project @ 2001-07-23 10:48:56 by simonpj]
block/unblockAsynchExns have arity 2

22 years ago[project @ 2001-07-23 10:47:16 by simonmar]
simonmar [Mon, 23 Jul 2001 10:47:16 +0000 (10:47 +0000)]
[project @ 2001-07-23 10:47:16 by simonmar]
Small changes to improve GC performance slightly:

  - store the generation *number* in the block descriptor rather
    than a pointer to the generation structure, since the most
    common operation is to pull out the generation number, and
    it's one less indirection this way.

  - cache the generation number in the step structure too, which
    avoids an extra indirection in several places.

22 years ago[project @ 2001-07-23 10:43:42 by simonmar]
simonmar [Mon, 23 Jul 2001 10:43:42 +0000 (10:43 +0000)]
[project @ 2001-07-23 10:43:42 by simonmar]
The real version of this file is in ghc/includes/.

22 years ago[project @ 2001-07-23 10:43:18 by simonmar]
simonmar [Mon, 23 Jul 2001 10:43:18 +0000 (10:43 +0000)]
[project @ 2001-07-23 10:43:18 by simonmar]
merge in changes from rts/Linker.h

22 years ago[project @ 2001-07-23 10:42:37 by simonmar]
simonmar [Mon, 23 Jul 2001 10:42:37 +0000 (10:42 +0000)]
[project @ 2001-07-23 10:42:37 by simonmar]
Small fixes to the help text for the -i heap profiling interval option.

22 years ago[project @ 2001-07-23 10:24:57 by simonpj]
simonpj [Mon, 23 Jul 2001 10:24:58 +0000 (10:24 +0000)]
[project @ 2001-07-23 10:24:57 by simonpj]
Yet another newtype-squashing bug; this time TcType.unifyTyX

22 years ago[project @ 2001-07-22 03:28:25 by chak]
chak [Sun, 22 Jul 2001 03:28:25 +0000 (03:28 +0000)]
[project @ 2001-07-22 03:28:25 by chak]
ELF_TARGET_386 has to be #defined for x86/Solaris.

22 years ago[project @ 2001-07-22 03:19:51 by chak]
chak [Sun, 22 Jul 2001 03:19:51 +0000 (03:19 +0000)]
[project @ 2001-07-22 03:19:51 by chak]
Solaris system headers contain function definitions (not just prototypes) for
some functions; eg, stat().  WDP decided to toss (some of) them out during
mangling.  I think, this is wrong, as the list of these functions changes with
varying Solaris releases and it makes foreign importing these functions more
complicated; in particular, it broke Directory.hsc and PosixFiles on
x86/Solaris.

22 years ago[project @ 2001-07-21 19:08:44 by sof]
sof [Sat, 21 Jul 2001 19:08:44 +0000 (19:08 +0000)]
[project @ 2001-07-21 19:08:44 by sof]
ghc-inplace.bat: COMMAND.COM doesn't support %*, fall back to using %[1-9]

22 years ago[project @ 2001-07-21 11:38:19 by simonmar]
simonmar [Sat, 21 Jul 2001 11:38:19 +0000 (11:38 +0000)]
[project @ 2001-07-21 11:38:19 by simonmar]
make ==> $(MAKE)

22 years ago[project @ 2001-07-20 16:48:20 by simonpj]
simonpj [Fri, 20 Jul 2001 16:48:21 +0000 (16:48 +0000)]
[project @ 2001-07-20 16:48:20 by simonpj]
This commit adds the very convenient function

  Subst.substTyWith :: [TyVar] -> [Type] -> Type -> Type

and uses it in various places.

22 years ago[project @ 2001-07-20 16:47:55 by simonpj]
simonpj [Fri, 20 Jul 2001 16:47:55 +0000 (16:47 +0000)]
[project @ 2001-07-20 16:47:55 by simonpj]
------------------------
More newtype squashing
------------------------

Recursive newtypes were confusing the worker/wrapper generator.
This is because I originally got rid of opaque newtypes altogether,
then put them back for recursive ones only, and forgot to reinstate
the cunning stuff in the w/w stuff.

(Discovered by Sigbjorn; thanks!)

22 years ago[project @ 2001-07-20 15:22:21 by simonpj]
simonpj [Fri, 20 Jul 2001 15:22:22 +0000 (15:22 +0000)]
[project @ 2001-07-20 15:22:21 by simonpj]
-----------------------
Get rid of ArityAtLeast
-----------------------

Now that we have CgInfo, with the exact code-generator arity
for the value, we don't need the distinction between ArityAtLeast
and ArityExactly in the ArityInfo field of an IdInfo.

This commit makes

type ArityInfo = Maybe Arity

and propagates this change consistently through the compiler.

22 years ago[project @ 2001-07-20 10:09:32 by simonpj]
simonpj [Fri, 20 Jul 2001 10:09:32 +0000 (10:09 +0000)]
[project @ 2001-07-20 10:09:32 by simonpj]
Third cut at the demand analyser; seems to work nicely now

22 years ago[project @ 2001-07-20 10:08:56 by simonpj]
simonpj [Fri, 20 Jul 2001 10:08:56 +0000 (10:08 +0000)]
[project @ 2001-07-20 10:08:56 by simonpj]
--------------------------------------------
Hack around an infelicity in the simplifier
-------------------------------------------

Use 3 iterations of the simplifier (instead of the previous 2)
because otherwise we land up with huge dead expressions.
Reason: an infelicity in the simpifier.

      let k = BIG in foldr k z xs
 ==>  let k = BIG in letrec go = \xs -> ...(k x).... in go xs
 ==>  let k = BIG in letrec go = \xs -> ...(BIG x).... in go xs
 Don't stop now!

I couldn't see an easy way to make the simplifier avoid this
big intermediate, so I hacked round it like this.

22 years ago[project @ 2001-07-20 10:05:37 by simonpj]
simonpj [Fri, 20 Jul 2001 10:05:37 +0000 (10:05 +0000)]
[project @ 2001-07-20 10:05:37 by simonpj]
--------------------------
Correct a bug in exprArity
--------------------------

This long-standing bug meant that exprArity gave over-pessimistic
answers.  e.g.

\x -> f x

where nothing is known about f.  We were getting

0 (for f)
-1 (for the argument)
+1 (for the lambda)
-----
0

The right answer is of course 1.

22 years ago[project @ 2001-07-20 01:05:11 by sof]
sof [Fri, 20 Jul 2001 01:05:11 +0000 (01:05 +0000)]
[project @ 2001-07-20 01:05:11 by sof]
lookupSymbol (PEi386-only): When chasing down a label in a DLL, try
removing the initial underscore (if any). I've prefixed the comment
next to the change with the label 'HACK', as I'm not sure whether
this is a name mangling operation you should always do when going
from the import library name to the DLL-bound thing.
(Julian, could you have a look?)

Fixes probs with 'foreign import'ing DLL-bound symbols.

22 years ago[project @ 2001-07-20 00:44:33 by sof]
sof [Fri, 20 Jul 2001 00:44:33 +0000 (00:44 +0000)]
[project @ 2001-07-20 00:44:33 by sof]
Since longlong prims are no longer in the RTS, extend RTS_MINGW_ONLY_SYMBOLS with some reqd libgcc syms

22 years ago[project @ 2001-07-19 22:08:07 by sof]
sof [Thu, 19 Jul 2001 22:08:07 +0000 (22:08 +0000)]
[project @ 2001-07-19 22:08:07 by sof]
More FPTOOLS_END_{TEXT,DATA}_SECTION fixes

22 years ago[project @ 2001-07-19 20:27:23 by sof]
sof [Thu, 19 Jul 2001 20:27:23 +0000 (20:27 +0000)]
[project @ 2001-07-19 20:27:23 by sof]
FPTOOLS_END_{TEXT,DATA}_SECTION: fix 'test -n' usage

22 years ago[project @ 2001-07-19 15:34:39 by apt]
apt [Thu, 19 Jul 2001 15:34:39 +0000 (15:34 +0000)]
[project @ 2001-07-19 15:34:39 by apt]
fix typo in double2IntLit

22 years ago[project @ 2001-07-19 15:33:17 by apt]
apt [Thu, 19 Jul 2001 15:33:17 +0000 (15:33 +0000)]
[project @ 2001-07-19 15:33:17 by apt]
external core: omit repn for recursive newtypes and fix char literals

22 years ago[project @ 2001-07-19 15:32:05 by apt]
apt [Thu, 19 Jul 2001 15:32:05 +0000 (15:32 +0000)]
[project @ 2001-07-19 15:32:05 by apt]
reinstate inlinings that are completely within an INLINE

22 years ago[project @ 2001-07-19 14:23:16 by rrt]
rrt [Thu, 19 Jul 2001 14:23:16 +0000 (14:23 +0000)]
[project @ 2001-07-19 14:23:16 by rrt]
More fixes to allow GHC to live in C:\Program Files

22 years ago[project @ 2001-07-19 09:26:33 by simonpj]
simonpj [Thu, 19 Jul 2001 09:26:33 +0000 (09:26 +0000)]
[project @ 2001-07-19 09:26:33 by simonpj]
Next cut at the demand analyser

22 years ago[project @ 2001-07-19 09:26:08 by simonpj]
simonpj [Thu, 19 Jul 2001 09:26:09 +0000 (09:26 +0000)]
[project @ 2001-07-19 09:26:08 by simonpj]
Move eqListBy to Util, and use it

22 years ago[project @ 2001-07-19 09:24:56 by simonpj]
simonpj [Thu, 19 Jul 2001 09:24:56 +0000 (09:24 +0000)]
[project @ 2001-07-19 09:24:56 by simonpj]
Output a slightly better message for -ddump-hi-diffs

22 years ago[project @ 2001-07-19 09:03:24 by simonmar]
simonmar [Thu, 19 Jul 2001 09:03:24 +0000 (09:03 +0000)]
[project @ 2001-07-19 09:03:24 by simonmar]
Fix a number of bugs in the autoconf setup, thanks to Gregory Wright
<gwright@packetstorm.com>.

22 years ago[project @ 2001-07-19 09:01:40 by simonmar]
simonmar [Thu, 19 Jul 2001 09:01:40 +0000 (09:01 +0000)]
[project @ 2001-07-19 09:01:40 by simonmar]
remove a vestige of the long-gone FLOATS_AS_DOUBLES

22 years ago[project @ 2001-07-19 08:28:59 by andy]
andy [Thu, 19 Jul 2001 08:28:59 +0000 (08:28 +0000)]
[project @ 2001-07-19 08:28:59 by andy]
import of hscThing needs to be conditional on GHCi status.