ghc-hetmet.git
16 years agoAdd a --ignore-failure flag to push-all script
Ian Lynagh [Thu, 2 Aug 2007 21:33:00 +0000 (21:33 +0000)]
Add a --ignore-failure flag to push-all script

16 years agoDump renamer output with -ddump-rn for command-line entry in ghci
simonpj@microsoft.com [Thu, 2 Aug 2007 16:51:10 +0000 (16:51 +0000)]
Dump renamer output with -ddump-rn for command-line entry in ghci

16 years agoFix Trac #1525
simonpj@microsoft.com [Thu, 2 Aug 2007 11:12:04 +0000 (11:12 +0000)]
Fix Trac #1525

A Name used to have a Parent, but no longer has.  When we want to
print info about data type T and data constructor MkT, the info about
T already describes MkT so we want to discard the latter.  Now that
Names don't have a Parent, we must do that in a different way,
using implicitTyThings

Test is ghci011

16 years agoWibbble to last fix to generalisation (again!); fixes Trac #1575
simonpj@microsoft.com [Thu, 2 Aug 2007 08:51:36 +0000 (08:51 +0000)]
Wibbble to last fix to generalisation (again!); fixes Trac #1575

16 years agoSmall error-message change
simonpj@microsoft.com [Wed, 1 Aug 2007 14:13:39 +0000 (14:13 +0000)]
Small error-message change

16 years agoVectorise DataCon workers
Roman Leshchinskiy [Thu, 2 Aug 2007 04:37:12 +0000 (04:37 +0000)]
Vectorise DataCon workers

16 years agoInclude original tycon in PAInstance
Roman Leshchinskiy [Thu, 2 Aug 2007 04:29:38 +0000 (04:29 +0000)]
Include original tycon in PAInstance

16 years agoMore refactoring
Roman Leshchinskiy [Thu, 2 Aug 2007 02:28:59 +0000 (02:28 +0000)]
More refactoring

16 years agoRefactoring
Roman Leshchinskiy [Thu, 2 Aug 2007 02:28:40 +0000 (02:28 +0000)]
Refactoring

16 years agoThread lifting context implicitly in the vectorisation monad
Roman Leshchinskiy [Thu, 2 Aug 2007 02:25:03 +0000 (02:25 +0000)]
Thread lifting context implicitly in the vectorisation monad

16 years agoFix calls to replicatePA
Roman Leshchinskiy [Wed, 1 Aug 2007 04:56:56 +0000 (04:56 +0000)]
Fix calls to replicatePA

16 years agoTrace vectorisation failures
Roman Leshchinskiy [Wed, 1 Aug 2007 04:56:40 +0000 (04:56 +0000)]
Trace vectorisation failures

16 years agoReuse the lifting context Var
Roman Leshchinskiy [Wed, 1 Aug 2007 04:24:41 +0000 (04:24 +0000)]
Reuse the lifting context Var

16 years agoMove code
Roman Leshchinskiy [Wed, 1 Aug 2007 04:24:04 +0000 (04:24 +0000)]
Move code

16 years agoNicer names for hoisted functions
Roman Leshchinskiy [Wed, 1 Aug 2007 04:13:22 +0000 (04:13 +0000)]
Nicer names for hoisted functions

16 years agoImprove closure generation for functions with multiple parameters
Roman Leshchinskiy [Wed, 1 Aug 2007 03:41:19 +0000 (03:41 +0000)]
Improve closure generation for functions with multiple parameters

16 years agoRename functions
Roman Leshchinskiy [Wed, 1 Aug 2007 01:40:56 +0000 (01:40 +0000)]
Rename functions

16 years agoUse new closure generation code in vectorisation
Roman Leshchinskiy [Wed, 1 Aug 2007 01:37:28 +0000 (01:37 +0000)]
Use new closure generation code in vectorisation

16 years agoMore vectorisation-related smart constructors
Roman Leshchinskiy [Tue, 31 Jul 2007 06:50:24 +0000 (06:50 +0000)]
More vectorisation-related smart constructors

