ghc-hetmet.git
22 years ago[project @ 2002-03-25 15:56:00 by sof]
sof [Mon, 25 Mar 2002 15:56:00 +0000 (15:56 +0000)]
[project @ 2002-03-25 15:56:00 by sof]
hc-file-bundle: removed dangling ParseIface.hs pointer

22 years ago[project @ 2002-03-25 15:08:38 by simonpj]
simonpj [Mon, 25 Mar 2002 15:08:39 +0000 (15:08 +0000)]
[project @ 2002-03-25 15:08:38 by simonpj]
-------------------------------
Fix bugs in rank-N polymorphism
-------------------------------

Discussion with Mark showed up some bugs in the rank-N
polymorphism stuff, especally concerning the treatment of
'hole' type variables.

See especially TcMType:
newHoleTyVar
readHoleResult
zapToType

Also the treatment of conditionals and case branches
is done right now, using zapToType

22 years ago[project @ 2002-03-25 14:58:32 by simonpj]
simonpj [Mon, 25 Mar 2002 14:58:32 +0000 (14:58 +0000)]
[project @ 2002-03-25 14:58:32 by simonpj]
imports

22 years ago[project @ 2002-03-25 14:41:05 by simonpj]
simonpj [Mon, 25 Mar 2002 14:41:05 +0000 (14:41 +0000)]
[project @ 2002-03-25 14:41:05 by simonpj]
Comments

22 years ago[project @ 2002-03-25 05:21:19 by sof]
sof [Mon, 25 Mar 2002 05:21:19 +0000 (05:21 +0000)]
[project @ 2002-03-25 05:21:19 by sof]
RTS_MINGW_ONLY_SYMBOLS: added rewinddir()

22 years ago[project @ 2002-03-25 05:11:16 by sof]
sof [Mon, 25 Mar 2002 05:11:16 +0000 (05:11 +0000)]
[project @ 2002-03-25 05:11:16 by sof]
not using -lpthread w/ mingw

22 years ago[project @ 2002-03-21 11:23:59 by sebc]
sebc [Thu, 21 Mar 2002 11:24:00 +0000 (11:24 +0000)]
[project @ 2002-03-21 11:23:59 by sebc]
Implement Plan C, with correct code to detect the data and text
sections for MacOS X.
Also add a sanity check in initStorage, to make sure we are able to
make the distinction between closures and infotables.

22 years ago[project @ 2002-03-21 09:00:54 by simonpj]
simonpj [Thu, 21 Mar 2002 09:00:54 +0000 (09:00 +0000)]
[project @ 2002-03-21 09:00:54 by simonpj]
Restore lost imports for catchJust, ioErrors, accidentally removed
by Sigbjorn's commit. (Hard to spot -- it's only needed for 4.08 and earlier.)

22 years ago[project @ 2002-03-20 23:07:02 by sebc]
sebc [Wed, 20 Mar 2002 23:07:02 +0000 (23:07 +0000)]
[project @ 2002-03-20 23:07:02 by sebc]
Update a comment only.

22 years ago[project @ 2002-03-20 20:21:15 by sof]
sof [Wed, 20 Mar 2002 20:21:15 +0000 (20:21 +0000)]
[project @ 2002-03-20 20:21:15 by sof]
findPackageMod: for source imports, restrict ourselves to looking for hi-boots only

22 years ago[project @ 2002-03-20 20:20:26 by sof]
sof [Wed, 20 Mar 2002 20:20:26 +0000 (20:20 +0000)]
[project @ 2002-03-20 20:20:26 by sof]
import tidyup

22 years ago[project @ 2002-03-20 19:42:49 by sof]
sof [Wed, 20 Mar 2002 19:42:49 +0000 (19:42 +0000)]
[project @ 2002-03-20 19:42:49 by sof]
maybeHomeModule: if chasing after a source import, _only_ look for hi-boots

22 years ago[project @ 2002-03-20 14:46:17 by simonpj]
simonpj [Wed, 20 Mar 2002 14:46:18 +0000 (14:46 +0000)]
[project @ 2002-03-20 14:46:17 by simonpj]
Put module dependency info in the commentary

22 years ago[project @ 2002-03-20 11:24:42 by simonpj]
simonpj [Wed, 20 Mar 2002 11:25:35 +0000 (11:25 +0000)]
[project @ 2002-03-20 11:24:42 by simonpj]
Unravel module loop again (tested this time; sorry)

22 years ago[project @ 2002-03-19 11:37:38 by simonpj]
simonpj [Tue, 19 Mar 2002 11:37:40 +0000 (11:37 +0000)]
[project @ 2002-03-19 11:37:38 by simonpj]
Unravel accidental module loop (sorry)

22 years ago[project @ 2002-03-19 11:24:51 by simonmar]
simonmar [Tue, 19 Mar 2002 11:24:52 +0000 (11:24 +0000)]
[project @ 2002-03-19 11:24:51 by simonmar]
Fix 64-bit shift operations.

- Move the declarations of the 64-bit "primops" from PrimOps.h to
  HsBase.h where they more properly belong.

- change the names of the 64-bit shift ops to include the "unchecked"
  prefix

- add checked versions of these primops to GHC.Int and GHC.Word, and
  use them.

