ghc-hetmet.git
19 years ago[project @ 2004-10-11 10:54:57 by simonmar]
simonmar [Mon, 11 Oct 2004 10:54:57 +0000 (10:54 +0000)]
[project @ 2004-10-11 10:54:57 by simonmar]
genericRaise() hack needed on FreeBSD too.

19 years ago[project @ 2004-10-09 13:21:15 by panne]
panne [Sat, 9 Oct 2004 13:21:15 +0000 (13:21 +0000)]
[project @ 2004-10-09 13:21:15 by panne]
Fixed some links

19 years ago[project @ 2004-10-08 17:32:06 by panne]
panne [Fri, 8 Oct 2004 17:32:06 +0000 (17:32 +0000)]
[project @ 2004-10-08 17:32:06 by panne]
Fixed typo

19 years ago[project @ 2004-10-08 14:13:27 by simonmar]
simonmar [Fri, 8 Oct 2004 14:13:27 +0000 (14:13 +0000)]
[project @ 2004-10-08 14:13:27 by simonmar]
Comments only

19 years ago[project @ 2004-10-08 13:58:49 by simonpj]
simonpj [Fri, 8 Oct 2004 13:58:56 +0000 (13:58 +0000)]
[project @ 2004-10-08 13:58:49 by simonpj]
------------------------------------------------------
Fix an interaction between zonking of Insts and GADTs
------------------------------------------------------

Insts float outwards, perhaps out of the scope of a type-refining GADT case.
So we have to make sure they are fully zonked wrt the type refinement.

tcSimplifyCheck does this, but there were two omissions
a) the tcInstStupidTheta in TcPat.tcConPat didn't get zonked
b) a Dict and Lit Inst contained an Id that wasn't zonked, to save work

To fix (b), Insts have a little less cached info; the Name is held instead
of the Id, so that the Id doesn't need to be zonked.

One test in typecheck/should_compile/tc182

19 years ago[project @ 2004-10-08 12:16:04 by simonmar]
simonmar [Fri, 8 Oct 2004 12:16:04 +0000 (12:16 +0000)]
[project @ 2004-10-08 12:16:04 by simonmar]
FreeBSD needs -optl-pthread for the threaded way

19 years ago[project @ 2004-10-08 11:37:46 by simonpj]
simonpj [Fri, 8 Oct 2004 11:37:46 +0000 (11:37 +0000)]
[project @ 2004-10-08 11:37:46 by simonpj]
HsNoBang should simply be omitted; fixes a TH_spliceDecl2 test

19 years ago[project @ 2004-10-08 11:36:26 by simonpj]
simonpj [Fri, 8 Oct 2004 11:36:29 +0000 (11:36 +0000)]
[project @ 2004-10-08 11:36:26 by simonpj]
Fix missing case for algTyConRhs; fixes test ghci011

19 years ago[project @ 2004-10-08 11:35:26 by simonpj]
simonpj [Fri, 8 Oct 2004 11:35:26 +0000 (11:35 +0000)]
[project @ 2004-10-08 11:35:26 by simonpj]
Complain about GADTs if not -fglasgow-exts

19 years ago[project @ 2004-10-08 10:16:14 by ross]
ross [Fri, 8 Oct 2004 10:16:14 +0000 (10:16 +0000)]
[project @ 2004-10-08 10:16:14 by ross]
Make the sed command turning '#define PACKAGE_FOO "blah"' into
'/* #undef PACKAGE_FOO */' more portable, though a tad less precise.

The use of \| deep inside the pattern is a GNU extension (from sed 2.05).

19 years ago[project @ 2004-10-08 07:23:40 by dons]
dons [Fri, 8 Oct 2004 07:23:40 +0000 (07:23 +0000)]
[project @ 2004-10-08 07:23:40 by dons]
For platforms with no PIC method defined, use
LabelAccessStyle of AccessDirectly, in howToAccessLabel.
This seems to keep the ncg working on OpenBSD.

Is this the correct default, Wolfgang?

19 years ago[project @ 2004-10-08 03:09:19 by dons]
dons [Fri, 8 Oct 2004 03:09:19 +0000 (03:09 +0000)]
[project @ 2004-10-08 03:09:19 by dons]
Add missing final #else case for howToAccessLabel.

19 years ago[project @ 2004-10-07 16:08:36 by simonpj]
simonpj [Thu, 7 Oct 2004 16:08:42 +0000 (16:08 +0000)]
[project @ 2004-10-07 16:08:36 by simonpj]
Wibbles to hi-boot files and newtypes

19 years ago[project @ 2004-10-07 15:54:03 by wolfgang]
wolfgang [Thu, 7 Oct 2004 15:54:42 +0000 (15:54 +0000)]
[project @ 2004-10-07 15:54:03 by wolfgang]
Position Independent Code and Dynamic Linking Support, Part 1

This commit allows generation of position independent code (PIC) that fully supports dynamic linking on Mac OS X and PowerPC Linux.
Other platforms are not yet supported, and there is no support for actually linking or using dynamic libraries - so if you use the -fPIC or -dynamic code generation flags, you have to type your (platform-specific) linker command lines yourself.

nativeGen/PositionIndependentCode.hs:
New file. Look here for some more comments on how this works.