16 years agoUse VectCore stuff in vectorisation
Roman Leshchinskiy [Tue, 31 Jul 2007 06:34:48 +0000 (06:34 +0000)]
Use VectCore stuff in vectorisation

16 years agoMove vectorisation-related smart constructors into a separate module
Roman Leshchinskiy [Tue, 31 Jul 2007 06:27:11 +0000 (06:27 +0000)]
Move vectorisation-related smart constructors into a separate module

16 years agoUse a Var instead of a CoreExpr as the lifting context during vectorisation
Roman Leshchinskiy [Tue, 31 Jul 2007 06:16:10 +0000 (06:16 +0000)]
Use a Var instead of a CoreExpr as the lifting context during vectorisation

16 years agoSimplify handling of variables during vectorisation
Roman Leshchinskiy [Tue, 31 Jul 2007 06:09:17 +0000 (06:09 +0000)]
Simplify handling of variables during vectorisation

16 years agoSimplify closure generation code
Roman Leshchinskiy [Tue, 31 Jul 2007 05:54:19 +0000 (05:54 +0000)]
Simplify closure generation code

16 years agoNew closure generation code
Roman Leshchinskiy [Tue, 31 Jul 2007 04:40:29 +0000 (04:40 +0000)]
New closure generation code

16 years agoRefactoring
Roman Leshchinskiy [Tue, 31 Jul 2007 04:06:21 +0000 (04:06 +0000)]
Refactoring

16 years agoOptimise parallel arrays of products
Roman Leshchinskiy [Thu, 26 Jul 2007 07:13:08 +0000 (07:13 +0000)]
Optimise parallel arrays of products

16 years agoFIX recent PPC crashes introduced by the pointer-tagging patch (I hope)
Simon Marlow [Wed, 1 Aug 2007 14:02:31 +0000 (14:02 +0000)]
FIX recent PPC crashes introduced by the pointer-tagging patch (I hope)
There was an accidental endian-dependency in changes related to RET_FUN.
The changes in question weren't strictly necessary - they were left
over from the original workaround for the compacting GC problems, so
I've just reverted those changes in this patch, which should hopefully
fix the PPC problems.

16 years agorevert accidental modification of version number
Simon Marlow [Wed, 1 Aug 2007 13:39:38 +0000 (13:39 +0000)]
revert accidental modification of version number

16 years agoFix a knot-tying bug with ghc --make
simonpj@microsoft.com [Wed, 1 Aug 2007 12:49:07 +0000 (12:49 +0000)]
Fix a knot-tying bug with ghc --make

This bug showed up when I touched Data.Generics.Schemes, and then said
make build.library.base
This compiles the base library with --make, and I got an assertion failure
in TcIface.  The explanation is in Note [Tying the knot] in TcIface.

As well as fixing the bug, I also impoved the assertion message.

This might fix or improve other knot-tying problems with --make

16 years agoSpelling error
simonpj@microsoft.com [Wed, 1 Aug 2007 12:48:52 +0000 (12:48 +0000)]
Spelling error

16 years agoClarify comments
simonpj@microsoft.com [Fri, 6 Jul 2007 09:48:36 +0000 (09:48 +0000)]
Clarify comments

16 years agoFix generalisation during type inference (again); fixes Trac #1564
simonpj@microsoft.com [Wed, 1 Aug 2007 07:26:12 +0000 (07:26 +0000)]
Fix generalisation during type inference (again); fixes Trac #1564

Figuring out which type variables to generalise when inferring the type
of a let-bound function is always trickier than I think!  This patch
fixes a bug (related, inevitably, to functional depenencies) found by
iampure, Trac #1564.  I'll add a test shortly.

16 years agoOnly add -rpath to linker invocation when -dynamic
Clemens Fruhwirth [Wed, 1 Aug 2007 09:24:29 +0000 (09:24 +0000)]
Only add -rpath to linker invocation when -dynamic

16 years agofix the hardtop test for ghc-6.2.x, and make it notice failure earlier
Simon Marlow [Wed, 1 Aug 2007 08:32:57 +0000 (08:32 +0000)]
fix the hardtop test for ghc-6.2.x, and make it notice failure earlier

