ghc-hetmet.git
21 years ago[project @ 2003-01-27 16:41:18 by simonmar]
simonmar [Mon, 27 Jan 2003 16:41:18 +0000 (16:41 +0000)]
[project @ 2003-01-27 16:41:18 by simonmar]
Fixes to make previous revision compatible with autoconf 2.13.

21 years ago[project @ 2003-01-27 11:08:16 by wolfgang]
wolfgang [Mon, 27 Jan 2003 11:08:16 +0000 (11:08 +0000)]
[project @ 2003-01-27 11:08:16 by wolfgang]
Un-break the non-threaded RTS
Sorry :-/

21 years ago[project @ 2003-01-26 12:56:00 by panne]
panne [Sun, 26 Jan 2003 12:56:00 +0000 (12:56 +0000)]
[project @ 2003-01-26 12:56:00 by panne]
Synched OpenGL detection macro with HOpenGL-1.04.
TODO: Modularization of the macro and caching.

21 years ago[project @ 2003-01-25 15:54:48 by wolfgang]
wolfgang [Sat, 25 Jan 2003 15:54:51 +0000 (15:54 +0000)]
[project @ 2003-01-25 15:54:48 by wolfgang]
This commit fixes many bugs and limitations in the threaded RTS.
There are still some issues remaining, though.

The following bugs should have been fixed:

- [+] "safe" calls could cause crashes
- [+] yieldToReturningWorker/grabReturnCapability
    -     It used to deadlock.
- [+] couldn't wake blocked workers
    -     Calls into the RTS could go unanswered for a long time, and
          that includes ordinary callbacks in some circumstances.
- [+] couldn't block on an MVar and expect to be woken up by a signal
      handler
    -     Depending on the exact situation, the RTS shut down or
          blocked forever and ignored the signal.
- [+] The locking scheme in RtsAPI.c didn't work
- [+] run_thread label in wrong place (schedule())
- [+] Deadlock in GHC.Handle
    -     if a signal arrived at the wrong time, an mvar was never
          filled again
- [+] Signals delivered to the "wrong" thread were ignored or handled
      too late.

Issues:
*) If GC can move TSO objects (I don't know - can it?), then ghci
will occasionally crash when calling foreign functions, because the
parameters are stored on the TSO stack.

*) There is still a race condition lurking in the code
(both threaded and non-threaded RTS are affected):
If a signal arrives after the check for pending signals in
schedule(), but before the call to select() in awaitEvent(),
select() will be called anyway. The signal handler will be
executed much later than expected.

*) For Win32, GHC doesn't yet support non-blocking IO, so while a
thread is waiting for IO, no call-ins can happen. If the RTS is
blocked in awaitEvent, it uses a polling loop on Win32, so call-ins
should work (although the polling loop looks ugly).

*) Deadlock detection is disabled for the threaded rts, because I
don't know how to do it properly in the presence of foreign call-ins
from foreign threads.
This causes the tests conc031, conc033 and conc034 to fail.

*) "safe" is currently treated as "threadsafe". Implementing "safe" in
a way that blocks other Haskell threads is more difficult than was
thought at first. I think it could be done with a few additional lines
of code, but personally, I'm strongly in favour of abolishing the
distinction.

*) Running finalizers at program termination is inefficient - there
are two OS threads passing messages back and forth for every finalizer
that is run. Also (just as in the non-threaded case) the finalizers
are run in parallel to any remaining haskell threads and to any
foreign call-ins that might still happen.

21 years ago[project @ 2003-01-24 16:05:57 by simonmar]
simonmar [Fri, 24 Jan 2003 16:05:57 +0000 (16:05 +0000)]
[project @ 2003-01-24 16:05:57 by simonmar]
remove setting of $(way_) and $(_way); these are now set in boilerplate.mk

21 years ago[project @ 2003-01-24 14:04:40 by simonmar]
simonmar [Fri, 24 Jan 2003 14:04:41 +0000 (14:04 +0000)]
[project @ 2003-01-24 14:04:40 by simonmar]
- Generalise seq to allow an unlifted type in its second argument.  This
  works because seq is *always* inlined and replaced by a case.

- Remove getTag, a wired-in Id with an unfolding, with a definition
  in GHC.Base:

