ghc.git
12 years agoextra prettyprinting only when debugging
Norman Ramsey [Wed, 12 Sep 2007 09:38:44 +0000 (09:38 +0000)] 
extra prettyprinting only when debugging

12 years agorenaming, reorganizing, and better doco for ZipCfg
Norman Ramsey [Tue, 11 Sep 2007 22:55:42 +0000 (22:55 +0000)] 
renaming, reorganizing, and better doco for ZipCfg

12 years agoesacpe backslashes in the filename in the .rc file
Simon Marlow [Wed, 12 Sep 2007 11:16:58 +0000 (11:16 +0000)] 
esacpe backslashes in the filename in the .rc file

12 years agoRemove --export-all-symbols for DLL linking, it is default and prevents us from using...
Clemens Fruhwirth [Fri, 31 Aug 2007 10:46:24 +0000 (10:46 +0000)] 
Remove --export-all-symbols for DLL linking, it is default and prevents us from using .def files

12 years agoCall windres with explicit preprocessor path in case gcc is not in $PATH
Clemens Fruhwirth [Mon, 6 Aug 2007 08:51:20 +0000 (08:51 +0000)] 
Call windres with explicit preprocessor path in case gcc is not in $PATH

12 years agoWeak.c incorrectly claims it's being compiled along RTS Main.c
Clemens Fruhwirth [Mon, 6 Aug 2007 08:45:24 +0000 (08:45 +0000)] 
Weak.c incorrectly claims it's being compiled along RTS Main.c

12 years agoSign extension hack to work around PC64 relocation limitation for binutils <2.17...
Clemens Fruhwirth [Wed, 12 Sep 2007 09:44:30 +0000 (09:44 +0000)] 
Sign extension hack to work around PC64 relocation limitation for binutils <2.17 for x86_64.

binutils <2.17 can't generate PC64 relocations for x86_64. Hence we
emit only 32 bit PC relative offsets, and artifically stick a zero in
front of them to make them 64 bit (see PprMach.sh ppr_item in
pprDataItem). This works as long as the offset is <32bit AND it's
positive. This is not the case for offsets in jump tables, they are
all negative. This hack sign extends them with a MOVSXL instruction
into the dead index register, then adding the properly sign extended
offset to the jump table base label giving the correct target address
for the following jump.

12 years agofoldl1' was added to Data.List in GHC 6.4.x
Simon Marlow [Wed, 12 Sep 2007 11:09:09 +0000 (11:09 +0000)] 
foldl1' was added to Data.List in GHC 6.4.x

12 years agoupdate .hi-boot-6 to track .lhs-boot
Simon Marlow [Wed, 12 Sep 2007 10:43:12 +0000 (10:43 +0000)] 
update .hi-boot-6 to track .lhs-boot

12 years agoupdate to track .lhs-boot file
Simon Marlow [Wed, 12 Sep 2007 10:34:17 +0000 (10:34 +0000)] 
update to track .lhs-boot file

12 years agoRefactoring & documenting the Term pprinter used by :print
Pepe Iborra [Tue, 11 Sep 2007 18:04:11 +0000 (18:04 +0000)] 
Refactoring & documenting the Term pprinter used by :print

12 years agoCustom printer for the Term datatype that won't output TypeRep values
Pepe Iborra [Tue, 11 Sep 2007 15:14:54 +0000 (15:14 +0000)] 
Custom printer for the Term datatype that won't output TypeRep values

The term pretty printer used by :print shouldn't output
the contents of TypeRep values, e.g. inside Dynamic values

12 years agoTry and rewrite reloads to reg-reg moves in the spill cleaner
Ben.Lippmeier@anu.edu.au [Tue, 11 Sep 2007 17:38:33 +0000 (17:38 +0000)] 
Try and rewrite reloads to reg-reg moves in the spill cleaner

12 years agoFix type error in MkZipCfg
Manuel M T Chakravarty [Wed, 12 Sep 2007 01:04:58 +0000 (01:04 +0000)] 
Fix type error in MkZipCfg
- Fixes a bug introduced with the patch named
  'check for unreachable code only with -DDEBUG'
- Breakage occured only without -DDEBUG (which is 'valdiate's default!)

12 years agoscrape some unused barnacles off of ZipCfg and put them into ZipCfgExtras
Norman Ramsey [Tue, 11 Sep 2007 15:45:33 +0000 (15:45 +0000)] 
scrape some unused barnacles off of ZipCfg and put them into ZipCfgExtras

12 years agosplit the CmmGraph constructor interface from the representation
Norman Ramsey [Tue, 11 Sep 2007 15:06:35 +0000 (15:06 +0000)] 
split the CmmGraph constructor interface from the representation
Interface MkZipCfgCmm should now be sufficient for all construction
needs, though some identifiers are re-exported from (and explained in)
MkZipCfg.  ZipCfgCmmRep should be used only by modules involved in
analysis, optimization, or translation of Cmm programs.