cmm/CLabel.hs:
Add support for DynamicLinkerLabels and PIC base labels - for use inside the NCG.
needsCDecl: Case alternative labels now need C decls, see the codeGen/CgInfoTbls.hs below for details

cmm/Cmm.hs:
Add CmmPicBaseReg (used in NCG),
and CmmLabelDiffOff (used in NCG and for offsets in info tables)

cmm/CmmParse.y:
support offsets in info tables

cmm/PprC.hs:
support CmmLabelDiffOff
Case alternative labels now need C decls (see the codeGen/CgInfoTbls.hs for details), so we need to pprDataExterns for info tables.

cmm/PprCmm.hs:
support CmmLabelDiffOff

codeGen/CgInfoTbls.hs:
no longer store absolute addresses in info tables, instead, we store offsets.
Also, for vectored return points, emit the alternatives _after_ the vector table. This is to work around a limitation in Apple's as, which refuses to handle label differences where one label is at the end of a section. Emitting alternatives after vector info tables makes sure this never happens in GHC generated code. Case alternatives now require prototypes in hc code, though (see changes in PprC.hs, CLabel.hs).

main/CmdLineOpts.lhs:
Add a new option, -fPIC.

main/DriverFlags.hs:
Pass the correct options for PIC to gcc, depending on the platform. Only for powerpc for now.

nativeGen/AsmCodeGen.hs:
Many changes...
Mac OS X-specific management of import stubs is no longer, it's now part of a general mechanism to handle such things for all platforms that need it (Darwin [both ppc and x86], Linux on ppc, and some platforms we don't support).
Move cmmToCmm into its own monad which can accumulate a list of imported symbols. Make it call cmmMakeDynamicReference at the right places.

nativeGen/MachCodeGen.hs:
nativeGen/MachInstrs.hs:
nativeGen/MachRegs.lhs:
nativeGen/PprMach.hs:
nativeGen/RegAllocInfo.hs:
Too many changes to enumerate here, PowerPC specific.

nativeGen/NCGMonad.hs:
NatM still tracks imported symbols, as more labels can be created during code generation (float literals, jump tables; on some platforms all data access has to go through the dynamic linking mechanism).

driver/mangler/ghc-asm.lprl:
Mangle absolute addresses in info tables to offsets.
Correctly pass through GCC-generated PIC for Mac OS X and powerpc linux.

includes/Cmm.h:
includes/InfoTables.h:
includes/Storage.h:
includes/mkDerivedConstants.c:
rts/GC.c:
rts/GCCompact.c:
rts/HeapStackCheck.cmm:
rts/Printer.c:
rts/RetainerProfile.c:
rts/Sanity.c:
Adapt to the fact that info tables now contain offsets.

rts/Linker.c:
Mac-specific: change machoInitSymbolsWithoutUnderscore to support PIC.

19 years ago[project @ 2004-10-07 06:38:20 by mthomas]
mthomas [Thu, 7 Oct 2004 06:38:20 +0000 (06:38 +0000)]
[project @ 2004-10-07 06:38:20 by mthomas]
Check for shell scripts first - they don't exist on my Windows nightly build.

19 years ago[project @ 2004-10-07 03:19:51 by dons]
dons [Thu, 7 Oct 2004 03:19:51 +0000 (03:19 +0000)]
[project @ 2004-10-07 03:19:51 by dons]
Need suffix.mk, otherwise .hc bootstrapping dies in ghc/compiler, with
"No rule to make target Foo.o" error.

19 years ago[project @ 2004-10-06 06:14:29 by panne]
panne [Wed, 6 Oct 2004 06:14:29 +0000 (06:14 +0000)]
[project @ 2004-10-06 06:14:29 by panne]
Use XML mode, not SGML

19 years ago[project @ 2004-10-06 00:56:59 by dons]
dons [Wed, 6 Oct 2004 00:56:59 +0000 (00:56 +0000)]
[project @ 2004-10-06 00:56:59 by dons]
Use >> append onto build.mk, so that build scripts can add extra vars
to build.mk.

Replace grep \(a\|b\) with [ab]. \| is an extended regex, whereas the
[] class is a basic RE -- so it works with BSD grep.

19 years ago[project @ 2004-10-05 13:56:31 by simonmar]
simonmar [Tue, 5 Oct 2004 13:56:32 +0000 (13:56 +0000)]
[project @ 2004-10-05 13:56:31 by simonmar]
Document -ferror-spans

19 years ago[project @ 2004-10-05 07:46:41 by simonpj]
simonpj [Tue, 5 Oct 2004 07:46:41 +0000 (07:46 +0000)]
[project @ 2004-10-05 07:46:41 by simonpj]
Report bogus strictness annotation on newtype

19 years ago[project @ 2004-10-04 15:51:00 by simonpj]
simonpj [Mon, 4 Oct 2004 15:51:04 +0000 (15:51 +0000)]
[project @ 2004-10-04 15:51:00 by simonpj]
------------------------------------
Part-fix an awkward interaction
between case-of-case and GADTs
------------------------------------

Consider
data T a where
  MkT :: a -> b -> T a