getTag x = x `seq` dataToTag# x

  this is why we required the above generalisation to seq (dataToTag#
  returns an Int#).  See the comments in GHC.Base for more details.

- As a side-effect, this fixes a bug in the interpreter, where the
  compiler optimised away the evaluation of the argument to dataToTag#,
  but the interpreter ended up passing it an unevaluated thunk (nullary
  constructors aren't always evaluated in GHCi, but the simplifier
  assumes they are).  Now, in the interpreter, getTag won't be inlined
  so the compiler can't optimise away the evaluation, and we're saved.

  The real bug here is either (a) dataToTag# requires an evaluated
  argument or (b) the interpreter doesn't supply it with one, take your
  pick.

21 years ago[project @ 2003-01-24 13:56:45 by simonmar]
simonmar [Fri, 24 Jan 2003 13:56:45 +0000 (13:56 +0000)]
[project @ 2003-01-24 13:56:45 by simonmar]
- Reverse the code for workers and wrappers for nullary constructors.
  For some reason it was the wrong way around, but the effects were
  harmless since they both evaluate to the same thing.

- When passing a nullary constructor as an argument, we should pass
  the name of the worker rather than the wrapper.  Again, this is
  mostly harmless, but it enables some small simplification in
  pushAtom.

- Rearrange/cleanup pushAtom.

21 years ago[project @ 2003-01-24 11:26:39 by simonpj]
simonpj [Fri, 24 Jan 2003 11:26:39 +0000 (11:26 +0000)]
[project @ 2003-01-24 11:26:39 by simonpj]
Perform 'tidying' on the implicit bindings before emitting
External Core.  We were getting silly bindings like
\ tpl -> case tpl of tpl -> (tpl,tpl) -> tpl

Maybe we should add these implicit bindings in CoreTidy,
rather than in both MkExternalCore and CorePrep?

21 years ago[project @ 2003-01-23 16:39:30 by simonmar]
simonmar [Thu, 23 Jan 2003 16:39:30 +0000 (16:39 +0000)]
[project @ 2003-01-23 16:39:30 by simonmar]
Fix compilation with DEBUG

21 years ago[project @ 2003-01-23 16:13:43 by simonmar]
simonmar [Thu, 23 Jan 2003 16:13:43 +0000 (16:13 +0000)]
[project @ 2003-01-23 16:13:43 by simonmar]
We have to desugar polymorphic FFI declarations properly, too.
(companion commit to rev. 1.84 of TcType.lhs).

21 years ago[project @ 2003-01-23 16:01:33 by simonmar]
simonmar [Thu, 23 Jan 2003 16:01:33 +0000 (16:01 +0000)]
[project @ 2003-01-23 16:01:33 by simonmar]
Allow FFI declarations to have polymorphic types. eg:

foreign import ccall unsafe "stdlib.h &free" pFree :: FunPtr (Ptr a -> IO ())

(the change actually removed a line, the extra lines are because I
reformatted an import declaration).

21 years ago[project @ 2003-01-23 14:55:56 by simonpj]
simonpj [Thu, 23 Jan 2003 14:55:56 +0000 (14:55 +0000)]
[project @ 2003-01-23 14:55:56 by simonpj]
Refine documentation of newtype-deriving stuff

21 years ago[project @ 2003-01-23 14:55:36 by simonpj]
simonpj [Thu, 23 Jan 2003 14:55:36 +0000 (14:55 +0000)]
[project @ 2003-01-23 14:55:36 by simonpj]
Document warning suppression with leading underscore on variable names

21 years ago[project @ 2003-01-23 14:54:35 by simonpj]
simonpj [Thu, 23 Jan 2003 14:54:35 +0000 (14:54 +0000)]
[project @ 2003-01-23 14:54:35 by simonpj]
Suppress "No explicit method or default decl given for m"
if the method name starts with an underscore

This in response to a suggestion by George Russel

21 years ago[project @ 2003-01-23 14:50:53 by simonpj]
simonpj [Thu, 23 Jan 2003 14:50:53 +0000 (14:50 +0000)]
[project @ 2003-01-23 14:50:53 by simonpj]
Improve error message again

21 years ago[project @ 2003-01-23 14:36:58 by simonpj]
simonpj [Thu, 23 Jan 2003 14:36:58 +0000 (14:36 +0000)]
[project @ 2003-01-23 14:36:58 by simonpj]
Fix two small bugs in deriving mechanism, both concerning error reporting

21 years ago[project @ 2003-01-23 14:08:46 by simonpj]
simonpj [Thu, 23 Jan 2003 14:08:46 +0000 (14:08 +0000)]
[project @ 2003-01-23 14:08:46 by simonpj]
Improve error message

21 years ago[project @ 2003-01-23 12:26:04 by simonmar]
simonmar [Thu, 23 Jan 2003 12:26:04 +0000 (12:26 +0000)]
[project @ 2003-01-23 12:26:04 by simonmar]
Document +RTS -xt

21 years ago[project @ 2003-01-23 12:13:10 by simonmar]
simonmar [Thu, 23 Jan 2003 12:13:12 +0000 (12:13 +0000)]
[project @ 2003-01-23 12:13:10 by simonmar]
- Add a new flag, -xt, which enables inclusion of TSOs in a heap profile.

- Include large objects in heap profiles (except TSOs unless the -xt flag
  is given).

- In order to make this work, I had to set the bd->free field of the
  block descriptor for a large object to the correct value.  Previously,
  it pointed to the start of the block (i.e. the same as bd->start).
  I hope this doesn't have any other consequences; it looks more
  correct this way in any case.

21 years ago[project @ 2003-01-23 11:22:50 by simonmar]
simonmar [Thu, 23 Jan 2003 11:22:50 +0000 (11:22 +0000)]
[project @ 2003-01-23 11:22:50 by simonmar]
A nullary constructor in an argument position should refer to the
constructor worker, not the wrapper.  In most cases they're the same,
but when using -funbox-strict-fields (or maybe a context on a data
type?) they can be different, leading to a crash.

MERGE TO STABLE

21 years ago[project @ 2003-01-20 16:24:51 by simonpj]
simonpj [Mon, 20 Jan 2003 16:24:51 +0000 (16:24 +0000)]
[project @ 2003-01-20 16:24:51 by simonpj]
Increase the size of a string literal; cures a simplifier loop
    when an application (f "x") appeared to have size 1, and so was
    inlined repeatedly.  The problem was that "x" appeared to have
    size 0.

21 years ago[project @ 2003-01-19 18:41:19 by wolfgang]
wolfgang [Sun, 19 Jan 2003 18:41:19 +0000 (18:41 +0000)]
[project @ 2003-01-19 18:41:19 by wolfgang]
Fix two really bad typos in the Mac OS X specific code

MERGE TO STABLE

21 years ago[project @ 2003-01-17 17:01:13 by stolz]
stolz [Fri, 17 Jan 2003 17:01:14 +0000 (17:01 +0000)]
[project @ 2003-01-17 17:01:13 by stolz]
- Add sendfile-API for pumping out data via sendfile(2)
  Currently supported are Linux (tested) & FreeBSD (not tested yet), others
  will throw a runtime error until I get around to implement a fallback.

21 years ago[project @ 2003-01-17 16:22:09 by sof]
sof [Fri, 17 Jan 2003 16:22:09 +0000 (16:22 +0000)]
[project @ 2003-01-17 16:22:09 by sof]
mingw: use cp's -u flag when copying over hi-boot files (or not, as the case might be now.)

21 years ago[project @ 2003-01-17 16:05:09 by sof]
sof [Fri, 17 Jan 2003 16:05:10 +0000 (16:05 +0000)]
[project @ 2003-01-17 16:05:09 by sof]
for mingw builds, redirect to NUL

21 years ago[project @ 2003-01-14 14:58:42 by simonmar]
simonmar [Tue, 14 Jan 2003 14:58:42 +0000 (14:58 +0000)]
[project @ 2003-01-14 14:58:42 by simonmar]
Set $(way_) and $(_way) in here, so they are available as soon as possible.

21 years ago[project @ 2003-01-14 13:43:11 by simonmar]
simonmar [Tue, 14 Jan 2003 13:43:11 +0000 (13:43 +0000)]
[project @ 2003-01-14 13:43:11 by simonmar]
Fix to previous commit

21 years ago[project @ 2003-01-14 13:17:43 by simonmar]
simonmar [Tue, 14 Jan 2003 13:17:43 +0000 (13:17 +0000)]
[project @ 2003-01-14 13:17:43 by simonmar]
Clean up properly after generating Haddock docs.

21 years ago[project @ 2003-01-13 17:01:22 by simonpj]
simonpj [Mon, 13 Jan 2003 17:01:29 +0000 (17:01 +0000)]
[project @ 2003-01-13 17:01:22 by simonpj]
------------------------------------
(a) Improve reporting of staging errors
(b) Tidy up the construction of dict funs
and default methods
------------------------------------

21 years ago[project @ 2003-01-13 14:12:31 by simonpj]
simonpj [Mon, 13 Jan 2003 14:12:31 +0000 (14:12 +0000)]
[project @ 2003-01-13 14:12:31 by simonpj]
Bale out earlier if main is not in scope (fixes several test failures)

21 years ago[project @ 2003-01-13 14:02:07 by simonmar]
simonmar [Mon, 13 Jan 2003 14:02:08 +0000 (14:02 +0000)]
[project @ 2003-01-13 14:02:07 by simonmar]
The hook NoRunnableThreads() is not used; kill it.

21 years ago[project @ 2003-01-13 13:39:34 by simonpj]
simonpj [Mon, 13 Jan 2003 13:39:34 +0000 (13:39 +0000)]
[project @ 2003-01-13 13:39:34 by simonpj]
wibble

21 years ago[project @ 2003-01-13 13:22:58 by simonpj]
simonpj [Mon, 13 Jan 2003 13:22:58 +0000 (13:22 +0000)]
[project @ 2003-01-13 13:22:58 by simonpj]
Comment

21 years ago[project @ 2003-01-13 13:20:37 by simonpj]
simonpj [Mon, 13 Jan 2003 13:20:38 +0000 (13:20 +0000)]
[project @ 2003-01-13 13:20:37 by simonpj]
--------------------------------
Don't export the inlining for a foreign
import that has a #include directive
--------------------------------

Reason for this change: if the inlining is imported into another
module, the latter may not have the right #include directives.

Also add notes to the documentation to explain the issues.

21 years ago[project @ 2003-01-13 13:19:25 by simonpj]
simonpj [Mon, 13 Jan 2003 13:19:25 +0000 (13:19 +0000)]
[project @ 2003-01-13 13:19:25 by simonpj]
------------------------------------
Type signature for derived con2tag
------------------------------------

MERGE TO STABLE

The derived con2tag didn't have a type signature, so we got

con2tagFoo :: a -> Int#
con2tagFoo = \x -> getTag x

The getTag generates a case expression, so we get a polymorphic
case.  The polymorphic case simply does not work in *interpreted*
GHC 5.02.3 and as a result neither does con2tag.  Alas.

This commit fixes the problem, by giving a type signature for
con2TagFoo.  But note that getTag in interpreted GHC 5.02 will continue
to fail if used in a polymorphic context.  This problem does not arise
in the HEAD (eval/apply) so I'm going to leave it as a wont-fix bug.

21 years ago[project @ 2003-01-13 13:10:19 by simonpj]
simonpj [Mon, 13 Jan 2003 13:10:24 +0000 (13:10 +0000)]
[project @ 2003-01-13 13:10:19 by simonpj]
Import trimming

21 years ago[project @ 2003-01-10 22:08:20 by wolfgang]
wolfgang [Fri, 10 Jan 2003 22:08:20 +0000 (22:08 +0000)]
[project @ 2003-01-10 22:08:20 by wolfgang]
blockUserSignal() should use SIG_BLOCK instead of SIG_SETMASK, otherwise it
would also sometimes unblock signals that should be blocked.

MERGE TO STABLE

21 years ago[project @ 2003-01-10 16:33:49 by simonmar]
simonmar [Fri, 10 Jan 2003 16:33:50 +0000 (16:33 +0000)]
[project @ 2003-01-10 16:33:49 by simonmar]
Changes to the way stack checks are handled in GHCi, to fix a rare bug
when a stack check fails in a BCO.

We now aggregate all stack use from case alternatives up to the
enclosing function/thunk BCO, and do a single stack check at the
beginning of that BCO.  This simplifies the stack check failure code,
because it doesn't have to cope with the case when a case alternative
needs to restart.

We still employ the trick of doing a fixed stack check before every
BCO, only inserting an actual stack check instruction in the BCO if it
needs more stack than this fixed amount.  The fixed stack check is now
only done before running a function/thunk BCO.

21 years ago[project @ 2003-01-10 16:10:00 by simonpj]
simonpj [Fri, 10 Jan 2003 16:10:00 +0000 (16:10 +0000)]
[project @ 2003-01-10 16:10:00 by simonpj]
Add notes on real-time profiling from Jan-Willhem

21 years ago[project @ 2003-01-10 15:00:22 by simonmar]
simonmar [Fri, 10 Jan 2003 15:00:22 +0000 (15:00 +0000)]
[project @ 2003-01-10 15:00:22 by simonmar]
Fix GHCi breakage on the HEAD: my recent fixes to the BCO cases in
GenApply weren't quite correct.

21 years ago[project @ 2003-01-10 14:20:41 by simonpj]
simonpj [Fri, 10 Jan 2003 14:20:41 +0000 (14:20 +0000)]
[project @ 2003-01-10 14:20:41 by simonpj]
Export main from Main (only matters for ghci) [missed file]

21 years ago[project @ 2003-01-10 14:20:01 by simonpj]
simonpj [Fri, 10 Jan 2003 14:20:01 +0000 (14:20 +0000)]
[project @ 2003-01-10 14:20:01 by simonpj]
Export main from Main (only matters for ghci)

21 years ago[project @ 2003-01-10 10:55:24 by simonmar]
simonmar [Fri, 10 Jan 2003 10:55:24 +0000 (10:55 +0000)]
[project @ 2003-01-10 10:55:24 by simonmar]
Only add -package readline if $(GhcLibsWithReadline) == YES

This isn't really the correct solution, since we actually want to know
whether the bootstrapping compiler has readline, not this one, but
since the most common bootstrapping compiler is going to be the stage1
compiler in this tree it's a good guess that GhcLibsWithReadline is
correct.

21 years ago[project @ 2003-01-09 16:15:51 by simonpj]
simonpj [Thu, 9 Jan 2003 16:15:52 +0000 (16:15 +0000)]
[project @ 2003-01-09 16:15:51 by simonpj]
--------------------------
Fix export-calculation bug
--------------------------

Ross points out that in
  module M where
  import List as M
  sort = "foo"

there is no conflict in the export list. GHC used to treat this
like

module M( module M ) where ...

which is wrong, wrong, wrong.

Now fixed.   Test in modules/mod200.hs

Some other small tidying up (notably in GRE.gre_parent).

21 years ago[project @ 2003-01-09 16:15:30 by simonpj]
simonpj [Thu, 9 Jan 2003 16:15:30 +0000 (16:15 +0000)]
[project @ 2003-01-09 16:15:30 by simonpj]
Layout wibble

21 years ago[project @ 2003-01-09 16:11:03 by simonpj]
simonpj [Thu, 9 Jan 2003 16:11:03 +0000 (16:11 +0000)]
[project @ 2003-01-09 16:11:03 by simonpj]
Wibble

21 years ago[project @ 2003-01-09 15:49:25 by simonmar]
simonmar [Thu, 9 Jan 2003 15:49:25 +0000 (15:49 +0000)]
[project @ 2003-01-09 15:49:25 by simonmar]
small fix:  'if ($x)' is not the same as 'if ($x ne "")'

21 years ago[project @ 2003-01-09 15:42:27 by simonpj]
simonpj [Thu, 9 Jan 2003 15:42:27 +0000 (15:42 +0000)]
[project @ 2003-01-09 15:42:27 by simonpj]
---------------------------------------
Improvements to the byte-code generator
---------------------------------------

1. The schemeR call in coreExprToBCOs was bogusly passing a bunch of free
   variables, when the set should always be empty. As a result, compiling
   an expression with an unbound free variable (e.g. 'x + 1', where 'x' is
   entirely unbound) succeeded, expecting 'x' to be passed on the stack,
   which of course it won't be.

   This bug only shows up if an earlier stage of the compiler goes wrong,
   but fixing turns a seg-fault into a more graceful failure.

2. Make schemeE allocate non-recursive constructors directly.

3. Lots of general tidying up.  Result is 50 lines shorter than before.

21 years ago[project @ 2003-01-09 15:41:50 by simonpj]
simonpj [Thu, 9 Jan 2003 15:41:50 +0000 (15:41 +0000)]
[project @ 2003-01-09 15:41:50 by simonpj]
Comments only

21 years ago[project @ 2003-01-09 15:35:31 by simonpj]
simonpj [Thu, 9 Jan 2003 15:35:31 +0000 (15:35 +0000)]
[project @ 2003-01-09 15:35:31 by simonpj]
Catch a staging error that slipped through before

21 years ago[project @ 2003-01-09 12:01:45 by simonmar]
simonmar [Thu, 9 Jan 2003 12:01:45 +0000 (12:01 +0000)]
[project @ 2003-01-09 12:01:45 by simonmar]
Fix the stage2 build even more.

21 years ago[project @ 2003-01-09 11:39:20 by simonmar]
simonmar [Thu, 9 Jan 2003 11:39:20 +0000 (11:39 +0000)]
[project @ 2003-01-09 11:39:20 by simonmar]
Add missing -pgmL switch.

MERGE TO STABLE

21 years ago[project @ 2003-01-09 11:22:19 by simonmar]
simonmar [Thu, 9 Jan 2003 11:22:19 +0000 (11:22 +0000)]
[project @ 2003-01-09 11:22:19 by simonmar]
Fix the stage2 build.

21 years ago[project @ 2003-01-09 10:49:21 by simonmar]
simonmar [Thu, 9 Jan 2003 10:49:22 +0000 (10:49 +0000)]
[project @ 2003-01-09 10:49:21 by simonmar]
Further refine the criteria for deciding whether command line
arguments should be passed to the compilation manager or the linker.
See comments in the file.

MERGE TO STABLE

21 years ago[project @ 2003-01-08 15:47:54 by simonmar]
simonmar [Wed, 8 Jan 2003 15:47:54 +0000 (15:47 +0000)]
[project @ 2003-01-08 15:47:54 by simonmar]
Improve the missing module message in the compilation manager, too.

21 years ago[project @ 2003-01-08 15:28:04 by simonmar]
simonmar [Wed, 8 Jan 2003 15:28:05 +0000 (15:28 +0000)]
[project @ 2003-01-08 15:28:04 by simonmar]
Improve missing-module error messages.  eg.

hello2.hs:1:
    Failed to load interface for `Foo':
        Could not find interface file for `Foo'
        (use -v to see a list of the files searched for)

and if we add the -v flag:

hello2.hs:1:
    Failed to load interface for `Foo':
        Could not find interface file for `Foo'
        locations searched:
            Foo.hi
            Foo.hi-boot-6
            Foo.hi-boot
            /home/simonmar/builds/i386-unknown-linux/libraries/haskell-src/Foo.hi
            /home/simonmar/builds/i386-unknown-linux/libraries/haskell98/Foo.hi
            /home/simonmar/builds/i386-unknown-linux/libraries/readline/Foo.hi
            /home/simonmar/builds/i386-unknown-linux/libraries/unix/Foo.hi
            /home/simonmar/builds/i386-unknown-linux/libraries/network/Foo.hi
            /home/simonmar/builds/i386-unknown-linux/libraries/base/Foo.hi

21 years ago[project @ 2003-01-08 13:03:25 by simonmar]
simonmar [Wed, 8 Jan 2003 13:03:25 +0000 (13:03 +0000)]
[project @ 2003-01-08 13:03:25 by simonmar]
Add -mno-omit-leaf-frame-pointer if gcc supports it.

MERGE TO STABLE

21 years ago[project @ 2003-01-08 12:37:45 by simonmar]
simonmar [Wed, 8 Jan 2003 12:37:45 +0000 (12:37 +0000)]
[project @ 2003-01-08 12:37:45 by simonmar]
stg_BCO_entry needs to be extern now.

21 years ago[project @ 2003-01-08 12:03:28 by simonmar]
simonmar [Wed, 8 Jan 2003 12:03:29 +0000 (12:03 +0000)]
[project @ 2003-01-08 12:03:28 by simonmar]
- Detect whether we have a recent GCC that might need
  -mno-omit-leaf-fram-pointer.

- Add missing HAVE_SC_GETGR_R_SIZE_MAX and HAVE_SC_GETPW_R_SIZE_MAX
  templates to acconfig.h.

- Regen mk/config.h.in.

21 years ago[project @ 2003-01-08 10:10:19 by simonmar]
simonmar [Wed, 8 Jan 2003 10:10:19 +0000 (10:10 +0000)]
[project @ 2003-01-08 10:10:19 by simonmar]
Update the documentation on --make mode to indicate that multiple
sources/modules can be given on the command line, as well as multiple
object files.

MERGE TO STABLE

21 years ago[project @ 2003-01-07 16:30:37 by simonmar]
simonmar [Tue, 7 Jan 2003 16:30:37 +0000 (16:30 +0000)]
[project @ 2003-01-07 16:30:37 by simonmar]
80-columnify a comment

21 years ago[project @ 2003-01-07 14:31:19 by simonmar]
simonmar [Tue, 7 Jan 2003 14:31:20 +0000 (14:31 +0000)]
[project @ 2003-01-07 14:31:19 by simonmar]
Update comments

21 years ago[project @ 2003-01-07 14:19:25 by simonmar]
simonmar [Tue, 7 Jan 2003 14:19:25 +0000 (14:19 +0000)]
[project @ 2003-01-07 14:19:25 by simonmar]
Simplify the bitmap-generating code by collecting all the pointer
words rather than all the non-pointer words, and then subtracting
these from a bitmap made of all ones.  This is simpler because we only
have to look in the bindings, rather than combining information from
bindings and the free stack slot list.

21 years ago[project @ 2003-01-07 13:25:07 by simonmar]
simonmar [Tue, 7 Jan 2003 13:25:07 +0000 (13:25 +0000)]
[project @ 2003-01-07 13:25:07 by simonmar]
Expand bitmaps to cover the full size of the stack frame.  Previously
the bitmap would stop at the last non-zero bit, which might shorten
the bitmap by one or more words.  The behaviour used to be correct,
but with the eval/apply changes bitmaps must now cover the entire
stack frame rather than everything up to the last non-pointer word.

21 years ago[project @ 2003-01-07 09:29:24 by simonmar]
simonmar [Tue, 7 Jan 2003 09:29:24 +0000 (09:29 +0000)]
[project @ 2003-01-07 09:29:24 by simonmar]
Declare stg_BCO_entry.  (this should have been committed with rev. 1.4
of utils/genapply/GenApply.hs).

21 years ago[project @ 2003-01-06 15:30:14 by simonpj]
simonpj [Mon, 6 Jan 2003 15:30:17 +0000 (15:30 +0000)]
[project @ 2003-01-06 15:30:14 by simonpj]
--------------------------------------------------------------
Several small but tiresome things shown up by Template Haskell
--------------------------------------------------------------

1. Make the 'knot' in TcRnDriver much smaller; in fact move it to
   TcIfaceSig.tcInterfaceSigs.  Reasons
a) much tidier
b) avoids a loop in Template Haskell, when we try to run
   an expression during type checking (when the knot is
   not fully tied)

   See comments in TcIfaceSig