- update the FFI declarations in GHC.Int and GHC.Word while I'm there.

22 years ago[project @ 2002-03-18 15:27:08 by simonpj]
simonpj [Mon, 18 Mar 2002 15:27:08 +0000 (15:27 +0000)]
[project @ 2002-03-18 15:27:08 by simonpj]
More on linear implicit params

22 years ago[project @ 2002-03-18 15:23:05 by simonpj]
simonpj [Mon, 18 Mar 2002 15:23:07 +0000 (15:23 +0000)]
[project @ 2002-03-18 15:23:05 by simonpj]
Tidier printing routines for Rules

22 years ago[project @ 2002-03-18 15:22:31 by simonpj]
simonpj [Mon, 18 Mar 2002 15:22:31 +0000 (15:22 +0000)]
[project @ 2002-03-18 15:22:31 by simonpj]
Remove spurious ? in linear implicit parameter printing

22 years ago[project @ 2002-03-18 15:21:59 by simonpj]
simonpj [Mon, 18 Mar 2002 15:21:59 +0000 (15:21 +0000)]
[project @ 2002-03-18 15:21:59 by simonpj]
Fix grevious bug in linear implicit parameter splitting for free Insts

22 years ago[project @ 2002-03-18 15:21:25 by simonpj]
simonpj [Mon, 18 Mar 2002 15:21:25 +0000 (15:21 +0000)]
[project @ 2002-03-18 15:21:25 by simonpj]
Splittable class comes from GlaExts now

22 years ago[project @ 2002-03-18 09:47:35 by simonmar]
simonmar [Mon, 18 Mar 2002 09:47:35 +0000 (09:47 +0000)]
[project @ 2002-03-18 09:47:35 by simonmar]
PrelGHC ==> GHC.Prim, for what it's worth (this documentation is quite
out of date).

22 years ago[project @ 2002-03-18 09:46:35 by simonmar]
simonmar [Mon, 18 Mar 2002 09:46:35 +0000 (09:46 +0000)]
[project @ 2002-03-18 09:46:35 by simonmar]
PrelGHC ==> GHC.Prim (comments only)

22 years ago[project @ 2002-03-18 09:45:54 by simonmar]
simonmar [Mon, 18 Mar 2002 09:45:54 +0000 (09:45 +0000)]
[project @ 2002-03-18 09:45:54 by simonmar]
PrelGHC ==> GHC.Prim (in comments only)

22 years ago[project @ 2002-03-18 09:45:10 by simonmar]
simonmar [Mon, 18 Mar 2002 09:45:10 +0000 (09:45 +0000)]
[project @ 2002-03-18 09:45:10 by simonmar]
PrelGHC ==> GHC.Prim

22 years ago[project @ 2002-03-18 09:44:46 by simonmar]
simonmar [Mon, 18 Mar 2002 09:44:46 +0000 (09:44 +0000)]
[project @ 2002-03-18 09:44:46 by simonmar]
update mention of PrelGHC

22 years ago[project @ 2002-03-15 16:08:16 by simonpj]
simonpj [Fri, 15 Mar 2002 16:08:16 +0000 (16:08 +0000)]
[project @ 2002-03-15 16:08:16 by simonpj]
Import wibbles

22 years ago[project @ 2002-03-15 13:57:27 by simonmar]
simonmar [Fri, 15 Mar 2002 13:57:32 +0000 (13:57 +0000)]
[project @ 2002-03-15 13:57:27 by simonmar]
Take the old strictness analyser out of #ifdef DEBUG and put it
instead in #ifdef OLD_STRICTNESS.  DEBUG was getting a bit slow.

22 years ago[project @ 2002-03-14 17:10:14 by simonmar]
simonmar [Thu, 14 Mar 2002 17:10:14 +0000 (17:10 +0000)]
[project @ 2002-03-14 17:10:14 by simonmar]
No need to compile Printf.lhs with -fvia-c now.

22 years ago[project @ 2002-03-14 17:09:46 by simonmar]
simonmar [Thu, 14 Mar 2002 17:09:46 +0000 (17:09 +0000)]
[project @ 2002-03-14 17:09:46 by simonmar]
The foreign declaration for snprintf was wrong, because we need to
give the type of the C function after applying C's type promotion
rules.  Hence the Float argument should be a Double, because it
occurs in the vararg section of the function type.

22 years ago[project @ 2002-03-14 17:05:13 by simonmar]
simonmar [Thu, 14 Mar 2002 17:05:13 +0000 (17:05 +0000)]
[project @ 2002-03-14 17:05:13 by simonmar]
Back out previous fix, it was wrong.

22 years ago[project @ 2002-03-14 16:22:31 by simonmar]
simonmar [Thu, 14 Mar 2002 16:22:34 +0000 (16:22 +0000)]
[project @ 2002-03-14 16:22:31 by simonmar]
Misc cleanup: remove the iface pretty-printing style, and clean up
bits of StringBuffer that aren't required any more.

22 years ago[project @ 2002-03-14 15:52:13 by simonmar]
simonmar [Thu, 14 Mar 2002 15:52:14 +0000 (15:52 +0000)]
[project @ 2002-03-14 15:52:13 by simonmar]
undo accidental commits