f = /\a. \(w::a).
   case (case ...) of
  MkT a' b (p::a') (q::b) -> [p,w]

The danger is that we'll make a join point

j a' p = [p,w]

and that's ill-typed, because (p::a') but (w::a).

Solution so far: don't abstract over a', because the type refinement
maps [a' -> a] .  Ultimately that won't work when real refinement goes on.

Then we must abstract over any refined free variables.  Hmm.  Maybe we
could just abstract over *all* free variables, thereby lambda-lifting
the join point?   We should try this.

19 years ago[project @ 2004-10-04 09:35:08 by simonpj]
simonpj [Mon, 4 Oct 2004 09:35:08 +0000 (09:35 +0000)]
[project @ 2004-10-04 09:35:08 by simonpj]
Sort decls in cycle for error message

19 years ago[project @ 2004-10-04 09:28:00 by simonpj]
simonpj [Mon, 4 Oct 2004 09:28:08 +0000 (09:28 +0000)]
[project @ 2004-10-04 09:28:00 by simonpj]
Better reporting of duplicate top-level defns

19 years ago[project @ 2004-10-04 09:27:32 by simonpj]
simonpj [Mon, 4 Oct 2004 09:27:32 +0000 (09:27 +0000)]
[project @ 2004-10-04 09:27:32 by simonpj]
Make combineSrcSpans commutative

19 years ago[project @ 2004-10-04 09:11:09 by simonpj]
simonpj [Mon, 4 Oct 2004 09:11:14 +0000 (09:11 +0000)]
[project @ 2004-10-04 09:11:09 by simonpj]
Improve error locations for binding conflicts

19 years ago[project @ 2004-10-04 05:54:04 by dons]
dons [Mon, 4 Oct 2004 05:54:05 +0000 (05:54 +0000)]
[project @ 2004-10-04 05:54:04 by dons]
Warning police. Move prototype of genericRaise into RtsExternal.h, so
the libraries can see it.

19 years ago[project @ 2004-10-04 03:37:22 by wolfgang]
wolfgang [Mon, 4 Oct 2004 03:37:22 +0000 (03:37 +0000)]
[project @ 2004-10-04 03:37:22 by wolfgang]
Mac OS X:
Make the Linker deal properly with object files that lack a symbol table or
a dynamic symbol table.
Objects that don't import any symbols don't get a dynamic symbol table,
which caused GHCi to crash.

MERGE TO STABLE

19 years ago[project @ 2004-10-03 17:13:34 by panne]
panne [Sun, 3 Oct 2004 17:13:34 +0000 (17:13 +0000)]
[project @ 2004-10-03 17:13:34 by panne]
Warning police (added missing #include)

19 years ago[project @ 2004-10-03 16:50:53 by panne]
panne [Sun, 3 Oct 2004 16:50:53 +0000 (16:50 +0000)]
[project @ 2004-10-03 16:50:53 by panne]
Warning police (bring 'raise' into scope)

19 years ago[project @ 2004-10-03 16:50:01 by panne]
panne [Sun, 3 Oct 2004 16:50:01 +0000 (16:50 +0000)]
[project @ 2004-10-03 16:50:01 by panne]
Synched with latest GHC #include changes: Add '.' to the #include path manually.

19 years ago[project @ 2004-10-03 16:37:42 by panne]
panne [Sun, 3 Oct 2004 16:37:42 +0000 (16:37 +0000)]
[project @ 2004-10-03 16:37:42 by panne]
Warning police

19 years ago[project @ 2004-10-03 16:28:02 by panne]
panne [Sun, 3 Oct 2004 16:28:06 +0000 (16:28 +0000)]
[project @ 2004-10-03 16:28:02 by panne]
Improved #include path handling:

* Don't use '-I-', it breaks a lot of system headers, e.g.

     #include <GL/glut.h>

  fails (when using freeglut), because /usr/include/GL/glut.h contains

     #include "freeglut_std.h"

  but /usr/include/GL/freeglut_std.h will not be found. It is a bit
  debatable if the header is broken and should use

     #include "GL/freeglut_std.h"

  instead. Anyway, a grep through the SuSE 9.1 system headers shows that
  there seems to be no real common practice, so let's play safe and don't
  use '-I-'.

* Don't use '-I .', #include stub headers "locally" instead, e.g. use

     #include "Concurrent_stub.h"

  instead of

     #include "Control/Concurrent_stub.h"

  Note that "Control" is still in the #include path, because the *.hc file
  is normally in /tmp and the stub header is in the directory where *.hs
  is. We could remove this path element, too, if the stub header would be
  copied to the directory of the *.hc file during compilation. SimonM?

19 years ago[project @ 2004-10-03 16:17:08 by ross]
ross [Sun, 3 Oct 2004 16:17:15 +0000 (16:17 +0000)]
[project @ 2004-10-03 16:17:08 by ross]
spelling

19 years ago[project @ 2004-10-03 02:04:29 by dons]
dons [Sun, 3 Oct 2004 02:04:29 +0000 (02:04 +0000)]
[project @ 2004-10-03 02:04:29 by dons]
Make sure genericRaise symbol is defined on all platforms, so Linker.c
won't complain, even if they don't actually use it.

19 years ago[project @ 2004-10-02 15:12:48 by wolfgang]
wolfgang [Sat, 2 Oct 2004 15:12:49 +0000 (15:12 +0000)]
[project @ 2004-10-02 15:12:48 by wolfgang]
Deal with Apple's broken cpp 3.3 (you know, the one that inserts useless
#pragma lines into it's output) by filtering it's output through
grep -v.
This shouldn't be a problem for other platforms, and it's much simpler
than to make the parsers for ghc-pkg, genprimopcode and happy ignore
those lines.

MERGE TO STABLE

19 years ago[project @ 2004-10-02 07:32:25 by dons]
dons [Sat, 2 Oct 2004 07:32:29 +0000 (07:32 +0000)]
[project @ 2004-10-02 07:32:25 by dons]
When linking against libpthreads, raise(3) can behave strangely on
some platforms (OpenBSD at least, maybe other BSDs, not Linux). So use
pthread_kill() to generate signals when running the threaded rts,
instead of raise(), when System.Posix.Signals.raiseSignal is called.

raiseSignal will call genericRaise, in the rts, which knows which
function to use.

19 years ago[project @ 2004-10-01 19:23:47 by panne]
panne [Fri, 1 Oct 2004 19:23:47 +0000 (19:23 +0000)]
[project @ 2004-10-01 19:23:47 by panne]
Layout rule again...

19 years ago[project @ 2004-10-01 16:39:26 by simonpj]
simonpj [Fri, 1 Oct 2004 16:39:39 +0000 (16:39 +0000)]
[project @ 2004-10-01 16:39:26 by simonpj]
Allow kind signatures in GADT data type declarations

19 years ago[project @ 2004-10-01 16:04:23 by simonpj]
simonpj [Fri, 1 Oct 2004 16:04:23 +0000 (16:04 +0000)]
[project @ 2004-10-01 16:04:23 by simonpj]
First-cut documentation for GADTs

19 years ago[project @ 2004-10-01 16:03:58 by simonpj]
simonpj [Fri, 1 Oct 2004 16:03:58 +0000 (16:03 +0000)]
[project @ 2004-10-01 16:03:58 by simonpj]
A bit more about hi-boot

19 years ago[project @ 2004-10-01 14:25:12 by simonpj]
simonpj [Fri, 1 Oct 2004 14:25:12 +0000 (14:25 +0000)]
[project @ 2004-10-01 14:25:12 by simonpj]
Comments only

19 years ago[project @ 2004-10-01 13:46:07 by ross]
ross [Fri, 1 Oct 2004 13:46:07 +0000 (13:46 +0000)]
[project @ 2004-10-01 13:46:07 by ross]
fix dummy ASSERTM2 macro

19 years ago[project @ 2004-10-01 13:42:04 by simonpj]
simonpj [Fri, 1 Oct 2004 13:42:57 +0000 (13:42 +0000)]
[project @ 2004-10-01 13:42:04 by simonpj]
------------------------------------
Simplify the treatment of newtypes
Complete hi-boot file consistency checking
------------------------------------

In the representation of types, newtypes used to have a special constructor
all to themselves, very like TyConApp, called NewTcApp.    The trouble is
that means we have to *know* when a newtype is a newtype, and in an hi-boot
context we may not -- the data type might be declared as
data T
in the hi-boot file, but as
newtype T = ...
in the source file.  In GHCi, which accumulates stuff from multiple compiles,
this makes a difference.

So I've nuked NewTcApp.  Newtypes are represented using TyConApps again. This
turned out to reduce the total amount of code, and simplify the Type data type,
which is all to the good.

This commit also fixes a few things in the hi-boot consistency checking
stuff.

19 years ago[project @ 2004-10-01 11:12:30 by simonpj]
simonpj [Fri, 1 Oct 2004 11:12:30 +0000 (11:12 +0000)]
[project @ 2004-10-01 11:12:30 by simonpj]
Remove bogus defn in hi-boot

19 years ago[project @ 2004-10-01 10:08:49 by simonpj]
simonpj [Fri, 1 Oct 2004 10:09:36 +0000 (10:09 +0000)]
[project @ 2004-10-01 10:08:49 by simonpj]
-----------------------------------
Do simple checking on hi-boot files
-----------------------------------

This commit arranges that, when compiling A.hs, we compare
the types we infer with those in A.hi-boot, if the latter
exists.  (Or, more accurately, if anything A.hs imports in
turn imports A.hi-boot, directly or indirectly.)

This has been on the to-do list forever.

19 years ago[project @ 2004-10-01 09:49:14 by simonpj]
simonpj [Fri, 1 Oct 2004 09:49:14 +0000 (09:49 +0000)]
[project @ 2004-10-01 09:49:14 by simonpj]
Generate in the @size suffix for a stdcall symbol properly.

19 years ago[project @ 2004-10-01 03:52:57 by wolfgang]
wolfgang [Fri, 1 Oct 2004 03:52:57 +0000 (03:52 +0000)]
[project @ 2004-10-01 03:52:57 by wolfgang]
Replace \? by \{0,1\} in the sed regular expressions, as the former
does not work with Mac OS X's (= BSD's) sed.

I'm a bit confused by the situation here:
According to Mac OS X man pages, the latter syntax is part of the
POSIX 1003.2 standard for basic regular expressions, while the former
is not. According to the manpage installed with my Gentoo linux, neither
is in the POSIX standard.

However, GNU sed accepts both \? and \{0,1\}, while Mac OS X's sed accepts
only \{0,1\}.

19 years ago[project @ 2004-09-30 21:00:57 by panne]
panne [Thu, 30 Sep 2004 21:00:57 +0000 (21:00 +0000)]
[project @ 2004-09-30 21:00:57 by panne]
Stylistic changes

19 years ago[project @ 2004-09-30 20:56:49 by panne]
panne [Thu, 30 Sep 2004 20:56:49 +0000 (20:56 +0000)]
[project @ 2004-09-30 20:56:49 by panne]
Get all project info from configure.ac

19 years ago[project @ 2004-09-30 19:24:53 by panne]
panne [Thu, 30 Sep 2004 19:24:53 +0000 (19:24 +0000)]
[project @ 2004-09-30 19:24:53 by panne]
Make it compile with a GHC 6.x. The layout rule seems to be a mystery
even for one of the "fathers" of Haskell...  :-}