2. Stop typechecking if tcGroup fails.  Reason: otherwise tcLookup can
   fail in the next group.

3. Catch linking errors more gracefully when running a splice (in TcSplice)

21 years ago[project @ 2003-01-06 15:29:27 by simonpj]
simonpj [Mon, 6 Jan 2003 15:29:27 +0000 (15:29 +0000)]
[project @ 2003-01-06 15:29:27 by simonpj]
Small extra tc-trace

21 years ago[project @ 2003-01-06 15:27:11 by simonpj]
simonpj [Mon, 6 Jan 2003 15:27:11 +0000 (15:27 +0000)]
[project @ 2003-01-06 15:27:11 by simonpj]
Make HscMain.compileExpr run lint if -dcore-lint is on

21 years ago[project @ 2003-01-06 15:26:09 by simonpj]
simonpj [Mon, 6 Jan 2003 15:26:09 +0000 (15:26 +0000)]
[project @ 2003-01-06 15:26:09 by simonpj]
1.  Arrange that -ddump-tc-trace will print out the exception caught by tryTc

2.  Make forkM a bit quieter, unless -ddump-tc-trace is on.

21 years ago[project @ 2003-01-06 15:19:08 by simonpj]
simonpj [Mon, 6 Jan 2003 15:19:08 +0000 (15:19 +0000)]
[project @ 2003-01-06 15:19:08 by simonpj]
Spelling