16 years agocompile the -inplace programs using $(HC), not $(GHC)
Simon Marlow [Tue, 31 Jul 2007 11:49:25 +0000 (11:49 +0000)]
compile the -inplace programs using $(HC), not $(GHC)
$(UseStage1) modifies $(HC) rather than $(GHC)

16 years agoMake lndir work on Windows (by copying)
Ian Lynagh [Mon, 30 Jul 2007 22:31:52 +0000 (22:31 +0000)]
Make lndir work on Windows (by copying)

16 years agoMake lndir whitespace consistent
Ian Lynagh [Mon, 30 Jul 2007 19:30:12 +0000 (19:30 +0000)]
Make lndir whitespace consistent

16 years agoSet hardtop_plat to hardtop to find out what, if anything, breaks
Ian Lynagh [Mon, 30 Jul 2007 19:25:13 +0000 (19:25 +0000)]
Set hardtop_plat to hardtop to find out what, if anything, breaks

16 years agoUse our own (Haskell) pwd to find the tree root
Ian Lynagh [Mon, 30 Jul 2007 19:08:08 +0000 (19:08 +0000)]
Use our own (Haskell) pwd to find the tree root

16 years ago#1559 is worked around elsewhere, so validate no longer needs to
Ian Lynagh [Mon, 30 Jul 2007 18:28:06 +0000 (18:28 +0000)]
#1559 is worked around elsewhere, so validate no longer needs to

16 years agoChange the strategy to determine dynamic data access
Clemens Fruhwirth [Tue, 31 Jul 2007 09:59:53 +0000 (09:59 +0000)]
Change the strategy to determine dynamic data access

Instead of attaching the information whether a Label is going to be
accessed dynamically or not (distinction between IdLabel/DynLabel and
additional flags in ModuleInitLabel and PlainModuleInitLabel), we hand
dflags through the CmmOpt monad and the NatM monad. Before calling
labelDynamic in PositionIndependentCode, we extract thisPackage from
dflags and supply the current package to labelDynamic, so it can take
this information into account instead of extracting it from the labels
itself. This simplifies a lot of code in codeGen that just hands
through this_pkg.

16 years agoTranslate dyn in GhcLibWays into --enable-shared for Cabal
Clemens Fruhwirth [Mon, 23 Jul 2007 13:41:24 +0000 (13:41 +0000)]
Translate dyn in GhcLibWays into --enable-shared for Cabal

16 years agoAdd proper header so that cygwin recognizes this file as executable
Clemens Fruhwirth [Sun, 22 Jul 2007 08:20:50 +0000 (08:20 +0000)]
Add proper header so that cygwin recognizes this file as executable

16 years agoAdd hardwire-lib-paths option and make it default for inplace invocations
Clemens Fruhwirth [Tue, 17 Jul 2007 19:26:22 +0000 (19:26 +0000)]
Add hardwire-lib-paths option and make it default for inplace invocations

16 years agoAdd import facility to cmm parser
Clemens Fruhwirth [Fri, 13 Jul 2007 21:08:45 +0000 (21:08 +0000)]
Add import facility to cmm parser

The cmm parser classified all unknown variables as imported. This
behaviour is not changed with this patch. Explicitly imported
variables get a different internal label type, namely ForeignLabel
instead of RtsLabel. In PIC compilation, the NCG creates dynamic
access for ForeignLabel, while RtsLabel are not treated as PIC when
-package rts. Hence, putting explicit imports into cmm files enables
the NCG to distinguish between RTS-external and RTS-internal symbols,
and create the appropriate code.

16 years agoFix the knot-tying in loopDecls to actually do what its comment tells: provide access...
Clemens Fruhwirth [Fri, 13 Jul 2007 21:03:55 +0000 (21:03 +0000)]
Fix the knot-tying in loopDecls to actually do what its comment tells: provide access to global declarations

16 years agowindres to use the gcc given as --with-cc.
Clemens Fruhwirth [Tue, 3 Jul 2007 14:56:53 +0000 (14:56 +0000)]
windres to use the gcc given as --with-cc.