22 years ago[project @ 2002-03-14 15:49:36 by simonpj]
simonpj [Thu, 14 Mar 2002 15:49:36 +0000 (15:49 +0000)]
[project @ 2002-03-14 15:49:36 by simonpj]
Documentation about type system extensions

22 years ago[project @ 2002-03-14 15:47:52 by simonmar]
simonmar [Thu, 14 Mar 2002 15:47:55 +0000 (15:47 +0000)]
[project @ 2002-03-14 15:47:52 by simonmar]
Remove the interface file parser, and move .hi-boot parsing into the
main parser.  The syntax of .hi-boot files is now greatly improved in
terms of readability; here's an example:

module M where
data T
f :: T -> GHC.Base.Int

note that
(a) layout can be used
(b) there's no explcit export list; everything declared
    is implicitly exported
(c) Z-encoding of names is no longer required
(d) Any identifier not declared in the current module must
    still be quailified with the module which originally
    defined it (eg. GHC.Base.Int above).

We'd like to relax (d), but that will come later.

22 years ago[project @ 2002-03-14 15:27:15 by simonpj]
simonpj [Thu, 14 Mar 2002 15:27:22 +0000 (15:27 +0000)]
[project @ 2002-03-14 15:27:15 by simonpj]
------------------------
Change
GlobalName --> ExternalName
LocalName  ->  InternalName
------------------------

For a long time there's been terminological confusion between

GlobalName vs LocalName  (property of a Name)
GlobalId vs LocalId  (property of an Id)

I've now changed the terminology for Name to be

ExternalName vs InternalName

I've also added quite a bit of documentation in the Commentary.

22 years ago[project @ 2002-03-14 15:26:53 by simonpj]
simonpj [Thu, 14 Mar 2002 15:26:54 +0000 (15:26 +0000)]
[project @ 2002-03-14 15:26:53 by simonpj]
Lots of stuff about external and internal names

22 years ago[project @ 2002-03-14 11:23:42 by simonmar]
simonmar [Thu, 14 Mar 2002 11:23:42 +0000 (11:23 +0000)]
[project @ 2002-03-14 11:23:42 by simonmar]
Turn "return e" into "return $! e" in several places to improve
performance.

22 years ago[project @ 2002-03-13 16:31:05 by simonmar]
simonmar [Wed, 13 Mar 2002 16:31:05 +0000 (16:31 +0000)]
[project @ 2002-03-13 16:31:05 by simonmar]
Remove -fall-strict

22 years ago[project @ 2002-03-13 14:37:11 by simonmar]
simonmar [Wed, 13 Mar 2002 14:37:11 +0000 (14:37 +0000)]
[project @ 2002-03-13 14:37:11 by simonmar]
Update the documentation to reflect new commands since 5.02.2:

:browse
:set args
:set prog
:show bindings
:show modules

and the new syntax for :module.

22 years ago[project @ 2002-03-13 13:51:34 by simonmar]
simonmar [Wed, 13 Mar 2002 13:51:35 +0000 (13:51 +0000)]
[project @ 2002-03-13 13:51:34 by simonmar]
Fix the -fasm/-fvia-C auto-selection again: now we're back to the
proper behaviour, namely -fasm is the default unless you specify -O or
-fvia-C, but only on arch's that support it.

I screwed it up in the previous commit, but it exposed a bug in the
NCG so it wasn't all bad :)

22 years ago[project @ 2002-03-13 13:48:32 by simonmar]
simonmar [Wed, 13 Mar 2002 13:48:32 +0000 (13:48 +0000)]
[project @ 2002-03-13 13:48:32 by simonmar]
Cope with VoidRep fields in a static constructor.

22 years ago[project @ 2002-03-13 13:48:04 by simonmar]
simonmar [Wed, 13 Mar 2002 13:48:04 +0000 (13:48 +0000)]
[project @ 2002-03-13 13:48:04 by simonmar]
It *is* possible to get VoidRep fields in a constructor, but their
representation should be empty (not a zero word).

22 years ago[project @ 2002-03-13 13:39:15 by simonmar]
simonmar [Wed, 13 Mar 2002 13:39:15 +0000 (13:39 +0000)]
[project @ 2002-03-13 13:39:15 by simonmar]
Fix panic message.

22 years ago[project @ 2002-03-13 11:27:11 by simonmar]
simonmar [Wed, 13 Mar 2002 11:27:11 +0000 (11:27 +0000)]
[project @ 2002-03-13 11:27:11 by simonmar]
GHC version wibble

22 years ago[project @ 2002-03-12 16:48:52 by simonmar]
simonmar [Tue, 12 Mar 2002 16:48:52 +0000 (16:48 +0000)]
[project @ 2002-03-12 16:48:52 by simonmar]
Fix a bug in the native code generator's handling of floating-point
arguments to ccalls: it wasn't correctly promoting float arguments to
doubles.  Amazingly this has gone undetected for quite a while.

Fixes bug #523996.

22 years ago[project @ 2002-03-12 16:45:59 by simonmar]
simonmar [Tue, 12 Mar 2002 16:45:59 +0000 (16:45 +0000)]
[project @ 2002-03-12 16:45:59 by simonmar]
Forced commit: note that the previous revision also improved the error
message for a compiler stack overflow slightly.

