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

22 years ago[project @ 2002-02-28 18:45:51 by sof]
sof [Thu, 28 Feb 2002 18:45:51 +0000 (18:45 +0000)]
[project @ 2002-02-28 18:45:51 by sof]
make sure stdout is flushed; unused arg wibble

22 years ago[project @ 2002-02-28 18:44:28 by sof]
sof [Thu, 28 Feb 2002 18:44:29 +0000 (18:44 +0000)]
[project @ 2002-02-28 18:44:28 by sof]
myThreadIdzh_fast: used bogus return convention

22 years ago[project @ 2002-02-28 16:25:15 by sof]
sof [Thu, 28 Feb 2002 16:25:15 +0000 (16:25 +0000)]
[project @ 2002-02-28 16:25:15 by sof]
Huh? Surely stg_block_{take,put}mvar ought to be pushing info pointers and not direct return addresses

22 years ago[project @ 2002-02-28 12:17:19 by simonpj]
simonpj [Thu, 28 Feb 2002 12:17:22 +0000 (12:17 +0000)]
[project @ 2002-02-28 12:17:19 by simonpj]
---------------------------------
Fix a rather obscure bug in tcGen
---------------------------------

This bug concerns deciding when a type variable "escapes",
and hence we can't generalise it.  Our new subsumption-checking
machinery for higher-ranked types requires a slightly
more general approach than I had before.  The main excitement
is in TcUnify.checkSigTyVars and its friends.

As usual, I moved functions around and cleaned things up a bit;
hence the multi-module commit.

22 years ago[project @ 2002-02-28 10:15:47 by simonmar]
simonmar [Thu, 28 Feb 2002 10:15:47 +0000 (10:15 +0000)]
[project @ 2002-02-28 10:15:47 by simonmar]
module names are allowed to contain '.' these days.

22 years ago[project @ 2002-02-28 08:53:58 by sof]
sof [Thu, 28 Feb 2002 08:53:58 +0000 (08:53 +0000)]
[project @ 2002-02-28 08:53:58 by sof]
- gcdIntzh_fast, cmpIntegerIntzh_fast, cmpIntegerzh_fast,
  integer2Intzh_fast, and integer2Wordzh_fast all used the
  unboxed tuple return convention, which isn't quite right
  since they're just returning unboxed values. Fixed.

- similarly for forkzh_fast, it was using an unboxed value
  return convention, ought to be doing an unboxed tuple
  return.

Both of these broke the unregisterised build -- it still not
sane, more debugging to be done.

22 years ago[project @ 2002-02-28 08:53:13 by sof]
sof [Thu, 28 Feb 2002 08:53:13 +0000 (08:53 +0000)]
[project @ 2002-02-28 08:53:13 by sof]
typo

22 years ago[project @ 2002-02-27 16:29:48 by simonmar]
simonmar [Wed, 27 Feb 2002 16:29:48 +0000 (16:29 +0000)]
[project @ 2002-02-27 16:29:48 by simonmar]
Escape space characters in filenames in the Makefile generated by ghc -M.

22 years ago[project @ 2002-02-27 16:24:00 by simonmar]
simonmar [Wed, 27 Feb 2002 16:24:00 +0000 (16:24 +0000)]
[project @ 2002-02-27 16:24:00 by simonmar]
Escape space characters in filenames in the Makefile generated from ghc -M.

22 years ago[project @ 2002-02-27 15:53:46 by simonpj]
simonpj [Wed, 27 Feb 2002 15:53:46 +0000 (15:53 +0000)]
[project @ 2002-02-27 15:53:46 by simonpj]
comments

22 years ago[project @ 2002-02-27 15:16:53 by simonmar]
simonmar [Wed, 27 Feb 2002 15:16:53 +0000 (15:16 +0000)]
[project @ 2002-02-27 15:16:53 by simonmar]
When searching for files with multiple extensions in multiple paths,
search each path for all the possible files, rather than the other way
around.  Otherwise, a .hs file later in the path may override a .lhs
file earlier in the path, and similar strange things happen with
mkdependHS.