16 years agoChange package name mangling when linking against DSOs
Clemens Fruhwirth [Thu, 28 Jun 2007 10:58:31 +0000 (10:58 +0000)]
Change package name mangling when linking against DSOs

16 years agoAllow access via manually generated SymbolPtrs. Generalize pprImportedSymbol for...
Clemens Fruhwirth [Wed, 20 Jun 2007 14:20:23 +0000 (14:20 +0000)]
Allow access via manually generated SymbolPtrs. Generalize pprImportedSymbol for 64 bit archs.

16 years agoFIX compacting GC (bug1010, and other failures)
Simon Marlow [Mon, 30 Jul 2007 15:39:59 +0000 (15:39 +0000)]
FIX compacting GC (bug1010, and other failures)
Compacting GC interacts badly with the new pointer-tagging feature, as
it also uses the low bits of a pointer to encode some information
during a collection.  My original workaround didn't work, this more
elaborate fix should be better.

16 years agoFIX #1559, #1560. Rearrange the way we do ifBuildable...
Simon Marlow [Mon, 30 Jul 2007 13:43:46 +0000 (13:43 +0000)]
FIX #1559, #1560.  Rearrange the way we do ifBuildable...
ifBuildable now returns an exit code, with 1 indicating an unbuildable
non-core package, and 0 otherwise.  Hence we can now invoke the
recursive make from the shell, sidestepping the problems in #1559 and
#1560.

16 years ago* ghc-asm: Finally did away with $* in a way that works with Perl 5.6~5.10+, by appen...
audreyt@audreyt.org [Mon, 30 Jul 2007 12:22:16 +0000 (12:22 +0000)]
* ghc-asm: Finally did away with $* in a way that works with Perl 5.6~5.10+, by appending /m to all regexes.

16 years agoUse "set -e" in validate, so "sh validate" still has it set
Ian Lynagh [Sun, 29 Jul 2007 13:18:09 +0000 (13:18 +0000)]
Use "set -e" in validate, so "sh validate" still has it set

16 years agoFollow cabal configurations changes
Ian Lynagh [Sun, 29 Jul 2007 11:07:11 +0000 (11:07 +0000)]
Follow cabal configurations changes

16 years agoPointer Tagging
Simon Marlow [Fri, 27 Jul 2007 10:41:57 +0000 (10:41 +0000)]
Pointer Tagging

This patch implements pointer tagging as per our ICFP'07 paper "Faster
laziness using dynamic pointer tagging".  It improves performance by
10-15% for most workloads, including GHC itself.

The original patches were by Alexey Rodriguez Yakushev
<mrchebas@gmail.com>, with additions and improvements by me.  I've
re-recorded the development as a single patch.

The basic idea is this: we use the low 2 bits of a pointer to a heap
object (3 bits on a 64-bit architecture) to encode some information
about the object pointed to.  For a constructor, we encode the "tag"
of the constructor (e.g. True vs. False), for a function closure its
arity.  This enables some decisions to be made without dereferencing
the pointer, which speeds up some common operations.  In particular it
enables us to avoid costly indirect jumps in many cases.

More information in the commentary:

http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/HaskellExecution/PointerTagging

16 years agoFix building the HEAD with itself
Ian Lynagh [Thu, 26 Jul 2007 18:16:22 +0000 (18:16 +0000)]
Fix building the HEAD with itself

16 years agoLink with hpc even if GhcWithInterpreter is not set
Ian Lynagh [Thu, 26 Jul 2007 16:42:01 +0000 (16:42 +0000)]
Link with hpc even if GhcWithInterpreter is not set

16 years agoDocumentation updates for #1177
Simon Marlow [Thu, 26 Jul 2007 09:40:30 +0000 (09:40 +0000)]
Documentation updates for #1177
We now have a section that describes what hs_exit() does (including
the "wait for foreign calls to return" behaviour), and more
documentation on creating libraries of Haskell code.  I also imported
the section "Beware of DllMain()!" from the haskell.org wiki, with
some minor editing.