19 years ago[project @ 2004-09-30 14:45:41 by simonpj]
simonpj [Thu, 30 Sep 2004 14:45:41 +0000 (14:45 +0000)]
[project @ 2004-09-30 14:45:41 by simonpj]
Add HsPat.hi-boot

19 years ago[project @ 2004-09-30 10:35:15 by simonpj]
simonpj [Thu, 30 Sep 2004 10:40:21 +0000 (10:40 +0000)]
[project @ 2004-09-30 10:35:15 by simonpj]
------------------------------------
Add Generalised Algebraic Data Types
------------------------------------

This rather big commit adds support for GADTs.  For example,

    data Term a where
    Lit :: Int -> Term Int
  App :: Term (a->b) -> Term a -> Term b
  If  :: Term Bool -> Term a -> Term a
  ..etc..

    eval :: Term a -> a
    eval (Lit i) = i
    eval (App a b) = eval a (eval b)
    eval (If p q r) | eval p    = eval q
         | otherwise = eval r

Lots and lots of of related changes throughout the compiler to make
this fit nicely.

One important change, only loosely related to GADTs, is that skolem
constants in the typechecker are genuinely immutable and constant, so
we often get better error messages from the type checker.  See
TcType.TcTyVarDetails.

There's a new module types/Unify.lhs, which has purely-functional
unification and matching for Type. This is used both in the typechecker
(for type refinement of GADTs) and in Core Lint (also for type refinement).