Reported-by: Duncan Coutts <duncan.coutts@worcester.oxford.ac.uk>

MERGE TO STABLE

22 years ago[project @ 2002-02-27 13:59:57 by sewardj]
sewardj [Wed, 27 Feb 2002 13:59:57 +0000 (13:59 +0000)]
[project @ 2002-02-27 13:59:57 by sewardj]
Add notes about OS-thread-safety in f-x-{static,dynamic}, or more
precisely, the current lack thereof.

22 years ago[project @ 2002-02-27 13:37:02 by sewardj]
sewardj [Wed, 27 Feb 2002 13:37:03 +0000 (13:37 +0000)]
[project @ 2002-02-27 13:37:02 by sewardj]
Complete changes to f-x-dynamic.  This brings it into line with what
is described in ghc/docs/comm/the-beast/fexport.html.

22 years ago[project @ 2002-02-27 12:46:25 by sewardj]
sewardj [Wed, 27 Feb 2002 12:46:25 +0000 (12:46 +0000)]
[project @ 2002-02-27 12:46:25 by sewardj]
Add description of how f-x-{static,dynamic} are implemented.

22 years ago[project @ 2002-02-27 11:18:30 by simonmar]
simonmar [Wed, 27 Feb 2002 11:18:30 +0000 (11:18 +0000)]
[project @ 2002-02-27 11:18:30 by simonmar]
add libraries to BinDistDirs

22 years ago[project @ 2002-02-27 11:01:22 by sewardj]
sewardj [Wed, 27 Feb 2002 11:01:22 +0000 (11:01 +0000)]
[project @ 2002-02-27 11:01:22 by sewardj]
Change a couple of erroneous <code> to </code>.

22 years ago[project @ 2002-02-27 10:26:13 by simonmar]
simonmar [Wed, 27 Feb 2002 10:29:12 +0000 (10:29 +0000)]
[project @ 2002-02-27 10:26:13 by simonmar]
Expand on the behaviour of fromIntegral a bit.

22 years ago[project @ 2002-02-26 19:18:00 by sof]
sof [Tue, 26 Feb 2002 19:18:00 +0000 (19:18 +0000)]
[project @ 2002-02-26 19:18:00 by sof]
stg_gc_unbx_r1: fixed what was surely a typo in the 06/07/01
commit which instead of pushing an info pointer, started
pushing the entry code (stg_gc_unbx_r1_ret).

Unbreaks the mini-interpreter.

22 years ago[project @ 2002-02-26 14:56:43 by sof]
sof [Tue, 26 Feb 2002 14:56:43 +0000 (14:56 +0000)]
[project @ 2002-02-26 14:56:43 by sof]
comment wibble

22 years ago[project @ 2002-02-26 12:52:58 by sewardj]
sewardj [Tue, 26 Feb 2002 12:52:58 +0000 (12:52 +0000)]
[project @ 2002-02-26 12:52:58 by sewardj]
Fix sparc borkage.

22 years ago[project @ 2002-02-26 12:15:11 by simonmar]
simonmar [Tue, 26 Feb 2002 12:15:11 +0000 (12:15 +0000)]
[project @ 2002-02-26 12:15:11 by simonmar]
Mention that you can say 'make way=foo' to build a particular way only
in the current directory.

Clean up some markup, and fix a markup error at the same time.

22 years ago[project @ 2002-02-26 05:03:27 by sof]
sof [Tue, 26 Feb 2002 05:03:27 +0000 (05:03 +0000)]
[project @ 2002-02-26 05:03:27 by sof]
INFO_VECTOR (MINIINTERPRETER case): gcc-2.96 doesn't
like a mixture of labelled and non-labelled members
in a struct initializer, which is reasonable. So,
be explicit that we're initializing the 'vector' member.

I'd be surprised if this change causes breakage with earlier
GCCen.

A comment next to INFO_VECTOR as to why it has to be empty
in the non-MINIINTERPRETER case, would be nice.