16 years agoMark PA dictionaries as __inline_me
Roman Leshchinskiy [Thu, 26 Jul 2007 05:30:01 +0000 (05:30 +0000)]
Mark PA dictionaries as __inline_me

16 years agoAdd missing coercion
Roman Leshchinskiy [Thu, 26 Jul 2007 05:28:30 +0000 (05:28 +0000)]
Add missing coercion

16 years agoMake sure DEFAULT always comes first in generated PA dictionaries
Roman Leshchinskiy [Thu, 26 Jul 2007 05:22:39 +0000 (05:22 +0000)]
Make sure DEFAULT always comes first in generated PA dictionaries

16 years agoFix generation of lengthPA
Roman Leshchinskiy [Thu, 26 Jul 2007 05:21:08 +0000 (05:21 +0000)]
Fix generation of lengthPA

16 years agoModify generation of PA dictionaries to match GHC's usual behaviour
Roman Leshchinskiy [Thu, 26 Jul 2007 04:41:01 +0000 (04:41 +0000)]
Modify generation of PA dictionaries to match GHC's usual behaviour

16 years agoUse the right dictionary when calling lengthPA
Roman Leshchinskiy [Thu, 26 Jul 2007 03:12:47 +0000 (03:12 +0000)]
Use the right dictionary when calling lengthPA

16 years agoAutomatically derive PA for vectorised tycons
Roman Leshchinskiy [Thu, 26 Jul 2007 03:12:38 +0000 (03:12 +0000)]
Automatically derive PA for vectorised tycons

16 years agoPA instance generation code (not used yet)
Roman Leshchinskiy [Thu, 26 Jul 2007 02:45:51 +0000 (02:45 +0000)]
PA instance generation code (not used yet)

16 years agoCreate exported names in vectorisation monads
Roman Leshchinskiy [Thu, 26 Jul 2007 02:41:44 +0000 (02:41 +0000)]
Create exported names in vectorisation monads

16 years agoAdd vectorisation-related OccName derivation scheme
Roman Leshchinskiy [Thu, 26 Jul 2007 02:41:11 +0000 (02:41 +0000)]
Add vectorisation-related OccName derivation scheme

16 years agoPA dictionary generation
Roman Leshchinskiy [Wed, 25 Jul 2007 04:12:42 +0000 (04:12 +0000)]
PA dictionary generation

16 years agoMove code
Roman Leshchinskiy [Wed, 25 Jul 2007 03:48:13 +0000 (03:48 +0000)]
Move code

16 years agoGenerate replicatePA
Roman Leshchinskiy [Wed, 25 Jul 2007 03:43:54 +0000 (03:43 +0000)]
Generate replicatePA

16 years agoGenerate lengthPA method
Roman Leshchinskiy [Wed, 25 Jul 2007 03:43:46 +0000 (03:43 +0000)]
Generate lengthPA method

16 years agoUse emptyPA in vectorisation
Roman Leshchinskiy [Wed, 25 Jul 2007 03:35:30 +0000 (03:35 +0000)]
Use emptyPA in vectorisation

16 years agoAdd emptyPA to PrelNames
Roman Leshchinskiy [Wed, 25 Jul 2007 03:02:09 +0000 (03:02 +0000)]
Add emptyPA to PrelNames

16 years agoMore refactoring
Roman Leshchinskiy [Wed, 25 Jul 2007 02:30:17 +0000 (02:30 +0000)]
More refactoring

16 years agoRefactoring
Roman Leshchinskiy [Wed, 25 Jul 2007 02:24:41 +0000 (02:24 +0000)]
Refactoring