19 years ago[project @ 2004-09-30 10:31:58 by simonmar]
simonmar [Thu, 30 Sep 2004 10:31:58 +0000 (10:31 +0000)]
[project @ 2004-09-30 10:31:58 by simonmar]
Add -I- after the include paths when running gcc.  This prevents
accidental shadowing of system includes by putting a file called
eg. stdint.h in the current directory.

19 years ago[project @ 2004-09-30 05:54:18 by krasimir]
krasimir [Thu, 30 Sep 2004 05:54:18 +0000 (05:54 +0000)]
[project @ 2004-09-30 05:54:18 by krasimir]
absCSyn directory doesn't exists in the HEAD

19 years ago[project @ 2004-09-30 03:05:21 by dons]
dons [Thu, 30 Sep 2004 03:05:21 +0000 (03:05 +0000)]
[project @ 2004-09-30 03:05:21 by dons]
Look for getpwnam, getpwuid.

19 years ago[project @ 2004-09-29 16:51:16 by wolfgang]
wolfgang [Wed, 29 Sep 2004 16:51:16 +0000 (16:51 +0000)]
[project @ 2004-09-29 16:51:16 by wolfgang]
Mac OS X:
Fix a serious bug in the linker's handling of Mach-O's
GENERIC_RELOC_VANILLA relocations.

MERGE TO STABLE

19 years ago[project @ 2004-09-29 13:46:17 by simonpj]
simonpj [Wed, 29 Sep 2004 13:46:17 +0000 (13:46 +0000)]
[project @ 2004-09-29 13:46:17 by simonpj]
Remove unused defnition

19 years ago[project @ 2004-09-29 09:49:21 by ross]
ross [Wed, 29 Sep 2004 09:49:21 +0000 (09:49 +0000)]
[project @ 2004-09-29 09:49:21 by ross]
revise the description of rebindable syntax to match what it seems to do

19 years ago[project @ 2004-09-28 15:08:58 by simonmar]
simonmar [Tue, 28 Sep 2004 15:08:58 +0000 (15:08 +0000)]
[project @ 2004-09-28 15:08:58 by simonmar]
rts_evalStableIO: set rtsApiCapability to NULL *before* calling
scheduleWaitThread, matching the way the other eval_* functions do
this.

The previous way lead to a suble race condition:
  - thread A calls rts_evalIO, enters scheduleWaitThread()
    (rtsApiCapability == NULL).
  - thread B calls rts_evalStableIO, creates a main thread and enters
    scheduleWaitThread() (rtsApiCapability == &MainCapability)
  - thread A exits scheduleWaitThread, sees that rtsApiCapability is
    non-NULL, and calls releaseCapability() on it.  This is bogus,
    because thread A doesn't actually hold the capability, and we've
    done a double-release.