21 years ago[project @ 2003-01-06 15:18:48 by simonpj]
simonpj [Mon, 6 Jan 2003 15:18:48 +0000 (15:18 +0000)]
[project @ 2003-01-06 15:18:48 by simonpj]
dieWith uses ProgramError, not UsageError

21 years ago[project @ 2003-01-06 15:17:57 by simonpj]
simonpj [Mon, 6 Jan 2003 15:17:57 +0000 (15:17 +0000)]
[project @ 2003-01-06 15:17:57 by simonpj]
---------------------------------------------
Try slightly more aggressive rule application
---------------------------------------------

Switch on AlwaysActive rules even in SimplGently.  This should
make some TH programs a little better, but it's not a big deal.

21 years ago[project @ 2003-01-06 15:16:33 by simonpj]
simonpj [Mon, 6 Jan 2003 15:16:39 +0000 (15:16 +0000)]
[project @ 2003-01-06 15:16:33 by simonpj]
--------------------------------
Make ModLocation have a FilePath
instead of (Maybe FilePath) for
the object-file location
--------------------------------

This generally tides things up, and makes ml_obj_file more like
ml_hi_file.

Furthermore the ml_obj_file field gets filled in even when we
initially expect just an .hi file.  This is important for Template
Haskell.

21 years ago[project @ 2003-01-06 14:40:04 by simonmar]
simonmar [Mon, 6 Jan 2003 14:40:07 +0000 (14:40 +0000)]
[project @ 2003-01-06 14:40:04 by simonmar]
Disable the version check on the .hi file for --show-iface.  This
means that it can be used on .hi files for other "ways" (eg. profiled)
without having to resort to using the undocumented -buildtag option.