16 years agomake validate work on Windows
Simon Marlow [Wed, 25 Jul 2007 13:57:51 +0000 (13:57 +0000)]
make validate work on Windows
This includes automatically adding --build=i386-unknown-mingw32 and
--with-gcc to ./configure, and disabling -j2 (see #1559).

Also: you can now say

  CPUS=3 ./validate

and the script will pass -jN to make (where N = $CPUS + 1).  In the
future, when we fix #1558, it can pass THREADS=N to the testsuite, too.

16 years agoFIX #1177, partially at least.
Simon Marlow [Wed, 25 Jul 2007 13:55:04 +0000 (13:55 +0000)]
FIX #1177, partially at least.
Now we don't wait for outstanding IO requests when shutting down at
program exit time, but we still wait when shutting down a DLL (via
hs_exit()).  There ought to be a better way to do this, but
terminating the threads forcibly is not a good idea (it never is: the
thread might be holding a mutex when it dies, for example).

I plan to add some docs to the user guide to describe how to shut
down a DLL properly.

16 years agohs_exit()/shutdownHaskell(): wait for outstanding foreign calls to complete before...
Simon Marlow [Tue, 24 Jul 2007 15:30:57 +0000 (15:30 +0000)]
hs_exit()/shutdownHaskell(): wait for outstanding foreign calls to complete before returning
This is pertinent to #1177.  When shutting down a DLL, we need to be
sure that there are no OS threads that can return to the code that we
are about to unload, and previously the threaded RTS was unsafe in
this respect.

When exiting a standalone program we don't have to be quite so
paranoid: all the code will disappear at the same time as any running
threads.  Happily exiting a program happens via a different path:
shutdownHaskellAndExit().  If we're about to exit(), then there's no
need to wait for foreign calls to complete.

16 years agoAdd unreg/tables-next-code output to +RTS --info
Ian Lynagh [Mon, 23 Jul 2007 10:01:35 +0000 (10:01 +0000)]
Add unreg/tables-next-code output to +RTS --info

16 years agoAdd a +RTS --info flag print various info; partially fixes trac #1517
Ian Lynagh [Sun, 22 Jul 2007 17:00:42 +0000 (17:00 +0000)]
Add a +RTS --info flag print various info; partially fixes trac #1517

16 years agoFIX #1215: GHC fails to respect the maximal munch rule while lexing "qualified reserv...
Simon Marlow [Tue, 24 Jul 2007 13:04:17 +0000 (13:04 +0000)]
FIX #1215: GHC fails to respect the maximal munch rule while lexing "qualified reservedids"

I didn't actually fix this to respect Haskell 98, instead I changed it
to follow the proposal for Haskell':

http://hackage.haskell.org/cgi-bin/haskell-prime/trac.cgi/wiki/QualifiedIdentifiers

Rationale:

  - We didn't respect Haskell 98 with respect to qualified symbols either
  - The Haskell' change makes things much cleaner
  - Obeying the Haskell 98 spec literally has some unintended
    consequences (e.g. M.where must lex as "M.wher" "e")
  - Any programs that compiled before this change and do not compile
    after it were illegal according to Haskell 98 anyway.

16 years agoFIX #1555: Remove "exp -> pat" production in stmts
Simon Marlow [Mon, 23 Jul 2007 14:10:23 +0000 (14:10 +0000)]
FIX #1555: Remove "exp -> pat" production in stmts
It looks like this was an experiment that accidentally got committed,
somewhere between 6.0 and 6.2.

16 years agoDocument the new -X flags in the flag reference
Ian Lynagh [Sun, 22 Jul 2007 15:19:34 +0000 (15:19 +0000)]
Document the new -X flags in the flag reference

16 years agoCheck for framework failures and unexpected passes in validate
Ian Lynagh [Sun, 22 Jul 2007 13:56:23 +0000 (13:56 +0000)]
Check for framework failures and unexpected passes in validate

16 years agoUse CLEANUP=1 when running the testsuite from validate
Ian Lynagh [Sun, 22 Jul 2007 12:54:31 +0000 (12:54 +0000)]
Use CLEANUP=1 when running the testsuite from validate

16 years agoin hpc-tools, removing the use of %error, to allow happy 1.15 to be used.
andy@galois.com [Sat, 21 Jul 2007 00:06:21 +0000 (00:06 +0000)]
in hpc-tools, removing the use of %error, to allow happy 1.15 to be used.

16 years agohpc-tools: improving flag processing and help messages, small bug fixes.
andy@galois.com [Fri, 20 Jul 2007 23:57:03 +0000 (23:57 +0000)]
hpc-tools: improving flag processing and help messages, small bug fixes.

16 years agoHack: copy ld.exe to compiler/gcc-lib so Cabal can find it
Ian Lynagh [Sat, 21 Jul 2007 20:00:43 +0000 (20:00 +0000)]
Hack: copy ld.exe to compiler/gcc-lib so Cabal can find it

16 years agoFix the Windows build
Ian Lynagh [Sat, 21 Jul 2007 01:18:17 +0000 (01:18 +0000)]
Fix the Windows build

16 years agoWhen registering base during installation, don't hide GHC.Prim
Ian Lynagh [Thu, 19 Jul 2007 16:39:20 +0000 (16:39 +0000)]
When registering base during installation, don't hide GHC.Prim

16 years agoCreate .hi-boot and .o-boot files in --make mode; fixes trac #1322
Ian Lynagh [Thu, 19 Jul 2007 11:27:36 +0000 (11:27 +0000)]
Create .hi-boot and .o-boot files in --make mode; fixes trac #1322
We were recompiling the .hs-boot files each time, as we were never
writing out the compilation results.

16 years agoFix -split-obj on Mac OS via -fasm
Clemens Fruhwirth [Fri, 6 Jul 2007 11:24:49 +0000 (11:24 +0000)]
Fix -split-obj on Mac OS via -fasm

The problem of the splitter was that it re-emitted section directives
for every dynamic label found. The following was torn apart

.symbol_stubs
.indirect <symbol>
L_<symbol>$stub:
jmp *...
L_<symbol>$stub_binder:
..somebinding code..

into

.symbol_stubs
.indirect_symbol <symbol>
L_<symbol>$stub:
jmp *...
.symbol_stubs <--- NEW
L_<symbol>$stub_binder:
..somebinding code..

This is incorrect as the Mac OS assembler enforces that every new code
section that goes into .symbol_stubs is associated with the linker
directive .indirect_symbol. This sanity check is obviously violated
when we reemit .symbol_stub in the splitter. The solution is to ignore
everything that ends with $stub_binder as new label, and chuck it into
a single label for $stub.

Also the splitter has to recognize .section __DATA... for the lazy_ptr
indirection symbol. Adds a reminder to PositionIndependentCode.hs to
take care of the splitter when the code generation is changed.

This should not affect -fvia-c as the code generated by the C compiler
is entirely different.

16 years agoMade the label generation in the Cmm parser more direct
Michael D. Adams [Wed, 18 Jul 2007 20:33:00 +0000 (20:33 +0000)]
Made the label generation in the Cmm parser more direct

16 years agoTypo fix in comment
Michael D. Adams [Mon, 16 Jul 2007 18:29:06 +0000 (18:29 +0000)]
Typo fix in comment

16 years agoDefault tick interval was 50ms, change it to 20ms
Simon Marlow [Wed, 18 Jul 2007 11:26:52 +0000 (11:26 +0000)]
Default tick interval was 50ms, change it to 20ms
I think 50ms was accidental, prior to 6.6 it used to be 20ms

16 years agoremove unused TICK_FREQUENCY
Simon Marlow [Wed, 18 Jul 2007 11:06:55 +0000 (11:06 +0000)]
remove unused TICK_FREQUENCY

16 years agowakeUpSleepingThreads: fix off by one
Simon Marlow [Wed, 18 Jul 2007 09:27:54 +0000 (09:27 +0000)]
wakeUpSleepingThreads: fix off by one
The symptom of this bug is after the time of a threadDelay has
expired, the RTS does a whole slew of extra select() calls.
This should help with #1523, but it's not the whole story.

16 years agoFixes for the unreg build
Ian Lynagh [Wed, 18 Jul 2007 11:17:51 +0000 (11:17 +0000)]
Fixes for the unreg build
* Fix code output order when printing C so things are defined before
  they are used.
* Generate _ret rather than _entry functions for INFO_TABLE_RET.
* Use "ASSIGN_BaseReg" rather than "BaseReg =".