12 years agocorrect two single-identifier bugs that stopped the Adams optimization from working
Norman Ramsey [Tue, 11 Sep 2007 14:29:14 +0000 (14:29 +0000)] 
correct two single-identifier bugs that stopped the Adams optimization from working

12 years agodefault ppr method for CmmGraph now tells more about the representation
Norman Ramsey [Tue, 11 Sep 2007 14:27:01 +0000 (14:27 +0000)] 
default ppr method for CmmGraph now tells more about the representation
(Previously, ppr had tried to make the zipper representation look as
much like the ListGraph representation as possible.  This decision was
unhelpful for debugging, so although the old code has been retained,
the new default is to tell it like it is.  It may be possible to
retire PprCmmZ one day, although it may be desirable to retain it as
the internal form becomes less readable.

12 years agoprettyprint 'hinted' things in a more readable way
Norman Ramsey [Tue, 11 Sep 2007 14:25:35 +0000 (14:25 +0000)] 
prettyprint 'hinted' things in a more readable way

12 years agocheck for unreachable code only with -DDEBUG
Norman Ramsey [Tue, 11 Sep 2007 14:24:10 +0000 (14:24 +0000)] 
check for unreachable code only with -DDEBUG

12 years agoadd a big diagnostic for failures in CmmCvt.toZgraph
Norman Ramsey [Tue, 11 Sep 2007 14:23:38 +0000 (14:23 +0000)] 
add a big diagnostic for failures in CmmCvt.toZgraph

12 years agoDon't try and coalesce nodes with themselves
Ben.Lippmeier@anu.edu.au [Tue, 11 Sep 2007 15:12:11 +0000 (15:12 +0000)] 
Don't try and coalesce nodes with themselves

12 years agoTry and allocate vregs spilled/reloaded from some slot to the same hreg
Ben.Lippmeier@anu.edu.au [Tue, 11 Sep 2007 14:50:54 +0000 (14:50 +0000)] 
Try and allocate vregs spilled/reloaded from some slot to the same hreg

12 years agoBetter handling of live range joins via spill slots in spill cleaner
Ben.Lippmeier@anu.edu.au [Tue, 11 Sep 2007 13:02:47 +0000 (13:02 +0000)] 
Better handling of live range joins via spill slots in spill cleaner

12 years agoMake sure to coalesce all the nodes found during iterative scanning
Ben.Lippmeier@anu.edu.au [Mon, 10 Sep 2007 16:29:09 +0000 (16:29 +0000)] 
Make sure to coalesce all the nodes found during iterative scanning

12 years agoAdd iterative coalescing to graph coloring allocator
Ben.Lippmeier@anu.edu.au [Fri, 7 Sep 2007 17:23:15 +0000 (17:23 +0000)] 
Add iterative coalescing to graph coloring allocator

Iterative coalescing interleaves conservative coalesing with the regular
simplify/scan passes. This increases the chance that nodes will be coalesced
as they will have a lower degree than at the beginning of simplify. The end
result is that more register to register moves will be eliminated in the
output code, though the iterative nature of the algorithm makes it slower
compared to non-iterative coloring.

Use -fregs-iterative  for graph coloring allocation with iterative coalescing
    -fregs-graph      for non-iterative coalescing.

The plan is for iterative coalescing to be enabled with -O2 and have a
quicker, non-iterative algorithm otherwise. The time/benefit tradeoff
between iterative and not is still being tuned - optimal graph coloring
is NP-hard, afterall..

12 years agoCustom printer for the Term datatype that won't output TypeRep values
Pepe Iborra [Tue, 11 Sep 2007 15:14:54 +0000 (15:14 +0000)] 
Custom printer for the Term datatype that won't output TypeRep values

The term pretty printer used by :print shouldn't output
the contents of TypeRep values, e.g. inside Dynamic values

12 years agoFIX #1466 (partly), which was causing concprog001(ghci) to fail
Simon Marlow [Tue, 11 Sep 2007 13:02:28 +0000 (13:02 +0000)] 
FIX #1466 (partly), which was causing concprog001(ghci) to fail
An AP_STACK now ensures that there is at least AP_STACK_SPLIM words of
stack headroom available after unpacking the payload.  Continuations
that require more than AP_STACK_SPLIM words of stack must do their own
stack checks instead of aggregating their stack usage into the parent
frame.  I have made this change for the interpreter, but not for
compiled code yet - we should do this in the glorious rewrite of the
code generator.

12 years agoFix type signatures
Pepe Iborra [Tue, 11 Sep 2007 11:32:12 +0000 (11:32 +0000)] 
Fix type signatures

12 years agoDocumentation for -fbreak-on-error
Pepe Iborra [Tue, 11 Sep 2007 10:19:44 +0000 (10:19 +0000)] 
Documentation for -fbreak-on-error

12 years agoGHCi debugger: new flag -fbreak-on-error
Pepe Iborra [Tue, 11 Sep 2007 10:14:43 +0000 (10:14 +0000)] 
GHCi debugger: new flag -fbreak-on-error

    This flag works like -fbreak-on-exception, but only stops
    on uncaught exceptions.

12 years agoRemove obsolete -fdebugging flag
Pepe Iborra [Fri, 7 Sep 2007 13:58:57 +0000 (13:58 +0000)] 
Remove obsolete -fdebugging flag

A left over from the 1st GHCi debugger prototype

12 years agorefactoring: eliminate DriverPipeline.CompResult and GHC.upsweep_compile
Simon Marlow [Mon, 10 Sep 2007 14:57:47 +0000 (14:57 +0000)] 
refactoring: eliminate DriverPipeline.CompResult and GHC.upsweep_compile

12 years agorefactoring: inline hscMkCompiler
Simon Marlow [Mon, 10 Sep 2007 14:57:18 +0000 (14:57 +0000)] 
refactoring: inline hscMkCompiler

12 years agoFIX #1677; poor error message for misspelled module declaration
Simon Marlow [Tue, 11 Sep 2007 08:54:52 +0000 (08:54 +0000)] 
FIX #1677; poor error message for misspelled module declaration

12 years agoSynched documentation links with current directory layout
sven.panne@aedion.de [Tue, 11 Sep 2007 07:18:01 +0000 (07:18 +0000)] 
Synched documentation links with current directory layout
Somehow the "html" subdirs are gone, this change was not completely
intentional, but it is nice, anyway. Those subdirs never served any
real purpose...

MERGE TO STABLE

12 years agoAdd a BeConservative setting to the make system
Ian Lynagh [Mon, 10 Sep 2007 13:35:28 +0000 (13:35 +0000)] 
Add a BeConservative setting to the make system
If it is set, we don't try to use clock_gettime

12 years agoNicer GHCi debugger underlining
Pepe Iborra [Mon, 10 Sep 2007 14:53:19 +0000 (14:53 +0000)] 
Nicer GHCi debugger underlining

Improved the underlining of blocks.
With this patch it does:

Stopped at break020.hs:(6,20)-(7,29)
_result :: t1 () = _
5
                     vv
6  in_another_decl _ = do line1 0
7                         line2 0
                                 ^^
8

Instead of

Stopped at break020.hs:(6,20)-(7,29)
_result :: t1 () = _
5
6  in_another_decl _ = do line1 0
                       ^^
7                         line2 0
                                 ^^
8

12 years agoFIX #1669 (GHCi debugger underlining is in the wrong place)
Pepe Iborra [Mon, 10 Sep 2007 14:21:29 +0000 (14:21 +0000)] 
FIX #1669 (GHCi debugger underlining is in the wrong place)

We weren't taking into account the offset added by the line numbers:

Stopped at break020.hs:10:2-8
_result :: IO () = _
9  main = do
10    line1 0
     ^^^^^^^
11    line2 0

This patch adjusts that

12 years agoTurn off orphan warnings
Ian Lynagh [Mon, 10 Sep 2007 12:27:56 +0000 (12:27 +0000)] 
Turn off orphan warnings
We also avoid using -fno-warn-orphans with older GHCs that don't understand
the flag.

12 years agoAdd some more bits to the boring file
Ian Lynagh [Fri, 7 Sep 2007 21:22:08 +0000 (21:22 +0000)] 
Add some more bits to the boring file

12 years agoAdd a --names-only flag for list --simple-output
Ian Lynagh [Fri, 7 Sep 2007 18:19:44 +0000 (18:19 +0000)] 
Add a --names-only flag for list --simple-output
We use this in the testsuite to find out which libraries we should run
the tests from.

12 years agoFIX #903: mkWWcpr: not a product
Simon Marlow [Mon, 10 Sep 2007 10:38:30 +0000 (10:38 +0000)] 
FIX #903: mkWWcpr: not a product
This fixes the long-standing bug that prevents some code with
mutally-recursive modules from being compiled with --make and -O,
including GHC itself.  See the comments for details.

There are some additional cleanups that were forced/enabled by this
patch: I removed importedSrcLoc/importedSrcSpan: it wasn't adding any
useful information, since a Name already contains its defining Module.
In fact when re-typechecking an interface file we were wrongly
replacing the interesting SrcSpans in the Names with boring
importedSrcSpans, which meant that location information could degrade
after reloading modules.  Also, recreating all these Names was a waste
of space/time.

12 years agoCleaned up version of Tom's unflattened skolemOccurs
Manuel M T Chakravarty [Mon, 10 Sep 2007 08:34:57 +0000 (08:34 +0000)] 
Cleaned up version of Tom's unflattened skolemOccurs

12 years agoThe RTS is Haddock-less, tell make about it
sven.panne@aedion.de [Mon, 10 Sep 2007 06:57:59 +0000 (06:57 +0000)] 
The RTS is Haddock-less, tell make about it
MERGE TO STABLE

12 years agoInclude package documentation, n-th attempt...
sven.panne@aedion.de [Sun, 9 Sep 2007 15:40:53 +0000 (15:40 +0000)] 
Include package documentation, n-th attempt...
MERGE TO STABLE

12 years agoYet another attempt to get the paths for the installed documentation correct
sven.panne@aedion.de [Sun, 9 Sep 2007 12:49:22 +0000 (12:49 +0000)] 
Yet another attempt to get the paths for the installed documentation correct
MERGE TO STABLE

12 years agoAdd a "show" target here, too, quite useful for debugging the build process
sven.panne@aedion.de [Sun, 9 Sep 2007 12:38:13 +0000 (12:38 +0000)] 
Add a "show" target here, too, quite useful for debugging the build process
MERGE TO STABLE

12 years agoNever try to build Haddock docs in ghc/compiler, even with HADDOCK_DOCS=YES
sven.panne@aedion.de [Sun, 9 Sep 2007 12:34:01 +0000 (12:34 +0000)] 
Never try to build Haddock docs in ghc/compiler, even with HADDOCK_DOCS=YES
MERGE TO STABLE

12 years agoRemoved install-dirs target, it is unnecessary and leads to stray empty directories
sven.panne@aedion.de [Sun, 9 Sep 2007 12:11:57 +0000 (12:11 +0000)] 
Removed install-dirs target, it is unnecessary and leads to stray empty directories
MERGE TO STABLE

12 years agoRemoved install-dirs from phony targets, it is unused
sven.panne@aedion.de [Sun, 9 Sep 2007 10:28:15 +0000 (10:28 +0000)] 
Removed install-dirs from phony targets, it is unused
MERGE TO STABLE

12 years agoAdd a crucial missing ;
Ian Lynagh [Sat, 8 Sep 2007 23:10:24 +0000 (23:10 +0000)] 
Add a crucial missing ;

12 years agoimplement the outOfLine primitive in MkZipCfg (proposed as mkBlock)
Norman Ramsey [Sat, 8 Sep 2007 15:51:41 +0000 (15:51 +0000)] 
implement the outOfLine primitive in MkZipCfg (proposed as mkBlock)

12 years agowithUnique and mkBlock as requested by SLPJ (but only one is implemented)
Norman Ramsey [Fri, 7 Sep 2007 17:20:30 +0000 (17:20 +0000)] 
withUnique and mkBlock as requested by SLPJ (but only one is implemented)

12 years agono registers are available after a call
Norman Ramsey [Fri, 7 Sep 2007 17:08:43 +0000 (17:08 +0000)] 
no registers are available after a call

12 years agowrote an analysis to help in sinking Reload instructions
Norman Ramsey [Fri, 7 Sep 2007 16:59:55 +0000 (16:59 +0000)] 
wrote an analysis to help in sinking Reload instructions

12 years agoWe seem to use Outputable unconditionally these days
sven.panne@aedion.de [Sat, 8 Sep 2007 14:27:12 +0000 (14:27 +0000)] 
We seem to use Outputable unconditionally these days
MERGE TO STABLE

12 years agoRemoved setting of default values for variables which are never empty
sven.panne@aedion.de [Sat, 8 Sep 2007 13:18:09 +0000 (13:18 +0000)] 
Removed setting of default values for variables which are never empty
The standard autoconf variables like prefix, exec_prefix, ... are always set by
configure, so there is no need to provide explicit defaults in the Makefile.

The lines were introduced about a decade ago, perhaps there were some bugs in
ancient autoconfs, but today I can't think of a reason why this should be still
necessary.

12 years agoUse := for PACKAGE_TARNAME, no reason for not doing so
sven.panne@aedion.de [Sat, 8 Sep 2007 12:46:45 +0000 (12:46 +0000)] 
Use := for PACKAGE_TARNAME, no reason for not doing so
MERGE TO STABLE

12 years agoRemoved unused oldincludedir, things are already complicated enough
sven.panne@aedion.de [Sat, 8 Sep 2007 12:44:48 +0000 (12:44 +0000)] 
Removed unused oldincludedir, things are already complicated enough
MERGE TO STABLE

12 years agoAdded comment about GNU coding standards/autoconf history
sven.panne@aedion.de [Sat, 8 Sep 2007 12:33:17 +0000 (12:33 +0000)] 
Added comment about GNU coding standards/autoconf history
MERGE TO STABLE

12 years agoFixing Hpc's Finite Map compat lib for ghc 6.2.1
andy@galois.com [Sat, 8 Sep 2007 05:53:20 +0000 (05:53 +0000)] 
Fixing Hpc's Finite Map compat lib for ghc 6.2.1

12 years agoupdating hpc toolkit
andy@galois.com [Sat, 8 Sep 2007 05:16:00 +0000 (05:16 +0000)] 
updating hpc toolkit

The hpc overlay has been ported from hpc-0.4
The new API for readMix is now used.

12 years agoFixing hpc to allow use of hash function to seperate source files on source path
andy@galois.com [Fri, 7 Sep 2007 22:33:57 +0000 (22:33 +0000)] 
Fixing hpc to allow use of hash function to seperate source files on source path

12 years agoMake various assertions work when !DEBUG
Ian Lynagh [Sat, 8 Sep 2007 00:31:12 +0000 (00:31 +0000)] 
Make various assertions work when !DEBUG

12 years agoFix assertions in RtClosureInspect
Ian Lynagh [Fri, 7 Sep 2007 23:33:30 +0000 (23:33 +0000)] 
Fix assertions in RtClosureInspect

12 years agoIn ASSERT and friends, use all the expressions we are passed even if !DEBUG
Ian Lynagh [Fri, 7 Sep 2007 23:33:24 +0000 (23:33 +0000)] 
In ASSERT and friends, use all the expressions we are passed even if !DEBUG
Otherwise we may get unused variable warnings. GHC should optimise them
all out for us.

12 years agoDon't put directories for unbuildable libraries in bindists
Ian Lynagh [Fri, 7 Sep 2007 21:00:37 +0000 (21:00 +0000)] 
Don't put directories for unbuildable libraries in bindists
We think there is a library there, and then installPackage fails to
install it.

12 years agoa good deal of salutory renaming
Norman Ramsey [Fri, 7 Sep 2007 16:12:46 +0000 (16:12 +0000)] 
a good deal of salutory renaming
I've renamed a number of type and data constructors within Cmm so that
the names used in the compiler may more closely reflect the C--
specification 2.1.  I've done a bit of other renaming as well.
Highlights:

  CmmFormal and CmmActual now bear a CmmKind (which for now is a
                                              MachHint as before)
  CmmFormals = [CmmFormal] and CmmActuals = [CmmActual]

  suitable changes have been made to both code and nonterminals in the
  Cmm parser (which is as yet untested)

  For reasons I don't understand, parts of the code generator use a
  sequence of 'formal parameters' with no C-- kinds.  For these we now
  have the types
    type CmmFormalWithoutKind   = LocalReg
    type CmmFormalsWithoutKinds = [CmmFormalWithoutKind]

  A great many appearances of (Tau, MachHint) have been simplified to
  the appropriate CmmFormal or CmmActual, though I'm sure there are
  more opportunities.

  Kind and its data constructors are now renamed to
     data GCKind = GCKindPtr | GCKindNonPtr
  to avoid confusion with the Kind used in the type checker and with CmmKind.

Finally, in a somewhat unrelated bit (and in honor of Simon PJ, who
thought of the name), the Whalley/Davidson 'transaction limit' is now
called 'OptimizationFuel' with the net effect that there are no longer
two unrelated uses of the abbreviation 'tx'.

12 years agoMade TcTyFuns warning clean
Manuel M T Chakravarty [Fri, 7 Sep 2007 12:11:13 +0000 (12:11 +0000)] 
Made TcTyFuns warning clean

12 years agofix for Simple9
Tom Schrijvers [Thu, 6 Sep 2007 17:17:03 +0000 (17:17 +0000)] 
fix for Simple9

No longer include non-indexed arguments
in lookup of matching type function clause.
By including non-indexed (additional) arguments,
the lookup always fails.

12 years agoImproved error messages for higher-rank equality contexts
Manuel M T Chakravarty [Fri, 7 Sep 2007 10:19:01 +0000 (10:19 +0000)] 
Improved error messages for higher-rank equality contexts

12 years agoFIX: Type families test Simple14
Manuel M T Chakravarty [Fri, 7 Sep 2007 09:22:17 +0000 (09:22 +0000)] 
FIX: Type families test Simple14

12 years agorefactor duplicated code in main/HscMain
Norman Ramsey [Fri, 7 Sep 2007 13:24:42 +0000 (13:24 +0000)] 
refactor duplicated code in main/HscMain
  I kept making mistakes because all the ZipCfg and CPS stuff
  was called from two different places (compiling Haskell and
  compiling Cmm).  Now it is called from a single place, and therefore
  successfully turned off by default.

  I still don't know why turning it on causes rts/Apply.cmm not to
  compile; that development is new since yesterday.

12 years agoin CmmExpr, always have (Show GlobalReg), regardless of DEBUG setting
Norman Ramsey [Fri, 7 Sep 2007 13:24:17 +0000 (13:24 +0000)] 
in CmmExpr, always have (Show GlobalReg), regardless of DEBUG setting

12 years agoRejig boot
Ian Lynagh [Fri, 7 Sep 2007 12:28:47 +0000 (12:28 +0000)] 
Rejig boot
find on Windows doesn't understand -L, so stop trying to be clever and
just autoreconf everything.

Also, print out the names of directories as we autoreconf them, so that
if autoreconfing one breaks then we know which one it was.

12 years agoFix publishing
Ian Lynagh [Fri, 7 Sep 2007 12:14:14 +0000 (12:14 +0000)] 
Fix publishing
Paths like c:/foo/bar get misinterpreted by rsync (really SSH?), as it
thinks we want /foo/bar on the machine c.

12 years agoFix building with old compilers which don't understand -fno-warn-orphans
Ian Lynagh [Thu, 6 Sep 2007 19:57:37 +0000 (19:57 +0000)] 
Fix building with old compilers which don't understand -fno-warn-orphans

12 years agoTiny optimisation/simplification to FunDeps.grow
simonpj@microsoft.com [Fri, 7 Sep 2007 10:11:33 +0000 (10:11 +0000)] 
Tiny optimisation/simplification to FunDeps.grow

12 years agoWarning police
simonpj@microsoft.com [Fri, 7 Sep 2007 10:11:03 +0000 (10:11 +0000)] 
Warning police

12 years agoAdd clarifying comments
simonpj@microsoft.com [Fri, 7 Sep 2007 10:10:46 +0000 (10:10 +0000)] 
Add clarifying comments

12 years agoFix zonking in mkExports
simonpj@microsoft.com [Thu, 6 Sep 2007 09:03:46 +0000 (09:03 +0000)] 
Fix zonking in mkExports

I'd missed zonk, so that an error message for missing type signature
read (unhelpfully)

  main/GHC.hs:1070:0:
     Warning: Definition but no type signature for `upsweep''
              Inferred type: upsweep' :: forall t1. t

The trouble was that 't' hadn't been zonked.

Push to the stable branch

12 years agoadding new files to do with new cmm functionality
Norman Ramsey [Fri, 7 Sep 2007 07:57:54 +0000 (07:57 +0000)] 
adding new files to do with new cmm functionality

12 years agoSet do_bold based on $TERM, not platform
Ian Lynagh [Thu, 6 Sep 2007 17:55:35 +0000 (17:55 +0000)] 
Set do_bold based on $TERM, not platform

12 years agoUpdates to work with latest cabal.
Duncan Coutts [Thu, 6 Sep 2007 13:17:26 +0000 (13:17 +0000)] 
Updates to work with latest cabal.

12 years agomassive changes to add a 'zipper' representation of C--
Norman Ramsey [Thu, 6 Sep 2007 16:19:48 +0000 (16:19 +0000)] 
massive changes to add a 'zipper' representation of C--

Changes too numerous to comment on, but here is some old history that
I saved:

Wed Aug 15 11:07:13 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
  * type synonyms made consistent with new Cmm types

    M ./compiler/nativeGen/MachInstrs.hs -2 +2

Mon Aug 20 19:22:14 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
  * pushing return info beyond cmm into codegen

    M ./compiler/codeGen/Bitmap.hs r3
    M ./compiler/codeGen/CgBindery.lhs r3
    M ./compiler/codeGen/CgCallConv.hs r3
    M ./compiler/codeGen/CgCase.lhs r3
    M ./compiler/codeGen/CgClosure.lhs r3
    M ./compiler/codeGen/CgCon.lhs r3
    M ./compiler/codeGen/CgExpr.lhs r3
    M ./compiler/codeGen/CgForeignCall.hs -6 +7 r3
    M ./compiler/codeGen/CgHeapery.lhs r3
    M ./compiler/codeGen/CgHpc.hs +1 r3
    M ./compiler/codeGen/CgInfoTbls.hs r3
    M ./compiler/codeGen/CgLetNoEscape.lhs r3
    M ./compiler/codeGen/CgMonad.lhs r3
    M ./compiler/codeGen/CgParallel.hs r3
    M ./compiler/codeGen/CgPrimOp.hs +3 r3
    M ./compiler/codeGen/CgProf.hs r3
    M ./compiler/codeGen/CgStackery.lhs r3
    M ./compiler/codeGen/CgTailCall.lhs r3
    M ./compiler/codeGen/CgTicky.hs r3
    M ./compiler/codeGen/CgUtils.hs -1 +1 r3
    M ./compiler/codeGen/ClosureInfo.lhs r3
    M ./compiler/codeGen/CodeGen.lhs r3
    M ./compiler/codeGen/SMRep.lhs r3
    M ./compiler/nativeGen/AsmCodeGen.lhs -2 +2 r1
    M ./compiler/nativeGen/MachCodeGen.hs -3 +3 r1
    M ./compiler/nativeGen/MachInstrs.hs r1
    M ./compiler/nativeGen/MachRegs.lhs r1
    M ./compiler/nativeGen/NCGMonad.hs r1
    M ./compiler/nativeGen/PositionIndependentCode.hs r1
    M ./compiler/nativeGen/PprMach.hs r1
    M ./compiler/nativeGen/RegAllocInfo.hs r1
    M ./compiler/nativeGen/RegisterAlloc.hs r1

Mon Aug 20 20:54:41 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
  * put CmmReturnInfo into a CmmCall (and related types)

    M ./compiler/cmm/Cmm.hs -2 +1 r3
    M ./compiler/cmm/CmmBrokenBlock.hs -13 +12 r1
    M ./compiler/cmm/CmmCPS.hs -3 +3
    M ./compiler/cmm/CmmCPSGen.hs -8 +6 r1
    M ./compiler/cmm/CmmLint.hs -1 +1
    M ./compiler/cmm/CmmLive.hs -1 +1
    M ./compiler/cmm/CmmOpt.hs -3 +3
    M ./compiler/cmm/CmmParse.y -6 +6 r3
    M ./compiler/cmm/PprC.hs -3 +3
    M ./compiler/cmm/PprCmm.hs -7 +4 r2
    M ./compiler/codeGen/CgForeignCall.hs -7 +6 r2
    M ./compiler/codeGen/CgHpc.hs -1 r1
    M ./compiler/codeGen/CgPrimOp.hs -3 r1
    M ./compiler/codeGen/CgUtils.hs -1 +1 r1
    M ./compiler/nativeGen/AsmCodeGen.lhs -2 +2
    M ./compiler/nativeGen/MachCodeGen.hs -3 +3 r1

Tue Aug 21 18:09:13 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
  * add call info in nativeGen

    M ./compiler/nativeGen/AsmCodeGen.lhs r1
    M ./compiler/nativeGen/MachInstrs.hs r1
    M ./compiler/nativeGen/MachRegs.lhs r1
    M ./compiler/nativeGen/NCGMonad.hs r1
    M ./compiler/nativeGen/PositionIndependentCode.hs r1
    M ./compiler/nativeGen/PprMach.hs r1
    M ./compiler/nativeGen/RegAllocInfo.hs r1

Wed Aug 22 16:41:58 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
  * ListGraph is now a newtype, not a synonym
  The resultant bookkeepping is unenviable, but the change
  greatly simplifies our ability to make Cmm things propertly
  Outputable for both list-graph and zipper-graph representations.

    M ./compiler/cmm/Cmm.hs -5 +3
    M ./compiler/cmm/CmmCPS.hs -2 +2
    M ./compiler/cmm/CmmCPSGen.hs -1 +1
    M ./compiler/cmm/CmmContFlowOpt.hs -3 +3
    M ./compiler/cmm/CmmCvt.hs -2 +2
    M ./compiler/cmm/CmmInfo.hs -2 +3
    M ./compiler/cmm/CmmLint.hs -1 +1
    M ./compiler/cmm/CmmOpt.hs -2 +2
    M ./compiler/cmm/PprC.hs -1 +1
    M ./compiler/cmm/PprCmm.hs -5 +8
    M ./compiler/cmm/PprCmmZ.hs -7 +1
    M ./compiler/codeGen/CgMonad.lhs -1 +1
    M ./compiler/nativeGen/AsmCodeGen.lhs -15 +15
    M ./compiler/nativeGen/MachCodeGen.hs -2 +2
    M ./compiler/nativeGen/PositionIndependentCode.hs -6 +6
    M ./compiler/nativeGen/PprMach.hs -3 +2
    M ./compiler/nativeGen/RegAllocColor.hs +1
    M ./compiler/nativeGen/RegAllocLinear.hs -4 +5
    M ./compiler/nativeGen/RegCoalesce.hs -6 +6
    M ./compiler/nativeGen/RegLiveness.hs -12 +12

Thu Aug 23 13:44:49 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
  * diagnostic assistance in case fromJust fails

    M ./compiler/nativeGen/MachCodeGen.hs -2 +5

Thu Aug 23 14:07:28 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
  * give every block, even the first, a label
    With branch-chain elimination, the first block of a procedure
    might be the target of a branch.  This actually happens to
    a dozen or more procedures in the run-time system.

    M ./compiler/nativeGen/PprMach.hs -8 +3

Fri Aug 24 17:27:04 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
  * clean up the code in PprMach

    M ./compiler/nativeGen/PprMach.hs -16 +14

Fri Aug 24 19:35:03 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
  * a bunch of impedance matching to get the compiler to build, plus
   * the plus is diagnostics for unreachable code, which required
     moving a lot of prettyprinting code

    M ./compiler/cmm/Cmm.hs -7 +5
    M ./compiler/cmm/CmmCPSZ.hs -1 +1
    M ./compiler/cmm/CmmCvt.hs -8 +8
    M ./compiler/cmm/CmmParse.y -4 +3
    M ./compiler/cmm/MkZipCfg.hs -19 +9
    M ./compiler/cmm/PprCmmZ.hs -118 +4
    M ./compiler/cmm/ZipCfg.hs -1 +13
    M ./compiler/cmm/ZipCfgCmm.hs -10 +129
    M ./compiler/main/HscMain.lhs -4 +4
    M ./compiler/nativeGen/NCGMonad.hs -2 +2
    M ./compiler/nativeGen/RegAllocInfo.hs -3 +3

Fri Aug 31 14:38:02 BST 2007  Norman Ramsey <nr@eecs.harvard.edu>
  * fix a warning about an import

    M ./compiler/nativeGen/RegAllocColor.hs -1 +1

12 years agoMake installPackage install settings from the [package].buildinfo file.
judah.jacobson@gmail.com [Thu, 6 Sep 2007 01:00:44 +0000 (01:00 +0000)] 
Make installPackage install settings from the [package].buildinfo file.

M ./libraries/installPackage.hs -1 +14

12 years agoWibble some variable definitions to fix installation of bindists
Ian Lynagh [Thu, 6 Sep 2007 14:04:30 +0000 (14:04 +0000)] 
Wibble some variable definitions to fix installation of bindists

12 years agoRemove hardtop_plat/FPTOOLS_TOP_ABS_PLATFORM
Ian Lynagh [Thu, 6 Sep 2007 12:20:36 +0000 (12:20 +0000)] 
Remove hardtop_plat/FPTOOLS_TOP_ABS_PLATFORM
They are now the same as hardtop/FPTOOLS_TOP_ABS, so use those instead.

Also removed some substitutions of / for \, as we now use a Haskell
program to find the top path, and it only makes paths with /s in.

12 years agoCure space leak in coloring register allocator
Ben.Lippmeier@anu.edu.au [Thu, 6 Sep 2007 13:15:22 +0000 (13:15 +0000)] 
Cure space leak in coloring register allocator

We now do a deep seq on the graph after it is 'built', but before coloring.
Without this, the colorer will just force bits of it and the heap will
fill up with half evaluated pieces of graph from previous build/spill
stages and zillions of apply thunks.

12 years agoSmall improvement to GraphColor.selectColor
Ben.Lippmeier@anu.edu.au [Thu, 6 Sep 2007 10:33:47 +0000 (10:33 +0000)] 
Small improvement to GraphColor.selectColor

When selecting a color for a node, try and avoid using colors that
conflicting nodes prefer. Not sure if this'll make much difference,
but it was easy enough to add..

12 years agoSet GhcBootLibs=YES in mk/validate-settings.mk
Ian Lynagh [Thu, 6 Sep 2007 11:36:29 +0000 (11:36 +0000)] 
Set GhcBootLibs=YES in mk/validate-settings.mk

12 years agoQuote all the arguments to installPackage
Ian Lynagh [Wed, 5 Sep 2007 23:29:59 +0000 (23:29 +0000)] 
Quote all the arguments to installPackage
Makes it obvious what's going on if any are empty.

12 years agowarning police
Pepe Iborra [Thu, 6 Sep 2007 10:24:17 +0000 (10:24 +0000)] 
warning police

12 years agoCleanup of equality rewriting and no swapInsts for wanteds
Manuel M T Chakravarty [Thu, 6 Sep 2007 11:58:18 +0000 (11:58 +0000)] 
Cleanup of equality rewriting and no swapInsts for wanteds
- Removed code duplication
- Added comments
- Took out swapInsts for wanteds.  With the recent extension to swapInsts
  it does mess up error messages if applied to wanteds and i should not be
  necessary.
NB: The code actually shrunk.  Line increase is due to comments.

12 years agoRemove EqInsts from addSCs to avoid -DDEBUG warnings
Manuel M T Chakravarty [Thu, 6 Sep 2007 09:51:02 +0000 (09:51 +0000)] 
Remove EqInsts from addSCs to avoid -DDEBUG warnings

12 years agoEqInst related clean up
Manuel M T Chakravarty [Thu, 6 Sep 2007 09:50:18 +0000 (09:50 +0000)] 
EqInst related clean up
- Remove some unused and some superflous functions
- Add comments regarding ancestor equalities
- Tidied ancestor equality computation
- Replace some incorrect instToId by instToVar (but there are still some
  bad ones around as we still get warnings with -DDEBUG)
- Some cleaned up layout
NB: Code growth is just due to more comments.

12 years agoRemove dead code in TcSimplify
Manuel M T Chakravarty [Thu, 6 Sep 2007 03:17:19 +0000 (03:17 +0000)] 
Remove dead code in TcSimplify

12 years agoFix -DDEBUG warning
Manuel M T Chakravarty [Thu, 6 Sep 2007 02:39:14 +0000 (02:39 +0000)] 
Fix -DDEBUG warning

12 years agoalso swap for variables in completion algorithm
Tom Schrijvers [Wed, 5 Sep 2007 13:44:26 +0000 (13:44 +0000)] 
also swap for variables in completion algorithm