ghc-hetmet.git
22 years ago[project @ 2001-08-12 12:10:22 by simonmar]
simonmar [Sun, 12 Aug 2001 12:10:22 +0000 (12:10 +0000)]
[project @ 2001-08-12 12:10:22 by simonmar]
Update the hc-build script to the recipe I'm using for the FreeBSD
package build.  The main improvement is that after running this script
the resulting tree should be ready for a 'make install' from the top
level.  This is highly fragile and relies on touching various files to
avoid having to recompile anything that will fail :-)

The FreeBSD package that this derives from is well tested, but I
haven't tested the script itself yet.

22 years ago[project @ 2001-08-10 23:08:25 by sof]
sof [Fri, 10 Aug 2001 23:08:25 +0000 (23:08 +0000)]
[project @ 2001-08-10 23:08:25 by sof]
Added SysTools.Option, which lets you identify what are
file-path like options to SysTool.run<Foo>.

Using this, we can now precisely control when to transform
filepaths into a host-compatible format (i.e., we can DOSify
just the right bits under Win32).

22 years ago[project @ 2001-08-10 15:25:49 by simonmar]
simonmar [Fri, 10 Aug 2001 15:25:49 +0000 (15:25 +0000)]
[project @ 2001-08-10 15:25:49 by simonmar]
Fix bug with +RTS -P

22 years ago[project @ 2001-08-10 13:55:58 by simonmar]
simonmar [Fri, 10 Aug 2001 13:55:58 +0000 (13:55 +0000)]
[project @ 2001-08-10 13:55:58 by simonmar]
Test for identifiers containing non-ASCII characters.

22 years ago[project @ 2001-08-10 13:48:06 by simonmar]
simonmar [Fri, 10 Aug 2001 13:49:00 +0000 (13:49 +0000)]
[project @ 2001-08-10 13:48:06 by simonmar]
Remove UnsafeCString (normal CString is fast enough now).

22 years ago[project @ 2001-08-10 11:02:00 by simonmar]
simonmar [Fri, 10 Aug 2001 11:02:00 +0000 (11:02 +0000)]
[project @ 2001-08-10 11:02:00 by simonmar]
Make some foreign imports "unsafe".

22 years ago[project @ 2001-08-10 10:57:23 by simonmar]
simonmar [Fri, 10 Aug 2001 10:57:23 +0000 (10:57 +0000)]
[project @ 2001-08-10 10:57:23 by simonmar]
Fix another place where the maxHeapSize is set to the
heapSizeSuggestion, now that maxHeapSize == 0 indicates "unbounded".

22 years ago[project @ 2001-08-10 10:52:12 by simonmar]
simonmar [Fri, 10 Aug 2001 10:52:12 +0000 (10:52 +0000)]
[project @ 2001-08-10 10:52:12 by simonmar]
Fix an assertion: "large" objects may not necessarily start on a block
boundary, but the only ones that are allowed not to are ByteArrays.

22 years ago[project @ 2001-08-10 09:53:40 by sewardj]
sewardj [Fri, 10 Aug 2001 09:53:40 +0000 (09:53 +0000)]
[project @ 2001-08-10 09:53:40 by sewardj]
Fix Solaris borkage.  Sigh.