21 years ago[project @ 2003-01-06 14:15:38 by simonmar]
simonmar [Mon, 6 Jan 2003 14:15:38 +0000 (14:15 +0000)]
[project @ 2003-01-06 14:15:38 by simonmar]
Add a handy hint for finding the correct fully-qualified original
names for entities in .hi-boot files.

21 years ago[project @ 2003-01-06 13:12:37 by simonmar]
simonmar [Mon, 6 Jan 2003 13:12:37 +0000 (13:12 +0000)]
[project @ 2003-01-06 13:12:37 by simonmar]
The FUN application code is wrong when entering a BCO, because the BCO
entry code assumes a stack-only calling convention.  Use the PAP entry
code instead, which also uses a stack-only convention.

21 years ago[project @ 2003-01-06 13:11:26 by simonmar]
simonmar [Mon, 6 Jan 2003 13:11:26 +0000 (13:11 +0000)]
[project @ 2003-01-06 13:11:26 by simonmar]
Prefix a double-underscore to a variable in a macro, to avoid conflicts.

21 years ago[project @ 2003-01-04 18:46:57 by wolfgang]
wolfgang [Sat, 4 Jan 2003 18:46:57 +0000 (18:46 +0000)]
[project @ 2003-01-04 18:46:57 by wolfgang]
Darwin: Replace "g" constraint by "r" in inline assembly, otherwise it won't compile without -O