22 years ago[project @ 2002-03-12 16:40:57 by simonmar]
simonmar [Tue, 12 Mar 2002 16:40:57 +0000 (16:40 +0000)]
[project @ 2002-03-12 16:40:57 by simonmar]
eek!  Somehow, I managed to make -fvia-C the default on the HEAD and
nobody noticed for two months.

22 years ago[project @ 2002-03-12 15:55:26 by simonpj]
simonpj [Tue, 12 Mar 2002 15:55:27 +0000 (15:55 +0000)]
[project @ 2002-03-12 15:55:26 by simonpj]
------------------------
Fix a type-invariant bug
------------------------

We need to call Type.mkGenTyConApp from Type.mkAppTy, in
case there's a partially applied type synonym.  Explanation
with Type.mkAppTy.  All part of GHC's rather liberal treatment
of type synonyms.

Shown up by a program from Ralf Laemmel:

type Generic i o = forall x. i x -> o x
type Id x = x
comb :: Generic Id Id

Test is typecheck/should_compile/tc149.hs

22 years ago[project @ 2002-03-12 15:28:25 by simonmar]
simonmar [Tue, 12 Mar 2002 15:28:25 +0000 (15:28 +0000)]
[project @ 2002-03-12 15:28:25 by simonmar]
Add a magic number to the beginning of interface files (0x1face :-) to
avoid trying to read old text-style interfaces as binary (the usual
result is an attempt to allocate a ByteArray larger than the available
memory size and an obscure crash).

22 years ago[project @ 2002-03-12 13:57:11 by simonmar]
simonmar [Tue, 12 Mar 2002 13:57:14 +0000 (13:57 +0000)]
[project @ 2002-03-12 13:57:11 by simonmar]
If we are in a deadlock situation but there are signal handlers
installed, pause() instead of reporting deadlock.  One of the signal
handlers may allow the process to continue after being triggered.

Fixes bug #525772.

I've made a half-hearted attempt to clean up the deadlock code in the
scheduler, it now looks slightly better.

22 years ago[project @ 2002-03-12 11:50:02 by simonmar]
simonmar [Tue, 12 Mar 2002 11:51:07 +0000 (11:51 +0000)]
[project @ 2002-03-12 11:50:02 by simonmar]
Main threads are now not kept alive artificially, so it is possible
for a main thread to be sent the BlockedOnDeadMVar exception.  Main
threads are no longer GC roots.

This involved cleaning up the weak pointer processing somewhat, and
separating the processing of real weak pointers from the processing of
the all_threads list (which can be thought of as "weaker pointers": a
finalizer can keep a blocked thread alive, but not vice-versa).  The
new story is described in a detailed comment in GC.c.

One interesting consequence is that it's much harder to get a Deadlock
exception now - many deadlock situations involving main threads will
turn into BlockedOnDeadMVar situations instead.  For example, if there
are a group of threads in a circular deadlock, then they will all be
sent BlockedOnDeadMVar simultaneously, whereas before if one of them
was the main thread it would be sent Deadlock.  It's really hard to
get Deadlock now - you have to somehow keep an MVar independently
reachable, eg. by using a StablePtr.

22 years ago[project @ 2002-03-12 10:41:48 by simonmar]
simonmar [Tue, 12 Mar 2002 10:41:48 +0000 (10:41 +0000)]
[project @ 2002-03-12 10:41:48 by simonmar]
When deciding whether the source for a module is unchanged, don't look
at the file referred to in the argument of '-o' unless it really is
the object file for this compilation (it might be the binary instead).

MERGE TO STABLE

22 years ago[project @ 2002-03-12 10:37:31 by simonmar]
simonmar [Tue, 12 Mar 2002 10:37:31 +0000 (10:37 +0000)]
[project @ 2002-03-12 10:37:31 by simonmar]
- Fix brokenness in foreign export.
- Remove some unused imports.

22 years ago[project @ 2002-03-12 09:23:01 by simonmar]
simonmar [Tue, 12 Mar 2002 09:23:01 +0000 (09:23 +0000)]
[project @ 2002-03-12 09:23:01 by simonmar]
- Add quotes around invocation of ${WithGhc-ghc}, in case the pathname
  has spaces in (bug #528810).

- remove now-unused definition of is_gcc_v3.

22 years ago[project @ 2002-03-12 09:13:08 by simonpj]
simonpj [Tue, 12 Mar 2002 09:13:08 +0000 (09:13 +0000)]
[project @ 2002-03-12 09:13:08 by simonpj]
-----------
Fix mkSynTy
-----------

Fix a nasty and long-lived bug in mkSynTy which meant that in:

newtype A a = A a
type B = A
f :: B Double

the type (B Double) wasn't regarded properly as (A Double).  This bug
has lasted for a long time because the type inference engine is fairly
forgiving about missing the invariant that a TyConApp always looks
like one right at the top level.  In fact, it's so forgiving that I
don't know how to tickle this bug into showing up.  (It showed up in
5.02, becuase the context-simplification for 'deriving' is done by a
different engine as all the other context simplification.)

Still, the invariant should hold, and this fix makes it so.