This scenario leads to assertion failures in a debug threaded RTS, and
probably crashes in a non-debug threaded RTS.

MERGE TO STABLE

19 years ago[project @ 2004-09-28 13:15:19 by simonmar]
simonmar [Tue, 28 Sep 2004 13:15:19 +0000 (13:15 +0000)]
[project @ 2004-09-28 13:15:19 by simonmar]
Avoid some warnings from gcc by appending an 'LL' suffix to 64-bit
integers on a 32-bit platform.

Suggested by: Sven Panne <Sven.Panne@aedion.de>

19 years ago[project @ 2004-09-28 11:40:26 by simonmar]
simonmar [Tue, 28 Sep 2004 11:40:26 +0000 (11:40 +0000)]
[project @ 2004-09-28 11:40:26 by simonmar]
oops, revert version number to 6.3 again

19 years ago[project @ 2004-09-28 09:00:56 by simonmar]
simonmar [Tue, 28 Sep 2004 09:00:56 +0000 (09:00 +0000)]
[project @ 2004-09-28 09:00:56 by simonmar]
Ignore RULES pragmas unless we're in -fglasgow-exts mode.

19 years ago[project @ 2004-09-27 17:43:47 by wolfgang]
wolfgang [Mon, 27 Sep 2004 17:43:47 +0000 (17:43 +0000)]
[project @ 2004-09-27 17:43:47 by wolfgang]
Mac OS X: Fix an incorrect ASSERT

Merge to STABLE

19 years ago[project @ 2004-09-27 15:55:25 by wolfgang]
wolfgang [Mon, 27 Sep 2004 15:55:28 +0000 (15:55 +0000)]
[project @ 2004-09-27 15:55:25 by wolfgang]
GHCi support for PowerPC Linux, courtesy of Ryan Lortie <desrt@desrt.ca>.

MERGE TO STABLE

19 years ago[project @ 2004-09-27 13:49:26 by simonmar]
simonmar [Mon, 27 Sep 2004 13:49:26 +0000 (13:49 +0000)]
[project @ 2004-09-27 13:49:26 by simonmar]
A few updates to the local Emacs variables in these files.  For some
reason, I can't get Emacs' PSGML mode to work with the new XML files
(although I thought I had it working before... strange).

19 years ago[project @ 2004-09-27 11:48:29 by simonmar]
simonmar [Mon, 27 Sep 2004 11:48:29 +0000 (11:48 +0000)]
[project @ 2004-09-27 11:48:29 by simonmar]
sed-magic for ProjectVersionInt: make it work for version numbers with
patchlevel components (ToDo: ProjectPatchLevel still isn't set
properly in version.mk, this has to be updated by hand).

19 years ago[project @ 2004-09-27 11:35:59 by simonmar]
simonmar [Mon, 27 Sep 2004 11:35:59 +0000 (11:35 +0000)]
[project @ 2004-09-27 11:35:59 by simonmar]
export errMsgContext

19 years ago[project @ 2004-09-24 16:29:33 by wolfgang]
wolfgang [Fri, 24 Sep 2004 16:29:33 +0000 (16:29 +0000)]
[project @ 2004-09-24 16:29:33 by wolfgang]
PowerPC/Mac OS X:
Improve epilogue mangling.
This became necesssary because the new CG may "fall through" for cases in
a switch that are known to never happen, so GCC generates the epilogue code
again. With the previous CG, GCC never generated any epilog code, because
every function ended with an unconditional tail jump.

19 years ago[project @ 2004-09-22 16:37:23 by sof]
sof [Wed, 22 Sep 2004 16:37:34 +0000 (16:37 +0000)]
[project @ 2004-09-22 16:37:23 by sof]
Limit ThreadLabel API use to DEBUG only.

19 years ago[project @ 2004-09-22 08:36:58 by panne]
panne [Wed, 22 Sep 2004 08:37:01 +0000 (08:37 +0000)]
[project @ 2004-09-22 08:36:58 by panne]
* Replace obsolete macro AC_TRY_RUN with AC_RUN_IFELSE
* Same for AC_TRY_LINK and AC_LINK_IFELSE
* Minor cleanup

19 years ago[project @ 2004-09-21 17:49:22 by panne]
panne [Tue, 21 Sep 2004 17:49:22 +0000 (17:49 +0000)]
[project @ 2004-09-21 17:49:22 by panne]
* Added new target for creating *.bz2 source distributions
* Cleanup *.tar.gz / *.tar.bz2 when things go wrong

19 years ago[project @ 2004-09-21 17:39:08 by panne]
panne [Tue, 21 Sep 2004 17:39:08 +0000 (17:39 +0000)]
[project @ 2004-09-21 17:39:08 by panne]
Makefile.config is dead, so don't include it in SRC_DIST_FILES.

19 years ago[project @ 2004-09-21 17:29:55 by panne]
panne [Tue, 21 Sep 2004 17:29:55 +0000 (17:29 +0000)]
[project @ 2004-09-21 17:29:55 by panne]
Make sure "docs" and "dist" exactly once in SRC_DIST_DIRS.