21 years ago[project @ 2002-12-27 21:55:30 by panne]
panne [Fri, 27 Dec 2002 21:55:30 +0000 (21:55 +0000)]
[project @ 2002-12-27 21:55:30 by panne]
Imports cleanup

21 years ago[project @ 2002-12-27 12:33:21 by panne]
panne [Fri, 27 Dec 2002 12:33:21 +0000 (12:33 +0000)]
[project @ 2002-12-27 12:33:21 by panne]
Nuked prototype for non-existent function 'RevertCAFs'. Even if this
should be the same as ghc/rts/Storage.h's 'revertCAFs', it would still
be a strange place...

21 years ago[project @ 2002-12-27 12:20:06 by panne]
panne [Fri, 27 Dec 2002 12:20:06 +0000 (12:20 +0000)]
[project @ 2002-12-27 12:20:06 by panne]
-#include cleanup. What we really need here are additional prototypes
for 'getAllocations' and 'revertCAFs', but these are only available
via RTS headers. I'm not sure if -#including them somehow would be OK,
so I left this out. A few lines of documentation who is allowed to
#include (or -#include) what would be helpful...

21 years ago[project @ 2002-12-27 11:35:16 by panne]
panne [Fri, 27 Dec 2002 11:35:16 +0000 (11:35 +0000)]
[project @ 2002-12-27 11:35:16 by panne]
* Fixed non-Mac-OS-X-builds
* Warning police: Fixed #includes