22 years ago[project @ 2002-03-12 09:12:57 by simonpj]
simonpj [Tue, 12 Mar 2002 09:12:58 +0000 (09:12 +0000)]
[project @ 2002-03-12 09:12:57 by simonpj]
Comments

22 years ago[project @ 2002-03-11 13:56:49 by simonmar]
simonmar [Mon, 11 Mar 2002 13:56:49 +0000 (13:56 +0000)]
[project @ 2002-03-11 13:56:49 by simonmar]
import openFileEx and IOModeEx(..)

22 years ago[project @ 2002-03-11 11:17:01 by simonmar]
simonmar [Mon, 11 Mar 2002 11:17:01 +0000 (11:17 +0000)]
[project @ 2002-03-11 11:17:01 by simonmar]
Add a warning about booting from .hc files on GHC 5.xx, and recommend
using 4.08.2 instead.

22 years ago[project @ 2002-03-11 10:55:11 by simonmar]
simonmar [Mon, 11 Mar 2002 10:55:11 +0000 (10:55 +0000)]
[project @ 2002-03-11 10:55:11 by simonmar]
Re-instate ifeq "$(way)" "" around the rule for recursively descending
into SUBDIRS that I removed a while back.  This will fix a bug in
nofib whereby if NoFibWays is set to anything then we do O(n^2)
traversals of the tree, but it also means you can't sit at the top of
the tree and say 'make way=p' to just build profiling libraries (which
was the reason I made the change in the first place).  We'll have to
find another way to do this.

22 years ago[project @ 2002-03-08 16:03:13 by simonpj]
simonpj [Fri, 8 Mar 2002 16:03:13 +0000 (16:03 +0000)]
[project @ 2002-03-08 16:03:13 by simonpj]
Documentation for more liberal class-method types

22 years ago[project @ 2002-03-08 16:00:39 by simonmar]
simonmar [Fri, 8 Mar 2002 16:00:39 +0000 (16:00 +0000)]
[project @ 2002-03-08 16:00:39 by simonmar]
Make this compile with various GHC versions (hopefully)

22 years ago[project @ 2002-03-08 15:51:19 by simonpj]
simonpj [Fri, 8 Mar 2002 15:51:19 +0000 (15:51 +0000)]
[project @ 2002-03-08 15:51:19 by simonpj]
wibble

22 years ago[project @ 2002-03-08 15:50:53 by simonpj]
simonpj [Fri, 8 Mar 2002 15:50:57 +0000 (15:50 +0000)]
[project @ 2002-03-08 15:50:53 by simonpj]
--------------------------------------
Lift the class-method type restriction
--------------------------------------

Haskell 98 prohibits class method types to mention constraints on the
class type variable, thus:

  class Seq s a where
    fromList :: [a] -> s a
    elem     :: Eq a => a -> s a -> Bool

The type of 'elem' is illegal in Haskell 98, because it contains the
constraint 'Eq a', which constrains only the class type variable (in
this case 'a').

This commit lifts the restriction.  The way we do that is to do a full
context reduction (tcSimplifyCheck) step for each method separately in
TcClassDcl.tcMethodBind, rather than doing a single context reduction
for the whole group of method bindings.

As a result, I had to reorganise the code a bit, and tidy up.

22 years ago[project @ 2002-03-08 15:47:18 by simonpj]
simonpj [Fri, 8 Mar 2002 15:47:19 +0000 (15:47 +0000)]
[project @ 2002-03-08 15:47:18 by simonpj]
------------------------
Kill Type.splitRepFunTys
------------------------

splitRepFunTys was a Bad Function that split up a function type
looking through even recursive newtypes.  Alas, it diverged if
when we had a recursive newtype with a function whose result was
the newtype itself.

I've replaced it with ordinary splitFunTys, plus a new function
Type.dropForAlls, which does what you would expect.

22 years ago[project @ 2002-03-08 15:42:12 by simonpj]
simonpj [Fri, 8 Mar 2002 15:42:12 +0000 (15:42 +0000)]
[project @ 2002-03-08 15:42:12 by simonpj]
Read and write interfaces in binary mode; important for Win32

22 years ago[project @ 2002-03-07 17:53:05 by keithw]
keithw [Thu, 7 Mar 2002 17:53:05 +0000 (17:53 +0000)]
[project @ 2002-03-07 17:53:05 by keithw]
Resurrect GC_SEL_MAJOR_ctr, GC_SEL_MINOR_ctr, GC_SEL_ABANDONED_ctr
(untested).

22 years ago[project @ 2002-03-06 18:47:36 by sof]
sof [Wed, 6 Mar 2002 18:47:36 +0000 (18:47 +0000)]
[project @ 2002-03-06 18:47:36 by sof]
debugging-by-nightly-build-report: make it 4.08 compatible again..?

22 years ago[project @ 2002-03-06 14:47:17 by simonmar]
simonmar [Wed, 6 Mar 2002 14:47:18 +0000 (14:47 +0000)]
[project @ 2002-03-06 14:47:17 by simonmar]
Include the fixity declaration for 'seq' in the GHC.Prim interface.

22 years ago[project @ 2002-03-06 10:25:22 by malcolm]
malcolm [Wed, 6 Mar 2002 10:25:22 +0000 (10:25 +0000)]
[project @ 2002-03-06 10:25:22 by malcolm]
Copyright acknowledgement.