22 years ago[project @ 2002-02-25 20:05:27 by sof]
sof [Mon, 25 Feb 2002 20:05:27 +0000 (20:05 +0000)]
[project @ 2002-02-25 20:05:27 by sof]
At the behest of Management, update some e-mail addresses

22 years ago[project @ 2002-02-25 16:54:07 by simonpj]
simonpj [Mon, 25 Feb 2002 16:54:07 +0000 (16:54 +0000)]
[project @ 2002-02-25 16:54:07 by simonpj]
wibbles

22 years ago[project @ 2002-02-25 16:49:22 by simonpj]
simonpj [Mon, 25 Feb 2002 16:49:22 +0000 (16:49 +0000)]
[project @ 2002-02-25 16:49:22 by simonpj]
add win32 info

22 years ago[project @ 2002-02-22 22:20:25 by panne]
panne [Fri, 22 Feb 2002 22:20:25 +0000 (22:20 +0000)]
[project @ 2002-02-22 22:20:25 by panne]
Include stub objects in HSfoo.o, too

22 years ago[project @ 2002-02-22 21:45:25 by panne]
panne [Fri, 22 Feb 2002 21:45:25 +0000 (21:45 +0000)]
[project @ 2002-02-22 21:45:25 by panne]
Sepll chceking onyl...

22 years ago[project @ 2002-02-22 21:40:38 by panne]
panne [Fri, 22 Feb 2002 21:40:38 +0000 (21:40 +0000)]
[project @ 2002-02-22 21:40:38 by panne]
To get references right, re-run LaTeX twice after BibTeX

22 years ago[project @ 2002-02-22 21:34:31 by panne]
panne [Fri, 22 Feb 2002 21:34:31 +0000 (21:34 +0000)]
[project @ 2002-02-22 21:34:31 by panne]
Avoid re-generating primops.txt

22 years ago[project @ 2002-02-21 14:42:17 by sewardj] Approximately_9120_patches
sewardj [Thu, 21 Feb 2002 14:42:17 +0000 (14:42 +0000)]
[project @ 2002-02-21 14:42:17 by sewardj]
In DsForeign.fexportEntry, track recent changes to f-x-dynamic
implementation.  At the same time completely rewrite this fn, since I
couldn't figure out how the previous incarnation worked.