21 years ago[project @ 2002-12-27 10:32:59 by panne]
panne [Fri, 27 Dec 2002 10:32:59 +0000 (10:32 +0000)]
[project @ 2002-12-27 10:32:59 by panne]
Warning police: #undef SymX_redirect before it gets redefined.  :-P

21 years ago[project @ 2002-12-26 17:54:51 by wolfgang]
wolfgang [Thu, 26 Dec 2002 17:54:51 +0000 (17:54 +0000)]
[project @ 2002-12-26 17:54:51 by wolfgang]
Load Mac OS X - style "frameworks" given on the command line (-framework XXX)

21 years ago[project @ 2002-12-26 17:52:34 by wolfgang]
wolfgang [Thu, 26 Dec 2002 17:52:35 +0000 (17:52 +0000)]
[project @ 2002-12-26 17:52:34 by wolfgang]
Mac OS X doesn't have the sysconfig constants _SC_GETPW_R_SIZE_MAX and _SC_GETGR_R_SIZE_MAX, so add a configure check

21 years ago[project @ 2002-12-23 11:02:15 by simonmar]
simonmar [Mon, 23 Dec 2002 11:02:15 +0000 (11:02 +0000)]
[project @ 2002-12-23 11:02:15 by simonmar]
Add the #includes from the rts package to the stub .c file.

Prior to rev. 1.42, we used to add all the #includes from all enabled
packages, together with any -#include options from the command-line.
But since this is auto-generated code and we know exactly which
#includes are required, this was overkill.

In rev. 1.42, all #includes except RtsAPI.h were removed from the stub
.c file.  This was incorrect, because the stub file refers to some
entities defined in other RTS header files (the StgStablePtr type, and
deRefStablePtr() for example).

This change adds the header files from the rts package to the stub .c
file, fixing some recent test breakages.