22 years ago[project @ 2002-03-06 09:21:17 by simonmar]
simonmar [Wed, 6 Mar 2002 09:21:17 +0000 (09:21 +0000)]
[project @ 2002-03-06 09:21:17 by simonmar]
Don't try to call findModule for GHC.Prim, which doesn't exist any
more (should fix the Maybe.fromJust panic in last night's build).

22 years ago[project @ 2002-03-06 09:04:57 by simonmar]
simonmar [Wed, 6 Mar 2002 09:04:57 +0000 (09:04 +0000)]
[project @ 2002-03-06 09:04:57 by simonmar]
The prelude package is "base" these days, not "std"

22 years ago[project @ 2002-03-05 21:05:59 by sof]
sof [Tue, 5 Mar 2002 21:05:59 +0000 (21:05 +0000)]
[project @ 2002-03-05 21:05:59 by sof]
make it compile with 5.02

22 years ago[project @ 2002-03-05 14:30:51 by simonmar]
simonmar [Tue, 5 Mar 2002 14:30:51 +0000 (14:30 +0000)]
[project @ 2002-03-05 14:30:51 by simonmar]
GHC.Prim is always excluded from ghc -M now.

22 years ago[project @ 2002-03-05 14:18:53 by simonmar]
simonmar [Tue, 5 Mar 2002 14:18:56 +0000 (14:18 +0000)]
[project @ 2002-03-05 14:18:53 by simonmar]
Generate the contents of the GHC.Prim interface file automatically
from the list of available PrimOps and various other wired-in things.

Two main benefits from this:

  - There's one fewer places to edit when adding a new primop.

  - It's one less reason to need the interface file parser, and
    now we no longer need the (short-lived) --compile-iface option
    so I've removed it.

22 years ago[project @ 2002-03-05 11:22:44 by simonmar]
simonmar [Tue, 5 Mar 2002 11:22:44 +0000 (11:22 +0000)]
[project @ 2002-03-05 11:22:44 by simonmar]
revert previous commit

22 years ago[project @ 2002-03-05 09:05:23 by simonmar]
simonmar [Tue, 5 Mar 2002 09:05:23 +0000 (09:05 +0000)]
[project @ 2002-03-05 09:05:23 by simonmar]
[ forgot to add this file the first time around... ]

Binary Interface Files - stage 1
--------------------------------

This commit changes the default interface file format from text to
binary, in order to improve compilation performace.

To view an interface file, use 'ghc --show-iface Foo.hi'.

utils/Binary.hs is the basic Binary I/O library, based on the nhc98
binary I/O library but much stripped-down and working in terms of
bytes rather than bits, and with some special features for GHC: it
remembers which Module is being emitted to avoid dumping too many
qualified names, and it keeps track of a "dictionary" of FastStrings
so that we don't dump the same FastString more than once into the
binary file.  I'll make a generic version of this for the libraries at
some point.

main/BinIface.hs contains most of the Binary instances.  Some
instances are in the same module as the data type (RdrName, Name,
OccName in particular).  Most instances were generated using a
modified version of DrIFT, which I'll commit later.  However, editing
them by hand isn't hard (certainly easier than modifying
ParseIface.y).

The first thing in a binary interface is the interface version, so
nice error messages will be generated if the binary format changes and
you still have old interfaces lying around.  The version also now
includes the "way" as an extra sanity check.

Other changes
-------------

I don't like the way FastStrings contain both hashed strings (with
O(1) comparison) and literal C strings (with O(n) comparison).  So as
a first step to separating these I made serveral "literal" type
strings into hashed strings.  SLIT() still generates a literal, and
now FSLIT() generates a hashed string.  With DEBUG on, you'll get a
warning if you try to compare any SLIT()s with anything, and the
compiler will fall over if you try to dump any literal C strings into
an interface file (usually indicating a use of SLIT() which should be
FSLIT()).

mkSysLocal no longer re-encodes its FastString argument each time it
is called.

I also fixed the -pgm options so that the argument can now optionally
be separted from the option.

Bugfix: PrelNames declared Names for several comparison primops, eg.
eqCharName, eqIntName etc. but these had different uniques from the
real primop names.  I've moved these to PrimOps and defined them using
mkPrimOpIdName instead, and deleted some for which we don't have real
primops (Manuel: please check that things still work for you after
this change).

22 years ago[project @ 2002-03-04 23:06:40 by qrczak]
qrczak [Mon, 4 Mar 2002 23:06:40 +0000 (23:06 +0000)]
[project @ 2002-03-04 23:06:40 by qrczak]
No longer refuse to work with gcc3.

22 years ago[project @ 2002-03-04 19:26:01 by sof]
sof [Mon, 4 Mar 2002 19:26:01 +0000 (19:26 +0000)]
[project @ 2002-03-04 19:26:01 by sof]
hc-file-bundle (pt2): sigh, make that PrimopWrappers.hs

22 years ago[project @ 2002-03-04 17:20:46 by simonmar]
simonmar [Mon, 4 Mar 2002 17:20:46 +0000 (17:20 +0000)]
[project @ 2002-03-04 17:20:46 by simonmar]
oops, revert part of previous commit that wasn't supposed to be included.