MERGE TO STABLE

19 years ago[project @ 2004-09-20 17:53:40 by panne]
panne [Mon, 20 Sep 2004 17:53:40 +0000 (17:53 +0000)]
[project @ 2004-09-20 17:53:40 by panne]
Removed dependency of $(TOP)/mk/config.mk on $(TOP)/config.status, resurrecting
"make distclean". I'm not 100% sure that the autoconf-related rules are correct,
"./config.status --recheck" in conjunction with make is a real brain-twister...

19 years ago[project @ 2004-09-20 16:32:58 by panne]
panne [Mon, 20 Sep 2004 16:32:59 +0000 (16:32 +0000)]
[project @ 2004-09-20 16:32:58 by panne]
Ooops, forgot to rename version.mk in my previous committ...

19 years ago[project @ 2004-09-20 07:27:15 by mthomas]
mthomas [Mon, 20 Sep 2004 07:27:15 +0000 (07:27 +0000)]
[project @ 2004-09-20 07:27:15 by mthomas]
Make tests run on Cygwin hosted MinGW32 build.

19 years ago[project @ 2004-09-19 09:41:29 by panne]
panne [Sun, 19 Sep 2004 09:41:29 +0000 (09:41 +0000)]
[project @ 2004-09-19 09:41:29 by panne]
Use version info from configure.ac

19 years ago[project @ 2004-09-19 09:15:03 by panne]
panne [Sun, 19 Sep 2004 09:15:03 +0000 (09:15 +0000)]
[project @ 2004-09-19 09:15:03 by panne]
Use some sed magic to avoid PACKAGE_FOO clashes introduced by the autoconf
cleanup yesterday. Another option would have been using a plain "AC_INIT" in
fptools/configure.ac (and probably the same for fptools/libraries/configure.ac),
so only "leaf configure.ac"s have package info. Not quite sure what would be the
nicest way to handle this yet...

19 years ago[project @ 2004-09-18 12:49:55 by panne]
panne [Sat, 18 Sep 2004 12:50:00 +0000 (12:50 +0000)]
[project @ 2004-09-18 12:49:55 by panne]
Make autoupdate 2.52 happy, mainly by using the new formats of AC_INIT and
AC_OUTPUT. This has the nice side effect that all "packages" have now a name, a
version, a bug-report address, and a tar name, yielding better output with
"configure --help=recursive". Nuked an unused AC_STRUCT_ST_BLKSIZE test on the
way.

19 years ago[project @ 2004-09-17 08:25:25 by simonmar]
simonmar [Fri, 17 Sep 2004 08:25:25 +0000 (08:25 +0000)]
[project @ 2004-09-17 08:25:25 by simonmar]
Remove debugging trace that I left in when working on mk_switch.

19 years ago[project @ 2004-09-16 22:41:33 by sof]
sof [Thu, 16 Sep 2004 22:41:33 +0000 (22:41 +0000)]
[project @ 2004-09-16 22:41:33 by sof]
New option, -P, turns off line pragma emission

19 years ago[project @ 2004-09-16 08:13:02 by stolz]
stolz [Thu, 16 Sep 2004 08:13:02 +0000 (08:13 +0000)]
[project @ 2004-09-16 08:13:02 by stolz]
Collect unknown chunks in new chkcat 'unknown' which gets treated like
'misc', but isn't mangled on sparc-*-solaris2 because of function
definitions in C-headers like <pwd.h>. This shouldn't affect any
other platform since this was already a border-case.

Closes SF Bug 1012521 "getUserEntryForID dies".
Please merge.

19 years ago[project @ 2004-09-16 01:39:24 by mthomas]
mthomas [Thu, 16 Sep 2004 01:39:24 +0000 (01:39 +0000)]
[project @ 2004-09-16 01:39:24 by mthomas]
On Windows default to main.exe instead of a.out.

19 years ago[project @ 2004-09-15 17:48:08 by ross]
ross [Wed, 15 Sep 2004 17:48:10 +0000 (17:48 +0000)]
[project @ 2004-09-15 17:48:08 by ross]
arrow notation: allow arrow applications (f -< a) to take a non-empty
command stack, as suggested by Sebastian Boldt <Sebastian.Boldt@arcor.de>.

19 years ago[project @ 2004-09-15 13:50:59 by stolz]
stolz [Wed, 15 Sep 2004 13:51:00 +0000 (13:51 +0000)]
[project @ 2004-09-15 13:50:59 by stolz]
- Remove configure tests for SIG{POLL,INFO,WINCH}:
  Testing via #ifdef SIGFOO should be sufficient.
- Change #if HAVE_SIGPOLL to #ifdef SIGPOLL
- Remove SIGINFO/WINCH from package base: they'll reappear in package unix
  in System/Posix/Signals.Exts.

19 years ago[project @ 2004-09-15 12:06:08 by simonmar]
simonmar [Wed, 15 Sep 2004 12:06:08 +0000 (12:06 +0000)]
[project @ 2004-09-15 12:06:08 by simonmar]
Oops, fix bugs in previous commit.