22 years ago[project @ 2002-02-19 11:04:37 by keithw]
keithw [Tue, 19 Feb 2002 11:04:37 +0000 (11:04 +0000)]
[project @ 2002-02-19 11:04:37 by keithw]
Some thoughts on `what happens when'.

22 years ago[project @ 2002-02-18 17:27:24 by sof]
sof [Mon, 18 Feb 2002 17:27:24 +0000 (17:27 +0000)]
[project @ 2002-02-18 17:27:24 by sof]
unused arg wibble

22 years ago[project @ 2002-02-18 17:26:48 by sof]
sof [Mon, 18 Feb 2002 17:26:48 +0000 (17:26 +0000)]
[project @ 2002-02-18 17:26:48 by sof]
If necessary, define THREADED_RTS and DEBUG when gen'ing rts.conf

22 years ago[project @ 2002-02-18 16:28:39 by sof]
sof [Mon, 18 Feb 2002 16:28:39 +0000 (16:28 +0000)]
[project @ 2002-02-18 16:28:39 by sof]
Filter out _stub.c gubbins from C_SRCS

22 years ago[project @ 2002-02-18 16:27:24 by sof]
sof [Mon, 18 Feb 2002 16:27:24 +0000 (16:27 +0000)]
[project @ 2002-02-18 16:27:24 by sof]
remove STUBOBJS as an (explicit) dependency to LIBRARY (+comment as to why)

22 years ago[project @ 2002-02-18 15:51:28 by sewardj]
sewardj [Mon, 18 Feb 2002 15:51:28 +0000 (15:51 +0000)]
[project @ 2002-02-18 15:51:28 by sewardj]
Fix import wibble

22 years ago[project @ 2002-02-18 13:26:12 by sof]
sof [Mon, 18 Feb 2002 13:26:13 +0000 (13:26 +0000)]
[project @ 2002-02-18 13:26:12 by sof]
Be clear about the lock assumptions of GarbageCollect(); it
is now required to hold sched_mutex.

The real reason for adding this requirement is so that when
prior to scheduling finalizers and doing thread resurrection,
GarbageCollect() may set the lock status of sched_mutex to
the state expected by scheduleFinalizers() and resurrectThreads()
(i.e., unlocked).

Note: this is only an issue with pthreads. In the Win32 threading
model, it's a NOP for a thread to grab a mutex it already holds.

22 years ago[project @ 2002-02-18 12:41:01 by sewardj]
sewardj [Mon, 18 Feb 2002 12:41:03 +0000 (12:41 +0000)]
[project @ 2002-02-18 12:41:01 by sewardj]
Make foreign export dynamic work in GHCi.  Main changes:

* Allow literal labels to propagate through the bytecode generator
  and eventually be linked by the runtime linker.

* Minor mods to driver plumbing so that GHCi produces the relevant
  *_stub.[ch] files, compiles them with gcc, and loads the resulting .o's

* Dereference the stable pointer in the generated C stub, rather
  than passing it to a Haskell-world helper.  This seems simpler and
  removes the need to have a H-world helper, which in turn means the
  stub .o doesn't refer to any H-world entities.  This is important
  because our linker can't deal with mutual recursion between
  BCOs and loaded objects.

Still ToDo:

* Make it thread/GC safe.  (Sigbjorn?)

* Get rid of the bits of code in DsForeign which generate the
  Haskell helper.  I had a go but it wasn't obvious how to do it,
  so have deferred.

22 years ago[project @ 2002-02-17 20:22:38 by panne]
panne [Sun, 17 Feb 2002 20:22:38 +0000 (20:22 +0000)]
[project @ 2002-02-17 20:22:38 by panne]
Yet another config syntax error...

22 years ago[project @ 2002-02-17 18:38:07 by panne]
panne [Sun, 17 Feb 2002 18:38:07 +0000 (18:38 +0000)]
[project @ 2002-02-17 18:38:07 by panne]
One #define to rule them all: Use INSTALLING, not INSTALLED for the
generation of the "real" package.conf

22 years ago[project @ 2002-02-17 17:41:44 by panne]
panne [Sun, 17 Feb 2002 17:41:44 +0000 (17:41 +0000)]
[project @ 2002-02-17 17:41:44 by panne]
Installing HS*_cbits.o and libHS*_cbits.a might not be such a bad idea
after all... :-}

22 years ago[project @ 2002-02-17 14:03:10 by panne]
panne [Sun, 17 Feb 2002 14:03:10 +0000 (14:03 +0000)]
[project @ 2002-02-17 14:03:10 by panne]
Automagically determine the flags for compiling/linking OpenGL
programs at configuration time, and stuff the relevant info into
OpenGL's package configuration file. This still mixes up compilation
time vs. installation time, but it's much better than hardcoded flags.

22 years ago[project @ 2002-02-17 13:56:35 by panne]
panne [Sun, 17 Feb 2002 13:56:35 +0000 (13:56 +0000)]
[project @ 2002-02-17 13:56:35 by panne]
Conforming to the OpenGL ABI, try a plain (non-Mesa) OpenGL first as
the default

22 years ago[project @ 2002-02-17 13:46:39 by panne]
panne [Sun, 17 Feb 2002 13:46:39 +0000 (13:46 +0000)]
[project @ 2002-02-17 13:46:39 by panne]
Guard against empty ALL_DIRS

22 years ago[project @ 2002-02-17 13:02:44 by panne]
panne [Sun, 17 Feb 2002 13:02:44 +0000 (13:02 +0000)]
[project @ 2002-02-17 13:02:44 by panne]
Fixed TeX quoting

22 years ago[project @ 2002-02-17 08:48:23 by panne]
panne [Sun, 17 Feb 2002 08:48:25 +0000 (08:48 +0000)]
[project @ 2002-02-17 08:48:23 by panne]
Ooops, forgot to commit yesterday's quoting fix for db2dvi to the
other db2FOO stuff...

22 years ago[project @ 2002-02-17 06:52:10 by chak]
chak [Sun, 17 Feb 2002 06:52:10 +0000 (06:52 +0000)]
[project @ 2002-02-17 06:52:10 by chak]
wibble

22 years ago[project @ 2002-02-16 19:39:51 by sof]
sof [Sat, 16 Feb 2002 19:39:51 +0000 (19:39 +0000)]
[project @ 2002-02-16 19:39:51 by sof]
Use Foreign.free instead of destructArray (which seem to have disappeared)

22 years ago[project @ 2002-02-16 18:15:14 by sof]
sof [Sat, 16 Feb 2002 18:15:14 +0000 (18:15 +0000)]
[project @ 2002-02-16 18:15:14 by sof]
getPackageLibraries: replace some rather fragile string prefix matching
code that broke when "HSstd" got renamed to "HSbase".

22 years ago[project @ 2002-02-16 17:07:07 by panne]
panne [Sat, 16 Feb 2002 17:07:07 +0000 (17:07 +0000)]
[project @ 2002-02-16 17:07:07 by panne]
Welcome to the amazing world of shell syntax! :-) The line

  CATALOG_OPTION=-c $DOCBOOK_CATALOG

sets the environment variable CATALOG_OPTION to "-c" and executes
$DOCBOOK_CATALOG, which is probably not what was intended. Double
quotes to the rescue!

22 years ago[project @ 2002-02-16 00:30:05 by sof]
sof [Sat, 16 Feb 2002 00:30:05 +0000 (00:30 +0000)]
[project @ 2002-02-16 00:30:05 by sof]
release sched_mutex lock while GCing

22 years ago[project @ 2002-02-15 22:14:27 by sof]
sof [Fri, 15 Feb 2002 22:15:09 +0000 (22:15 +0000)]
[project @ 2002-02-15 22:14:27 by sof]
Extra arg to suspendThread() and resumeThread(); controls whether an external call is concurrent or not

22 years ago[project @ 2002-02-15 22:13:32 by sof]
sof [Fri, 15 Feb 2002 22:13:33 +0000 (22:13 +0000)]
[project @ 2002-02-15 22:13:32 by sof]
New call attribute on foreign imports, threadsafe.

It indicates that a foreign import can(*) safely be called
concurrently with the continued evaluation of other Haskell
threads, i.e., when the foreign call is made by a Haskell
thread, it won't hinder the progress of other threads.

(*) - if the platform and RTS supports it, it _will be_
invoked concurrently.

22 years ago[project @ 2002-02-15 21:07:19 by sof]
sof [Fri, 15 Feb 2002 21:07:20 +0000 (21:07 +0000)]
[project @ 2002-02-15 21:07:19 by sof]
comments only

22 years ago[project @ 2002-02-15 21:06:29 by sof]
sof [Fri, 15 Feb 2002 21:06:29 +0000 (21:06 +0000)]
[project @ 2002-02-15 21:06:29 by sof]
fix bug which caused 'safe' to be identical to 'unsafe' in an FFI decl.

22 years ago[project @ 2002-02-15 20:58:14 by sof]
sof [Fri, 15 Feb 2002 20:58:14 +0000 (20:58 +0000)]
[project @ 2002-02-15 20:58:14 by sof]
suspendThread() comment

22 years ago[project @ 2002-02-15 17:49:23 by sof]
sof [Fri, 15 Feb 2002 17:49:23 +0000 (17:49 +0000)]
[project @ 2002-02-15 17:49:23 by sof]
unbreak prev. commit

22 years ago[project @ 2002-02-15 14:53:32 by simonmar]
simonmar [Fri, 15 Feb 2002 14:53:32 +0000 (14:53 +0000)]
[project @ 2002-02-15 14:53:32 by simonmar]
Ensure that async exceptions are blocked during the raising of an
async exception - we're about to block them anyway on entry to the
handler, but we don't want any further exceptions being raised in the
meantime.

22 years ago[project @ 2002-02-15 14:49:08 by simonmar]
simonmar [Fri, 15 Feb 2002 14:49:08 +0000 (14:49 +0000)]
[project @ 2002-02-15 14:49:08 by simonmar]
Fix bugs in async exception raising: instead of trying to build an
application of the exception handler to the exception directly, just
leave a THUNK(raise,exception) on top of the CATCH_FRAME ready to
trigger the next time this thread is run.

This avoids two problems: the PAP we were using before wasn't really a
PAP, which broke some assumptions elsewhere (c.f. PAP_ENTRY:
CATCH_FRAME failure), and there was also some duplication between
raiseAsync and raisezh_fast due to the fact that we were attempting to
do the raising directly.

22 years ago[project @ 2002-02-15 12:29:46 by sewardj]
sewardj [Fri, 15 Feb 2002 12:29:46 +0000 (12:29 +0000)]
[project @ 2002-02-15 12:29:46 by sewardj]
For f-x-dynamic, x86, ccall: rename "a_" to "original_return_addr" so
that the next luzer to look at this stuff doesn't have to spend hours
figuring out what the hell "a_" is for.

22 years ago[project @ 2002-02-15 09:46:15 by simonmar]
simonmar [Fri, 15 Feb 2002 09:46:15 +0000 (09:46 +0000)]
[project @ 2002-02-15 09:46:15 by simonmar]
Fix typo

22 years ago[project @ 2002-02-15 09:32:47 by simonpj]
simonpj [Fri, 15 Feb 2002 09:32:47 +0000 (09:32 +0000)]
[project @ 2002-02-15 09:32:47 by simonpj]
Comments only

22 years ago[project @ 2002-02-15 09:32:18 by simonpj]
simonpj [Fri, 15 Feb 2002 09:32:18 +0000 (09:32 +0000)]
[project @ 2002-02-15 09:32:18 by simonpj]
-------------------------------------------------
Fix an interesting case-alternatives filtering bug
-------------------------------------------------

This bug, shown up by Krasimir's ObjectIO suite, caused the
simplifier to encounter a case expression like
case x of { x:xs -> True; [] -> False }
in a context where x could not possibly be either a (:) or []!
Case expressions in the enclosing scope dealt with it...
So the alternative-filtering removed all the alternatives, leaving
a case expression with no branches, which GHC didn't like one little
bit.

The actual bug was elsewhere; it was because we should sometimes
filter out the DEFAULT alternative, and we weren't doing that.
To fix it, I pulled the alternative-filtering code out of Simplify
and put it in SimplUtils.prepareAlts.  It's nice now.

22 years ago[project @ 2002-02-15 08:11:42 by sof]
sof [Fri, 15 Feb 2002 08:11:42 +0000 (08:11 +0000)]
[project @ 2002-02-15 08:11:42 by sof]
drop -mwin32 filtering

22 years ago[project @ 2002-02-15 08:10:44 by sof]
sof [Fri, 15 Feb 2002 08:10:44 +0000 (08:10 +0000)]
[project @ 2002-02-15 08:10:44 by sof]
mingw: drop the use of -mwin32 in CC_OPTS; no longer needed

22 years ago[project @ 2002-02-15 07:50:36 by sof]
sof [Fri, 15 Feb 2002 07:50:37 +0000 (07:50 +0000)]
[project @ 2002-02-15 07:50:36 by sof]
Tighten up the Scheduler synchronisation story some more:

- moved thread_ready_cond + the counter rts_n_waiting_tasks
  to Capability.c, leaving only sched_mutex as a synchro
  variable in Scheduler (the less stuff that inhabit
  Schedule.c, the better, methinks.)
- upon entry to the Scheduler, a worker thread will now call
  Capability.yieldToReturningWorker() to check whether it
  needs to give up its capability.
- Worker threads that are either idle or lack a capability,
  will now call Capability.waitForWorkCapability() and block.

22 years ago[project @ 2002-02-15 07:40:10 by sof]
sof [Fri, 15 Feb 2002 07:40:10 +0000 (07:40 +0000)]
[project @ 2002-02-15 07:40:10 by sof]
Use scheduleExtThread() (see 20020214 commit msg for SchedAPI.h for details)

22 years ago[project @ 2002-02-15 07:38:45 by sof]
sof [Fri, 15 Feb 2002 07:38:45 +0000 (07:38 +0000)]
[project @ 2002-02-15 07:38:45 by sof]
wibble

22 years ago[project @ 2002-02-15 07:37:55 by sof]
sof [Fri, 15 Feb 2002 07:37:55 +0000 (07:37 +0000)]
[project @ 2002-02-15 07:37:55 by sof]
Distinguish between the scheduling of a new thread from within
the RTS (e.g., via forkIO, running finalizers etc) and scheduling
of a thread that's created via the RtsAPI -- the latter
now uses scheduleExtThread(), the rest scheduleThread().

Why the distinction? Because the former will in threaded builds create
a worker OS thread, while the latter won't. (There's an added
wrinkle -- main() will also use scheduleThread()).

22 years ago[project @ 2002-02-15 07:23:02 by sof]
sof [Fri, 15 Feb 2002 07:23:02 +0000 (07:23 +0000)]
[project @ 2002-02-15 07:23:02 by sof]
Add rts_mainEvalIO proto

22 years ago[project @ 2002-02-14 18:20:37 by sof]
sof [Thu, 14 Feb 2002 18:20:37 +0000 (18:20 +0000)]
[project @ 2002-02-14 18:20:37 by sof]
more comments

22 years ago[project @ 2002-02-14 17:21:50 by sof]
sof [Thu, 14 Feb 2002 17:21:50 +0000 (17:21 +0000)]
[project @ 2002-02-14 17:21:50 by sof]
widen the scope of is_heap_alloced() proto; for all mingw builds

22 years ago[project @ 2002-02-14 17:17:08 by sof]
sof [Thu, 14 Feb 2002 17:17:08 +0000 (17:17 +0000)]
[project @ 2002-02-14 17:17:08 by sof]
COMPILING_RTS wasn't being fed to the C compiler. It is arguably a
bug/feature deficiency of GHC not to do the Right Thing for invocations
such as these:

   ghc -c -DFOO foo.c

i.e., pass -DFOO to the C compiler -- currently, you have to be explicit
about this, -optc-DFOO

22 years ago[project @ 2002-02-14 16:58:13 by sof]
sof [Thu, 14 Feb 2002 16:58:13 +0000 (16:58 +0000)]
[project @ 2002-02-14 16:58:13 by sof]
as per simonpj request, add mingw protos to avoid -Wmissing-declarations warnings

22 years ago[project @ 2002-02-14 16:55:07 by sof]
sof [Thu, 14 Feb 2002 16:55:07 +0000 (16:55 +0000)]
[project @ 2002-02-14 16:55:07 by sof]
resetNonBlockingFd, setNonBlockingFd: mingw tidyup

22 years ago[project @ 2002-02-14 16:24:59 by sof]
sof [Thu, 14 Feb 2002 16:24:59 +0000 (16:24 +0000)]
[project @ 2002-02-14 16:24:59 by sof]
extsBitmap handling: avoid using Int instance for Bits (may not be there; cf. 4.08), use Int32 instead

22 years ago[project @ 2002-02-14 15:51:30 by simonmar]
simonmar [Thu, 14 Feb 2002 15:51:30 +0000 (15:51 +0000)]
[project @ 2002-02-14 15:51:30 by simonmar]
oops, got the sense of an ifdef round the wrong way.

22 years ago[project @ 2002-02-14 15:14:00 by simonmar]
simonmar [Thu, 14 Feb 2002 15:14:02 +0000 (15:14 +0000)]
[project @ 2002-02-14 15:14:00 by simonmar]
Fixes to 'make install' in fptools/libraries.  We have to maintain the
directory structure when installing the .hi files, rather than just
dumping them in a single directory as we do for packages in
fptools/hslibs.