22 years ago[project @ 2002-03-04 17:01:26 by simonmar]
simonmar [Mon, 4 Mar 2002 17:01:37 +0000 (17:01 +0000)]
[project @ 2002-03-04 17:01:26 by simonmar]
Binary Interface Files - stage 1
--------------------------------

This commit changes the default interface file format from text to
binary, in order to improve compilation performace.

To view an interface file, use 'ghc --show-iface Foo.hi'.

utils/Binary.hs is the basic Binary I/O library, based on the nhc98
binary I/O library but much stripped-down and working in terms of
bytes rather than bits, and with some special features for GHC: it
remembers which Module is being emitted to avoid dumping too many
qualified names, and it keeps track of a "dictionary" of FastStrings
so that we don't dump the same FastString more than once into the
binary file.  I'll make a generic version of this for the libraries at
some point.

main/BinIface.hs contains most of the Binary instances.  Some
instances are in the same module as the data type (RdrName, Name,
OccName in particular).  Most instances were generated using a
modified version of DrIFT, which I'll commit later.  However, editing
them by hand isn't hard (certainly easier than modifying
ParseIface.y).

The first thing in a binary interface is the interface version, so
nice error messages will be generated if the binary format changes and
you still have old interfaces lying around.  The version also now
includes the "way" as an extra sanity check.

Other changes
-------------

I don't like the way FastStrings contain both hashed strings (with
O(1) comparison) and literal C strings (with O(n) comparison).  So as
a first step to separating these I made serveral "literal" type
strings into hashed strings.  SLIT() still generates a literal, and
now FSLIT() generates a hashed string.  With DEBUG on, you'll get a
warning if you try to compare any SLIT()s with anything, and the
compiler will fall over if you try to dump any literal C strings into
an interface file (usually indicating a use of SLIT() which should be
FSLIT()).

mkSysLocal no longer re-encodes its FastString argument each time it
is called.

I also fixed the -pgm options so that the argument can now optionally
be separted from the option.

Bugfix: PrelNames declared Names for several comparison primops, eg.
eqCharName, eqIntName etc. but these had different uniques from the
real primop names.  I've moved these to PrimOps and defined them using
mkPrimOpIdName instead, and deleted some for which we don't have real
primops (Manuel: please check that things still work for you after
this change).

22 years ago[project @ 2002-03-04 14:40:54 by simonmar]
simonmar [Mon, 4 Mar 2002 14:40:54 +0000 (14:40 +0000)]
[project @ 2002-03-04 14:40:54 by simonmar]
import wibbles

22 years ago[project @ 2002-03-04 14:39:46 by keithw]
keithw [Mon, 4 Mar 2002 14:39:46 +0000 (14:39 +0000)]
[project @ 2002-03-04 14:39:46 by keithw]
Explain the *other* thing AP_UPDs are used for (not just Hugs, but
also stack-freezing for raiseAsync()).

22 years ago[project @ 2002-03-04 10:35:43 by keithw]
keithw [Mon, 4 Mar 2002 10:35:43 +0000 (10:35 +0000)]
[project @ 2002-03-04 10:35:43 by keithw]
Wibble.

22 years ago[project @ 2002-03-04 01:36:08 by sof]
sof [Mon, 4 Mar 2002 01:36:08 +0000 (01:36 +0000)]
[project @ 2002-03-04 01:36:08 by sof]
de-stodged

22 years ago[project @ 2002-03-04 01:29:11 by sof]
sof [Mon, 4 Mar 2002 01:29:11 +0000 (01:29 +0000)]
[project @ 2002-03-04 01:29:11 by sof]
hc-file-bundle: new location of PrimWrappers.hs (nee PrelPrimOpWrappers.hs)

22 years ago[project @ 2002-03-03 03:59:03 by sof]
sof [Sun, 3 Mar 2002 03:59:03 +0000 (03:59 +0000)]
[project @ 2002-03-03 03:59:03 by sof]
Along the lines of how 'unsafe' is handled, treat 'safe' and 'threadsafe' as special ids too

22 years ago[project @ 2002-03-02 18:02:30 by sof]
sof [Sat, 2 Mar 2002 18:02:31 +0000 (18:02 +0000)]
[project @ 2002-03-02 18:02:30 by sof]
Urk, code generator assumed reversed info tables
in its implementation of dataToTag# - broke a
compiler built unregisterised rather weirdly
(and only, none of the code in testsuite/ nor
nofib/ showed up this bug.)

This commit assumes that unregisterised==
info_tables_not_next_to_code & calls upon
a trusty old PrimOps.h macro to locate the tag
in the info table (the reasons for doing it
this way is explained in AbsCUtils.lhs
comments).

To help the poor sod who has to debug a break
like this sometime in the future, I'm trying to
come up with a repro case smaller than
ghc/compiler/ -- not yet successful.

Anyway, this concludes the fixes to the
unregisterised bits; I hereby claim that it
is now working again.

22 years ago[project @ 2002-03-02 17:51:22 by sof]
sof [Sat, 2 Mar 2002 17:51:22 +0000 (17:51 +0000)]
[project @ 2002-03-02 17:51:22 by sof]
re-introduce dataToTagzh macro (unreg builds only)