19 years ago[project @ 2004-09-15 11:45:24 by simonmar]
simonmar [Wed, 15 Sep 2004 11:45:24 +0000 (11:45 +0000)]
[project @ 2004-09-15 11:45:24 by simonmar]
Add a couple of cases to mk_switch to catch the case when we have a
tag range that has a lot of default cases at either end, and we're not
using a single switch.  In situations like this we want to eliminate
the default cases with an if-statement, before dealing with the rest
of the branches, which might then be suitable for a switch.

Also, ignore empty tag slots at either end of the range if there is no
default case.

This might work around a gcc 2.95 bug that we tickled with the
code being generated before.

19 years ago[project @ 2004-09-15 02:47:03 by wolfgang]
wolfgang [Wed, 15 Sep 2004 02:47:03 +0000 (02:47 +0000)]
[project @ 2004-09-15 02:47:03 by wolfgang]
Accept '#pragma' lines in the cmm parser.
This is necessary because Apple's version of GNU cpp 3.3 leaves #pragma
lines in it's output, which cause the build to fail on Mac OS X with
GCC >= 3.3

19 years ago[project @ 2004-09-14 19:00:20 by panne]
panne [Tue, 14 Sep 2004 19:00:20 +0000 (19:00 +0000)]
[project @ 2004-09-14 19:00:20 by panne]
Fixed "yes" vs. "YES" confusion. This is currently really a mess and I'll
really have to clean this up someday...

19 years ago[project @ 2004-09-14 16:47:57 by panne]
panne [Tue, 14 Sep 2004 16:47:57 +0000 (16:47 +0000)]
[project @ 2004-09-14 16:47:57 by panne]
* Merged stgMalloc and execPage into a single function which handles
  even multiple pages correctly.

* Enabled the use VirtualProtect on x86 WinDoze now. This could be
  necessary for processors which distinguish between READ and EXECUTE
  memory accesses, e.g. Itaniums IIRC.

* Nuked pageMode and set page permissions always to READ/WRITE/EXECUTE,
  otherwise we could accidentally remove the WRITE permission.

Only mildly tested on x86 Linux, but it might be worth merging into
the STABLE branch when it turns out to work on x86 WinDoze and OpenBSD.
SimonM?

19 years ago[project @ 2004-09-14 04:34:12 by mthomas]
mthomas [Tue, 14 Sep 2004 04:34:12 +0000 (04:34 +0000)]
[project @ 2004-09-14 04:34:12 by mthomas]
Replace prog_belch with errorBelch.

19 years ago[project @ 2004-09-13 19:25:38 by panne]
panne [Mon, 13 Sep 2004 19:25:38 +0000 (19:25 +0000)]
[project @ 2004-09-13 19:25:38 by panne]
Improve fop detection now that SuSE has fixed their broken /usr/bin/fop

19 years ago[project @ 2004-09-13 17:18:27 by sof]
sof [Mon, 13 Sep 2004 17:18:27 +0000 (17:18 +0000)]
[project @ 2004-09-13 17:18:27 by sof]
threadSqueezeStack(): with DEBUG, zero out entire payload when
blackholing. Required now that LOOKS_LIKE_INFO_PTR() isn't 100%
precise.

Merge to STABLE

19 years ago[project @ 2004-09-13 17:10:48 by sof]
sof [Mon, 13 Sep 2004 17:10:48 +0000 (17:10 +0000)]
[project @ 2004-09-13 17:10:48 by sof]
printClosure(): handle MVARs

19 years ago[project @ 2004-09-13 09:56:12 by simonmar]
simonmar [Mon, 13 Sep 2004 09:56:12 +0000 (09:56 +0000)]
[project @ 2004-09-13 09:56:12 by simonmar]
There was a missing $T_HDR_info setting for solaris2/openbsd.

19 years ago[project @ 2004-09-13 09:19:16 by dons]
dons [Mon, 13 Sep 2004 09:19:16 +0000 (09:19 +0000)]
[project @ 2004-09-13 09:19:16 by dons]
malloc memory isn't executable by default on OpenBSD, so mprotect
pages in execPage for that platform. Enables the FFI.

Merge to stable

19 years ago[project @ 2004-09-12 12:12:18 by panne]
panne [Sun, 12 Sep 2004 12:12:19 +0000 (12:12 +0000)]
[project @ 2004-09-12 12:12:18 by panne]
Warning police. Why is x86_init_fpu disabled, BTW?

19 years ago[project @ 2004-09-12 11:45:04 by panne]
panne [Sun, 12 Sep 2004 11:45:04 +0000 (11:45 +0000)]
[project @ 2004-09-12 11:45:04 by panne]
Nuked "Revision" CVS keyword

19 years ago[project @ 2004-09-12 11:27:10 by panne]
panne [Sun, 12 Sep 2004 11:27:38 +0000 (11:27 +0000)]
[project @ 2004-09-12 11:27:10 by panne]
Removed the annoying "Id" CVS keywords, they're a real PITA when it
comes to merging...

19 years ago[project @ 2004-09-11 18:17:04 by panne]
panne [Sat, 11 Sep 2004 18:17:04 +0000 (18:17 +0000)]
[project @ 2004-09-11 18:17:04 by panne]
NOINLINE is mentioned in the H98 report, not NOTINLINE.

MERGE TO STABLE.