21 years ago[project @ 2002-12-20 16:22:19 by ross]
ross [Fri, 20 Dec 2002 16:22:19 +0000 (16:22 +0000)]
[project @ 2002-12-20 16:22:19 by ross]
Add more M4 quoting (required by autoconf 2.57)

21 years ago[project @ 2002-12-19 18:43:53 by wolfgang]
wolfgang [Thu, 19 Dec 2002 18:43:53 +0000 (18:43 +0000)]
[project @ 2002-12-19 18:43:53 by wolfgang]
Un-break for Mac OS X (handling of Apple's "frameworks")

21 years ago[project @ 2002-12-19 18:02:13 by panne]
panne [Thu, 19 Dec 2002 18:02:13 +0000 (18:02 +0000)]
[project @ 2002-12-19 18:02:13 by panne]
Warning police (labels at end of compound statements are uncool, GCC says...)

21 years ago[project @ 2002-12-19 18:00:42 by panne]
panne [Thu, 19 Dec 2002 18:00:42 +0000 (18:00 +0000)]
[project @ 2002-12-19 18:00:42 by panne]
Use a less uncool way to avoid spurious warnings

21 years ago[project @ 2002-12-19 17:57:39 by panne]
panne [Thu, 19 Dec 2002 17:57:39 +0000 (17:57 +0000)]
[project @ 2002-12-19 17:57:39 by panne]
Fixed #ifdefery for GCC >= 3.x

21 years ago[project @ 2002-12-19 15:12:01 by simonmar]
simonmar [Thu, 19 Dec 2002 15:12:02 +0000 (15:12 +0000)]
[project @ 2002-12-19 15:12:01 by simonmar]
GHCi needs to link in packages eagerly if they're specified on the
command line.

21 years ago[project @ 2002-12-19 14:33:22 by simonmar]
simonmar [Thu, 19 Dec 2002 14:33:23 +0000 (14:33 +0000)]
[project @ 2002-12-19 14:33:22 by simonmar]
Terrible hack to restore CAF handling behaviour in GHCi (it's
currently broken).

The story used to be this: in newCAF(), if the CAF is in dynamically
loaded code, then we save the CAF's info ptr in a spare slot in the
closure, and add the CAF to the caf_list.  The GC will retain
everything on the caf_list.  At any point the CAFs can all be reverted
by replacing their info pointers from the saved copies.

CAFs need to be retained for GHCi because they might be required in a
future execution; an optimisation would be to avoid retaining the CAFs
if we're in "revert mode"; i.e. the CAFs are all going to be reverted
after execution anyway.  Also, this only applies to CAFs in compiled
code; CAFs in interpreted code are currently always retained.

Anyway, the old story is harder now that I removed the code that
checks whether a pointer is dynamically loaded or not (:-)).  Rather
than re-instate that code, I created a new version of newCAF
(newDynCAF), and arranged that the dynamic linker redirects any
references to newCAF to point to newDynCAF instead.  The result is
more efficient than before, and takes less code.

21 years ago[project @ 2002-12-19 14:25:04 by simonmar]
simonmar [Thu, 19 Dec 2002 14:25:05 +0000 (14:25 +0000)]
[project @ 2002-12-19 14:25:04 by simonmar]
Include a static version of deRefStablePtr in case the code that uses
it was compiled without optimisation (and therefore doesn't get the
inlined version).

21 years ago[project @ 2002-12-19 14:23:35 by simonmar]
simonmar [Thu, 19 Dec 2002 14:23:35 +0000 (14:23 +0000)]
[project @ 2002-12-19 14:23:35 by simonmar]
comment wibble

21 years ago[project @ 2002-12-19 12:49:27 by simonmar]
simonmar [Thu, 19 Dec 2002 12:49:27 +0000 (12:49 +0000)]
[project @ 2002-12-19 12:49:27 by simonmar]
Make this compile again

21 years ago[project @ 2002-12-19 12:24:49 by simonmar]
simonmar [Thu, 19 Dec 2002 12:24:49 +0000 (12:24 +0000)]
[project @ 2002-12-19 12:24:49 by simonmar]
Freshly generated by autoheader.

21 years ago[project @ 2002-12-19 12:21:36 by simonmar]
simonmar [Thu, 19 Dec 2002 12:21:36 +0000 (12:21 +0000)]
[project @ 2002-12-19 12:21:36 by simonmar]
Using AC_CHECK_FUNCS rather than AC_CHECK_FUNC seems to allow
autoheader to pick up HAVE_LCHOWN.  Don't know why.

21 years ago[project @ 2002-12-19 12:06:41 by simonmar]
simonmar [Thu, 19 Dec 2002 12:06:41 +0000 (12:06 +0000)]
[project @ 2002-12-19 12:06:41 by simonmar]
- remove unused CODE_BEFORE_DATA
- remove duplicate symbols
- kill extra whitespace
- add missing HAVE_FRAMEWORK_HASKELLSUPPORT and HAVE_IN_ADDR_T

21 years ago[project @ 2002-12-19 11:28:58 by simonmar]
simonmar [Thu, 19 Dec 2002 11:28:58 +0000 (11:28 +0000)]
[project @ 2002-12-19 11:28:58 by simonmar]
Avoid using a variable for the first argument of AC_DEFINE_UNQUOTED,
because autoheader doesn't like it.