22 years ago[project @ 2002-03-02 17:49:42 by sof]
sof [Sat, 2 Mar 2002 17:49:42 +0000 (17:49 +0000)]
[project @ 2002-03-02 17:49:42 by sof]
Add the CPP flags used by an unregisterised build
when compiling the .h generating utilities herein.
As was, info table size was wrongly computed in
the unregisterised case.

22 years ago[project @ 2002-03-02 17:46:03 by sof]
sof [Sat, 2 Mar 2002 17:46:03 +0000 (17:46 +0000)]
[project @ 2002-03-02 17:46:03 by sof]
Add stg_ut_1_0_unreg_info proto (only)

22 years ago[project @ 2002-03-02 17:43:44 by sof]
sof [Sat, 2 Mar 2002 17:43:44 +0000 (17:43 +0000)]
[project @ 2002-03-02 17:43:44 by sof]
- new utility return address, stg_ut_1_0_unreg_{info,ret}, which
  returns via Sp[1] (assuming R1 is in Sp[0], which it is in
  the unregisterised, no-REG_R1 case.

  The only 'consumer' of this entry point is the implementation
  of PrimOps.takeMVarzh_fast in an unregisterised build.

22 years ago[project @ 2002-03-02 17:40:24 by sof]
sof [Sat, 2 Mar 2002 17:40:24 +0000 (17:40 +0000)]
[project @ 2002-03-02 17:40:24 by sof]
- gcdIntegerIntzh_fast: another primop with mismatched return
  convention.
- tidy up PerformTake() for non-REG_R1 case.
- forkzh_fast and myThreadIdzh_fast: I mistakenly had ThreadId#s
  down as something unboxed; they're not, but unpointed. Update
  primops to use the RET_P() macro upon return instead.

22 years ago[project @ 2002-03-01 18:28:15 by keithw]
keithw [Fri, 1 Mar 2002 18:28:15 +0000 (18:28 +0000)]
[project @ 2002-03-01 18:28:15 by keithw]
Addendum to previous commit message:

We can't tell whether the stg_sel and stg_ap thunks correspond to
static or dynamic thunks, and it's not worth duplicating them all just
so the ticky-ticky stats can be correct.  So I have played it safe
(for my purposes at least!) and counted them all as dynamic.  Yell if
this is a problem (njn?)

22 years ago[project @ 2002-03-01 18:11:20 by keithw]
keithw [Fri, 1 Mar 2002 18:11:20 +0000 (18:11 +0000)]
[project @ 2002-03-01 18:11:20 by keithw]
Fix bug in ticky-ticky stats (particularly obvious in
nofib/imaginary/queens) that was meaning some thunk entries were not
being counted in ENT_{STATIC,DYN}_THK_ctr.  Specifically, tick the
counter for the stg_sel and stg_ap thunks, as well as non-standard
thunks!

Also add TICK_UPDF_OMITTED into the stg_sel_noupd thunks (there are no
stg_ap_noupd thunks, or else I would have put it there too).

Also, fix a bug in the sense of the test for update squeezing when
printing (or not) ENT_PERM_IND: we don't print out ENT_PERM_IND unless
update squeezing is turned off, because it may be invalid (see note).
If someone needs this counter, please just remove the test entirely
and always print ENT_PERM_IND.

22 years ago[project @ 2002-03-01 16:53:14 by simonpj]
simonpj [Fri, 1 Mar 2002 16:53:14 +0000 (16:53 +0000)]
[project @ 2002-03-01 16:53:14 by simonpj]
Minor bug in float-out

22 years ago[project @ 2002-03-01 14:20:06 by simonmar]
simonmar [Fri, 1 Mar 2002 14:20:06 +0000 (14:20 +0000)]
[project @ 2002-03-01 14:20:06 by simonmar]
remove redundant check for size_t

22 years ago[project @ 2002-03-01 09:47:39 by simonmar]
simonmar [Fri, 1 Mar 2002 09:47:39 +0000 (09:47 +0000)]
[project @ 2002-03-01 09:47:39 by simonmar]
Generalise a couple of regexps in the -monly-[23]-regs patching code.
Should fix problems with gcc 3.0.4.

22 years ago[project @ 2002-02-28 18:54:53 by sof]
sof [Thu, 28 Feb 2002 18:54:53 +0000 (18:54 +0000)]
[project @ 2002-02-28 18:54:53 by sof]
stg_gc_unpt_r1_ret: if R1 isn't mapped to a real register,
keep it on the stack.

I confess to 'pushing symbols' here a bit, as the exact
nature (and function) of stg_gc_unpt_r1_info isn't clear
to me (documentation isn't abundant, for one.) However,
it will now behave in a manner consistent with what
the code generator emits in the unregisterised case.

22 years ago[project @ 2002-02-28 18:50:40 by keithw]
keithw [Thu, 28 Feb 2002 18:50:42 +0000 (18:50 +0000)]
[project @ 2002-02-28 18:50:40 by keithw]
Un-rot nofib-analyse, so it compiles with ghc-5.02.2.

* add a regexp for GNU time 1.7

* import Html hiding ((!)) now hides Html.! as well as !, so add an
  import qualified Html ((!)) as well.

* compile Printf with -fvia-c to work around bug in foreign import of
  snprintf (was always printing "0.00" no matter what input given).