22 years ago[project @ 2001-08-10 09:41:17 by simonmar]
simonmar [Fri, 10 Aug 2001 09:41:17 +0000 (09:41 +0000)]
[project @ 2001-08-10 09:41:17 by simonmar]
Claim that MUT_CONS closures have 1 pointer and 1 non-pointer field,
so that the default threading code in GCCompact works for them (it
doesn't thread the mut_link field).  This also matches MUT_VARs, so
it's more consistent.

22 years ago[project @ 2001-08-10 09:40:11 by simonmar]
simonmar [Fri, 10 Aug 2001 09:40:11 +0000 (09:40 +0000)]
[project @ 2001-08-10 09:40:11 by simonmar]
Thread the mut_once_list properly, once, before we start compacting.
Previously we tried to do it during the first threading phase, but we
missing some pointers (namely IND_STATIC objects which are only
reachable via the mut_once list).

22 years ago[project @ 2001-08-10 08:40:51 by simonmar]
simonmar [Fri, 10 Aug 2001 08:40:51 +0000 (08:40 +0000)]
[project @ 2001-08-10 08:40:51 by simonmar]
added pointer to ghc/rts/Adjustor.c, which has some good comments.

22 years ago[project @ 2001-08-10 08:24:38 by simonmar]
simonmar [Fri, 10 Aug 2001 08:24:38 +0000 (08:24 +0000)]
[project @ 2001-08-10 08:24:38 by simonmar]
add missing symbol to RTS_SYMBOLS

22 years ago[project @ 2001-08-10 01:47:39 by chak]
chak [Fri, 10 Aug 2001 01:47:40 +0000 (01:47 +0000)]
[project @ 2001-08-10 01:47:39 by chak]
Added SimonM's explanation about f.e.d. stubs.

22 years ago[project @ 2001-08-09 12:46:06 by sewardj]
sewardj [Thu, 9 Aug 2001 12:46:06 +0000 (12:46 +0000)]
[project @ 2001-08-09 12:46:06 by sewardj]
Remember to initialise stp->bitmap.  Avoids a potential segfault with +RTS -c.

22 years ago[project @ 2001-08-09 12:12:23 by sewardj]
sewardj [Thu, 9 Aug 2001 12:12:23 +0000 (12:12 +0000)]
[project @ 2001-08-09 12:12:23 by sewardj]
Initialise n_large_blocks and n_scavenged_large_blocks.

22 years ago[project @ 2001-08-09 11:32:15 by simonmar]
simonmar [Thu, 9 Aug 2001 11:32:15 +0000 (11:32 +0000)]
[project @ 2001-08-09 11:32:15 by simonmar]
Oops, only ASCII alphanumeric characters are allowed to be used
unencoded in C identifiers, but Char.isAlphaNum includes ISO-8851
alphanumeric characters.

22 years ago[project @ 2001-08-09 11:23:19 by sewardj]
sewardj [Thu, 9 Aug 2001 11:23:19 +0000 (11:23 +0000)]
[project @ 2001-08-09 11:23:19 by sewardj]
Disable debugging machinery which skeaked in in the last commit.

22 years ago[project @ 2001-08-09 11:19:16 by sewardj]
sewardj [Thu, 9 Aug 2001 11:19:16 +0000 (11:19 +0000)]
[project @ 2001-08-09 11:19:16 by sewardj]
C-side FFI support for Byte/Ptr arrays.

22 years ago[project @ 2001-08-09 10:55:53 by sewardj]
sewardj [Thu, 9 Aug 2001 10:55:53 +0000 (10:55 +0000)]
[project @ 2001-08-09 10:55:53 by sewardj]
Change "dunno, mate" into something a bit more helpful.

22 years ago[project @ 2001-08-09 10:54:13 by sewardj]
sewardj [Thu, 9 Aug 2001 10:54:13 +0000 (10:54 +0000)]
[project @ 2001-08-09 10:54:13 by sewardj]
Add support for passing ptr/byte arrays to C.

22 years ago[project @ 2001-08-08 16:03:47 by simonmar]
simonmar [Wed, 8 Aug 2001 16:03:47 +0000 (16:03 +0000)]
[project @ 2001-08-08 16:03:47 by simonmar]
Fix a bug in gcStablePtrTable().

22 years ago[project @ 2001-08-08 15:44:28 by sewardj]
sewardj [Wed, 8 Aug 2001 15:44:28 +0000 (15:44 +0000)]
[project @ 2001-08-08 15:44:28 by sewardj]
Disable use of finalisers attached to UnlinkedBCOs, since finalisers
attached to non-atomic objects may run too early :-(

22 years ago[project @ 2001-08-08 14:40:01 by sewardj]
sewardj [Wed, 8 Aug 2001 14:40:01 +0000 (14:40 +0000)]
[project @ 2001-08-08 14:40:01 by sewardj]
Attach finaliser for malloc'd blocks to the UnlinkedBCOs, not to
linked really-really-really BCOs.  This is because an unlinked BCO
may be copied many times to generated LinkedBCOs before it dies.
Attaching finalisers to linked BCOs could mean multiple free()s on
the same address.

22 years ago[project @ 2001-08-08 14:36:14 by simonmar]
simonmar [Wed, 8 Aug 2001 14:36:14 +0000 (14:36 +0000)]
[project @ 2001-08-08 14:36:14 by simonmar]
Define allocaBytes in terms of the new pinned ByteArray primitives.
This version is over 6 times faster than the old version using
malloc/free.

22 years ago[project @ 2001-08-08 14:30:45 by simonmar]
simonmar [Wed, 8 Aug 2001 14:30:45 +0000 (14:30 +0000)]
[project @ 2001-08-08 14:30:45 by simonmar]
update expected output

22 years ago[project @ 2001-08-08 14:29:59 by simonmar]
simonmar [Wed, 8 Aug 2001 14:29:59 +0000 (14:29 +0000)]
[project @ 2001-08-08 14:29:59 by simonmar]
Remove parse error.  This test actually doesn't work!

22 years ago[project @ 2001-08-08 14:28:08 by simonmar]
simonmar [Wed, 8 Aug 2001 14:28:08 +0000 (14:28 +0000)]
[project @ 2001-08-08 14:28:08 by simonmar]
Fix parse error and remove ^Ms (an untested test?)

22 years ago[project @ 2001-08-08 14:23:09 by simonmar]
simonmar [Wed, 8 Aug 2001 14:25:15 +0000 (14:25 +0000)]
[project @ 2001-08-08 14:23:09 by simonmar]
update expected output

22 years ago[project @ 2001-08-08 14:21:07 by simonmar]
simonmar [Wed, 8 Aug 2001 14:21:07 +0000 (14:21 +0000)]
[project @ 2001-08-08 14:21:07 by simonmar]
semantics of take, drop and splitAt have changed

22 years ago[project @ 2001-08-08 14:18:12 by simonmar]
simonmar [Wed, 8 Aug 2001 14:18:58 +0000 (14:18 +0000)]
[project @ 2001-08-08 14:18:12 by simonmar]
update expected output

22 years ago[project @ 2001-08-08 14:14:08 by simonmar]
simonmar [Wed, 8 Aug 2001 14:14:09 +0000 (14:14 +0000)]
[project @ 2001-08-08 14:14:08 by simonmar]
Flag tweaks: +RTS -c now means "enable compaction all the time"
(previously there was no way to do this *and* run without a maximum
heap size).

The heuristics for determining the generation sizes are also slightly
better now.

22 years ago[project @ 2001-08-08 14:11:58 by sewardj]
sewardj [Wed, 8 Aug 2001 14:11:58 +0000 (14:11 +0000)]
[project @ 2001-08-08 14:11:58 by sewardj]
Use the bytecode generator's monad to keep track of the malloc'd blocks
created for each BCO.  Eventually use this info to generate a finaliser
which is tied to the real, linked BCO

22 years ago[project @ 2001-08-08 13:45:02 by simonmar]
simonmar [Wed, 8 Aug 2001 13:45:02 +0000 (13:45 +0000)]
[project @ 2001-08-08 13:45:02 by simonmar]
wibble

22 years ago[project @ 2001-08-08 13:44:13 by simonmar]
simonmar [Wed, 8 Aug 2001 13:44:13 +0000 (13:44 +0000)]
[project @ 2001-08-08 13:44:13 by simonmar]
oops, forgot to thread the link and global_link fields of a large
TSO.  Fixes a potential crash with the compacting collector.

22 years ago[project @ 2001-08-08 13:31:05 by simonmar]
simonmar [Wed, 8 Aug 2001 13:31:05 +0000 (13:31 +0000)]
[project @ 2001-08-08 13:31:05 by simonmar]
update expected output

22 years ago[project @ 2001-08-08 13:22:27 by simonmar]
simonmar [Wed, 8 Aug 2001 13:22:27 +0000 (13:22 +0000)]
[project @ 2001-08-08 13:22:27 by simonmar]
lib specifications aren't allowed any more

[ merge into new test suite ]

22 years ago[project @ 2001-08-08 13:21:04 by qrczak]
qrczak [Wed, 8 Aug 2001 13:21:05 +0000 (13:21 +0000)]
[project @ 2001-08-08 13:21:04 by qrczak]
Remove -H80M options introduced a week ago.

22 years ago[project @ 2001-08-08 13:19:34 by simonmar]
simonmar [Wed, 8 Aug 2001 13:19:34 +0000 (13:19 +0000)]
[project @ 2001-08-08 13:19:34 by simonmar]
Change some section ids so they aren't as likely to clash with the User Guide.

22 years ago[project @ 2001-08-08 13:19:07 by simonmar]
simonmar [Wed, 8 Aug 2001 13:19:08 +0000 (13:19 +0000)]
[project @ 2001-08-08 13:19:07 by simonmar]
- Rearrange the FFI documentation: put it all in chapter 8.

- Add a section "Using the FFI with GHC", and add some information about
  the stub files generated by GHC for foreign export dynamic.

22 years ago[project @ 2001-08-08 12:27:37 by rrt]
rrt [Wed, 8 Aug 2001 12:27:37 +0000 (12:27 +0000)]
[project @ 2001-08-08 12:27:37 by rrt]
Instead of copying the assemblies we need to this directory, write an
app.exe.config file for each program we run.

22 years ago[project @ 2001-08-08 12:06:28 by sewardj]
sewardj [Wed, 8 Aug 2001 12:06:28 +0000 (12:06 +0000)]
[project @ 2001-08-08 12:06:28 by sewardj]
Remove the last use of unsavouryPerformIO in this module.  What a lot
of hassle.  Gimme a Von Neumann machine any day.

22 years ago[project @ 2001-08-08 11:27:17 by simonmar]
simonmar [Wed, 8 Aug 2001 11:27:17 +0000 (11:27 +0000)]
[project @ 2001-08-08 11:27:17 by simonmar]
oops, don't set the -M size to the -H size if -M is zero (i.e. turned
off).  Should fix the breakage encountered by last night's nightly build.

22 years ago[project @ 2001-08-08 11:11:06 by sewardj]
sewardj [Wed, 8 Aug 2001 11:11:06 +0000 (11:11 +0000)]
[project @ 2001-08-08 11:11:06 by sewardj]
"Greetings, earthlings.  Take us to your mutable variables."
^A^K^K
Build the bytecode generator's monad on top of IO, and as a result get
rid of various unsafePerformIOs.

22 years ago[project @ 2001-08-08 10:50:36 by simonmar]
simonmar [Wed, 8 Aug 2001 10:50:37 +0000 (10:50 +0000)]
[project @ 2001-08-08 10:50:36 by simonmar]
Had a brainwave on the way to work this morning, and realised that the
garbage collector can handle "pinned objects" as long as they don't
contain any pointers.

This is absolutely ideal for doing temporary allocation in the FFI,
because what we really want to do is allocate a pinned ByteArray and
let the GC clean it up later.  So this set of changes adds the
required framework.

There are two new primops:

 newPinnedByteArray# :: Int# -> State# s -> (# State# s, MutByteArr# s #)
 byteArrayContents#  :: ByteArr# -> Addr#

obviously byteArrayContents# is highly unsafe.

Allocating a pinned ByteArr# isn't the default, because a pinned
ByteArr# will hold an entire block (currently 4k) live until it is
garbage collected (that doesn't mean each pinned ByteArr# requires
4k of storage, just that if a block contains a single live pinned
ByteArray, the whole block must be retained).

22 years ago[project @ 2001-08-08 10:36:59 by simonmar]
simonmar [Wed, 8 Aug 2001 10:36:59 +0000 (10:36 +0000)]
[project @ 2001-08-08 10:36:59 by simonmar]
update expected output

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