ghc.git
6 years agoMake StgWord a portable type too
Ian Lynagh [Tue, 18 Sep 2012 22:22:20 +0000 (23:22 +0100)] 
Make StgWord a portable type too

StgWord is a newtyped Word64, as it needed to be something that
has a UArray instance.

6 years agoMake StgHalfWord a portable type
Ian Lynagh [Tue, 18 Sep 2012 19:44:20 +0000 (20:44 +0100)] 
Make StgHalfWord a portable type

It's now a newtyped Integer. Perhaps a newtyped Word32 would make more
sense, though.

6 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Tue, 18 Sep 2012 18:05:24 +0000 (19:05 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

6 years agoRemove some uses of the WORDS_BIGENDIAN CPP symbol
Ian Lynagh [Tue, 18 Sep 2012 16:43:15 +0000 (17:43 +0100)] 
Remove some uses of the WORDS_BIGENDIAN CPP symbol

6 years agoGive packHalfWordsCLit a more specific type
Ian Lynagh [Tue, 18 Sep 2012 14:32:36 +0000 (15:32 +0100)] 
Give packHalfWordsCLit a more specific type

I'm not sure if there's a reason why the HeapRep constructor takes
2 WordOffs rather than 2 StgHalfWords.

6 years agomake some debug output conditional on -ddump-cmmz
Simon Marlow [Tue, 18 Sep 2012 13:49:34 +0000 (14:49 +0100)] 
make some debug output conditional on -ddump-cmmz

6 years agoDeclare SRT labels correctly in the via-C backend
Simon Marlow [Tue, 18 Sep 2012 13:49:16 +0000 (14:49 +0100)] 
Declare SRT labels correctly in the via-C backend

6 years agoSmall parallel GC improvement
Simon Marlow [Fri, 7 Sep 2012 16:01:24 +0000 (17:01 +0100)] 
Small parallel GC improvement

Overlap the main thread's clearNursery() with the other threads.

6 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Mon, 17 Sep 2012 20:38:36 +0000 (21:38 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

6 years agoRemove some CPP
Ian Lynagh [Mon, 17 Sep 2012 19:21:06 +0000 (20:21 +0100)] 
Remove some CPP

6 years agoMerge the remainder of HaskellConstants into Constants
Ian Lynagh [Mon, 17 Sep 2012 17:50:46 +0000 (18:50 +0100)] 
Merge the remainder of HaskellConstants into Constants

6 years agoRemove unused import
Ian Lynagh [Mon, 17 Sep 2012 17:51:50 +0000 (18:51 +0100)] 
Remove unused import

6 years agoMake the call to chooseBoxingStrategy lazy again
Simon Peyton Jones [Mon, 17 Sep 2012 17:22:10 +0000 (18:22 +0100)] 
Make the call to chooseBoxingStrategy lazy again

I made it strict, as an incidental consequence of this patch:

  commit 5bae803a18b17bdb158a7780e6b6ac3c520e5b39
  Author: Simon Peyton Jones <simonpj@microsoft.com>
  Date:   Sat Sep 15 23:09:25 2012 +0100
      Fix UNPACK with -fomit-interface-pragmas.

But it's very important that chooseBoxingStrategy is lazy, else
(in bigger programs with lots of recursion in types) GHC can
loop. This showed up in Data.Sequence; and I think it was making
haddock loop as well.

Anyway this patch makes it lazy again.

6 years agoRemove the Target* types from HaskellConstants
Ian Lynagh [Mon, 17 Sep 2012 17:06:54 +0000 (18:06 +0100)] 
Remove the Target* types from HaskellConstants

6 years agoMove tARGET_* out of HaskellConstants
Ian Lynagh [Mon, 17 Sep 2012 12:15:42 +0000 (13:15 +0100)] 
Move tARGET_* out of HaskellConstants

6 years agotypo
Gabor Greif [Mon, 17 Sep 2012 14:10:47 +0000 (16:10 +0200)] 
typo

6 years agoPass DynFlags to the ru_try functions of built-in rules
Ian Lynagh [Mon, 17 Sep 2012 09:38:53 +0000 (10:38 +0100)] 
Pass DynFlags to the ru_try functions of built-in rules

6 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Mon, 17 Sep 2012 07:09:36 +0000 (08:09 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

6 years agoMove tAG_BITS into platformConstants
Ian Lynagh [Sun, 16 Sep 2012 19:55:26 +0000 (20:55 +0100)] 
Move tAG_BITS into platformConstants

6 years agoMove more constants to platformConstants
Ian Lynagh [Sun, 16 Sep 2012 18:42:07 +0000 (19:42 +0100)] 
Move more constants to platformConstants

6 years agoMove wORD_SIZE into platformConstants
Ian Lynagh [Sun, 16 Sep 2012 16:45:03 +0000 (17:45 +0100)] 
Move wORD_SIZE into platformConstants

6 years agoPass DynFlags down to llvmWord
Ian Lynagh [Sun, 16 Sep 2012 13:03:58 +0000 (14:03 +0100)] 
Pass DynFlags down to llvmWord

6 years agoWindows build fix
Ian Lynagh [Sun, 16 Sep 2012 12:40:22 +0000 (13:40 +0100)] 
Windows build fix

6 years agoPrint literal integers in External Core.
Simon Peyton Jones [Sat, 15 Sep 2012 22:12:23 +0000 (23:12 +0100)] 
Print literal integers in External Core.

6 years agoFix UNPACK with -fomit-interface-pragmas.
Simon Peyton Jones [Sat, 15 Sep 2012 22:09:25 +0000 (23:09 +0100)] 
Fix UNPACK with -fomit-interface-pragmas.

We were missing a case, so that you could expose a constructor
with UNPACKed fields, but the field tpye was trimmed, and hence
can't be expanded.

Fixes Trac #5252 (revived)

6 years agoComments and laout only
Simon Peyton Jones [Sat, 15 Sep 2012 22:06:52 +0000 (23:06 +0100)] 
Comments and laout only

6 years agoFix Trac #7237; mixup with empty tuples
Simon Peyton Jones [Sat, 15 Sep 2012 22:06:20 +0000 (23:06 +0100)] 
Fix Trac #7237; mixup with empty tuples

When converting from Core to STG, we swith pattern matching on
on a *nullary* unboxed tuple into matching using a PrimAlt on RealWorld#
   case e (RealWorld#) of { DEFAULT -> ... }
This semms messy to me, but it works.  There was a bug in that we were
changing to PrimAlt, but not using a DEFAULT AltCon.

6 years agoMerge remote branch 'origin/master'
Simon Peyton Jones [Sat, 15 Sep 2012 07:09:56 +0000 (08:09 +0100)] 
Merge remote branch 'origin/master'

6 years agoBind "given" evidence to a variable, always
Simon Peyton Jones [Fri, 14 Sep 2012 23:12:16 +0000 (00:12 +0100)] 
Bind "given" evidence to a variable, always

This was being done in xCtFlavor, but not in rewriteCtFlavor,
resulting in Trac #7238.

See Note [Bind new Givens immediately] in TcSMonad and
and Note [Coercion evidence terms] in TcEvidence.

6 years agoMove wORD_SIZE_IN_BITS to DynFlags
Ian Lynagh [Fri, 14 Sep 2012 20:52:52 +0000 (21:52 +0100)] 
Move wORD_SIZE_IN_BITS to DynFlags

This frees wORD_SIZE up to be moved out of HaskellConstants

6 years agoMove some more constants into platformConstants
Ian Lynagh [Fri, 14 Sep 2012 20:25:46 +0000 (21:25 +0100)] 
Move some more constants into platformConstants

6 years agoRemove more Platform arguments
Ian Lynagh [Fri, 14 Sep 2012 19:20:47 +0000 (20:20 +0100)] 
Remove more Platform arguments

6 years agoWhitespace only in nativeGen/RegAlloc/Linear/JoinToTargets.hs
Ian Lynagh [Fri, 14 Sep 2012 19:10:04 +0000 (20:10 +0100)] 
Whitespace only in nativeGen/RegAlloc/Linear/JoinToTargets.hs

6 years agoRemove more Platform arguments
Ian Lynagh [Fri, 14 Sep 2012 19:04:38 +0000 (20:04 +0100)] 
Remove more Platform arguments

6 years agoRemove a load of Platform arguments from RegM functions
Ian Lynagh [Fri, 14 Sep 2012 18:53:15 +0000 (19:53 +0100)] 
Remove a load of Platform arguments from RegM functions

6 years agoPut DynFlags into the RegM monad
Ian Lynagh [Fri, 14 Sep 2012 18:39:28 +0000 (19:39 +0100)] 
Put DynFlags into the RegM monad

Also moved the type definition into RegAlloc.Linear.State to de-orphan
the Monad instance.

6 years agoWhitespace only in nativeGen/RegAlloc/Linear/State.hs
Ian Lynagh [Fri, 14 Sep 2012 18:28:12 +0000 (19:28 +0100)] 
Whitespace only in nativeGen/RegAlloc/Linear/State.hs

6 years agoMove more constants to platformConstants
Ian Lynagh [Fri, 14 Sep 2012 15:27:51 +0000 (16:27 +0100)] 
Move more constants to platformConstants

6 years agoMAX_REAL_LONG_REG is always defined, so no need to test it
Ian Lynagh [Fri, 14 Sep 2012 14:25:16 +0000 (15:25 +0100)] 
MAX_REAL_LONG_REG is always defined, so no need to test it

6 years agoMove more constants into platformConstants
Ian Lynagh [Fri, 14 Sep 2012 14:24:30 +0000 (15:24 +0100)] 
Move more constants into platformConstants

6 years agoMerge branch 'master' of mac:ghc/git/val32/.
Ian Lynagh [Fri, 14 Sep 2012 12:58:17 +0000 (13:58 +0100)] 
Merge branch 'master' of mac:ghc/git/val32/.

6 years agoMove some more constants fo platformConstants
Ian Lynagh [Fri, 14 Sep 2012 12:57:48 +0000 (13:57 +0100)] 
Move some more constants fo platformConstants

6 years agoMore OS X build fixes
Ian Lynagh [Fri, 14 Sep 2012 12:24:48 +0000 (13:24 +0100)] 
More OS X build fixes

6 years agoCheck for Int constants that are too large in mkDerivedConstants
Ian Lynagh [Fri, 14 Sep 2012 11:53:13 +0000 (12:53 +0100)] 
Check for Int constants that are too large in mkDerivedConstants

6 years agoStart moving other constants from (Haskell)Constants to platformConstants
Ian Lynagh [Fri, 14 Sep 2012 11:48:53 +0000 (12:48 +0100)] 
Start moving other constants from (Haskell)Constants to platformConstants

6 years agoFix build on OS X
Ian Lynagh [Fri, 14 Sep 2012 10:43:12 +0000 (11:43 +0100)] 
Fix build on OS X

6 years agoWhen allocating a new kind variable, do so with newMetaUnique
Simon Peyton Jones [Fri, 14 Sep 2012 10:12:01 +0000 (11:12 +0100)] 
When allocating a new kind variable, do so with newMetaUnique

6 years agoUse intptr_t for offset values in mkDerivedConstants
Ian Lynagh [Thu, 13 Sep 2012 22:31:19 +0000 (23:31 +0100)] 
Use intptr_t for offset values in mkDerivedConstants

This means that we get e.g.
    pc_OFFSET_stgEagerBlackholeInfo = -24
rather than
    pc_OFFSET_stgEagerBlackholeInfo = 18446744073709551592

6 years agoRemove some unused HaskellConstants entries
Ian Lynagh [Thu, 13 Sep 2012 21:16:37 +0000 (22:16 +0100)] 
Remove some unused HaskellConstants entries

6 years agoRemove the --gen-haskell mode of mkDerivedConstants
Ian Lynagh [Thu, 13 Sep 2012 20:26:05 +0000 (21:26 +0100)] 
Remove the --gen-haskell mode of mkDerivedConstants

It no longer generates anything

6 years agoUse oFFSET_* from platformConstants rather than Constants
Ian Lynagh [Thu, 13 Sep 2012 20:22:04 +0000 (21:22 +0100)] 
Use oFFSET_* from platformConstants rather than Constants

6 years agoUse sIZEOF_* from platformConstants rather than Constants
Ian Lynagh [Thu, 13 Sep 2012 18:12:30 +0000 (19:12 +0100)] 
Use sIZEOF_* from platformConstants rather than Constants

6 years agoAdd a couple more mkDerivedConstants modes
Ian Lynagh [Thu, 13 Sep 2012 17:00:39 +0000 (18:00 +0100)] 
Add a couple more mkDerivedConstants modes

We now also generate nice wrappers for the platformConstants
methods. For now it's all commented out as the definitions
conflict with those in Constants.

6 years agoWe need to install the platformConstants file
Ian Lynagh [Thu, 13 Sep 2012 16:32:13 +0000 (17:32 +0100)] 
We need to install the platformConstants file

6 years agoMake the Windows-specific part of mkDerivedConstants.c conditional
Ian Lynagh [Thu, 13 Sep 2012 15:10:32 +0000 (16:10 +0100)] 
Make the Windows-specific part of mkDerivedConstants.c conditional

It is only generated when mode is Gen_Header; i.e. it's not used
in the compiler, only the RTS.

6 years agoAdd more modes to mkDerivedConstants
Ian Lynagh [Thu, 13 Sep 2012 11:54:04 +0000 (12:54 +0100)] 
Add more modes to mkDerivedConstants

We now generate a platformConstants file that we can read at runtime.

6 years agoUse conditionals rather than CPP in mkDerivedConstants
Ian Lynagh [Wed, 12 Sep 2012 22:34:27 +0000 (23:34 +0100)] 
Use conditionals rather than CPP in mkDerivedConstants

This means we only need to build one copy of the program, which
will make life simpler as I plan to add more variants.

6 years agoPass DynFlags down to wordWidth
Ian Lynagh [Wed, 12 Sep 2012 15:32:34 +0000 (16:32 +0100)] 
Pass DynFlags down to wordWidth

6 years agoPass DynFlags down to gcWord
Ian Lynagh [Wed, 12 Sep 2012 11:37:01 +0000 (12:37 +0100)] 
Pass DynFlags down to gcWord

6 years agoPass DynFlags down to bWord
Ian Lynagh [Wed, 12 Sep 2012 10:31:11 +0000 (11:31 +0100)] 
Pass DynFlags down to bWord

I've switched to passing DynFlags rather than Platform, as (a) it's
simpler to not have to extract targetPlatform in so many places, and
(b) it may be useful to have DynFlags around in future.

6 years agoWhitespace only in codeGen/CgProf.hs
Ian Lynagh [Tue, 11 Sep 2012 14:10:28 +0000 (15:10 +0100)] 
Whitespace only in codeGen/CgProf.hs

6 years agoWhitespace only in cmm/CmmUtils.hs
Ian Lynagh [Tue, 11 Sep 2012 12:48:21 +0000 (13:48 +0100)] 
Whitespace only in cmm/CmmUtils.hs

6 years agoWhitespace only in cmm/CmmExpr.hs
Ian Lynagh [Tue, 11 Sep 2012 12:45:43 +0000 (13:45 +0100)] 
Whitespace only in cmm/CmmExpr.hs

6 years agoPass Platform down to halfWordMask
Ian Lynagh [Mon, 10 Sep 2012 16:04:41 +0000 (17:04 +0100)] 
Pass Platform down to halfWordMask

6 years agoPass Platform down to halfWordWidth
Ian Lynagh [Mon, 10 Sep 2012 16:02:50 +0000 (17:02 +0100)] 
Pass Platform down to halfWordWidth

We don't actually use it yet

6 years agoRemove some more CPP
Ian Lynagh [Mon, 10 Sep 2012 12:14:45 +0000 (13:14 +0100)] 
Remove some more CPP

6 years agoTwo fixes to kind unification
Simon Peyton Jones [Mon, 10 Sep 2012 12:13:24 +0000 (13:13 +0100)] 
Two fixes to kind unification

* Don't unify a kind signature-variable with non-tyvar kind
* Don't allow a kind variable to appear in a type
  (Trac #7224)

6 years agoRemove some CPP
Ian Lynagh [Mon, 10 Sep 2012 11:45:34 +0000 (12:45 +0100)] 
Remove some CPP

6 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Mon, 10 Sep 2012 10:29:31 +0000 (11:29 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

6 years agoUpdate dependency on directory.
Paolo Capriotti [Tue, 14 Aug 2012 11:59:21 +0000 (12:59 +0100)] 
Update dependency on directory.

6 years agoRemember to zonk the skolems of an implication
Simon Peyton Jones [Sun, 9 Sep 2012 06:07:39 +0000 (07:07 +0100)] 
Remember to zonk the skolems of an implication

Their kinds may contain kind unification variables!

This patch fixes Trac #7230.

6 years agoLots of nat -> StgWord changes
Simon Marlow [Fri, 7 Sep 2012 15:01:36 +0000 (16:01 +0100)] 
Lots of nat -> StgWord changes

6 years agocomment updates
Simon Marlow [Fri, 7 Sep 2012 15:01:09 +0000 (16:01 +0100)] 
comment updates

6 years agoHandle II16 size value in PowerPC code generator.
Erik de Castro Lopo [Fri, 7 Sep 2012 10:12:38 +0000 (20:12 +1000)] 
Handle II16 size value in PowerPC code generator.

6 years agoDeprecate lnat, and use StgWord instead
Simon Marlow [Fri, 7 Sep 2012 12:55:11 +0000 (13:55 +0100)] 
Deprecate lnat, and use StgWord instead

lnat was originally "long unsigned int" but we were using it when we
wanted a 64-bit type on a 64-bit machine.  This broke on Windows x64,
where long == int == 32 bits.  Using types of unspecified size is bad,
but what we really wanted was a type with N bits on an N-bit machine.
StgWord is exactly that.

lnat was mentioned in some APIs that clients might be using
(e.g. StackOverflowHook()), so we leave it defined but with a comment
to say that it's deprecated.

6 years agoSome further tweaks to reduce fragmentation when allocating the nursery
Simon Marlow [Fri, 7 Sep 2012 12:36:09 +0000 (13:36 +0100)] 
Some further tweaks to reduce fragmentation when allocating the nursery

6 years agosome nats should be lnats
Simon Marlow [Fri, 7 Sep 2012 12:35:27 +0000 (13:35 +0100)] 
some nats should be lnats

6 years agoWhen using -H with -M<size>, don't exceed the maximum heap size
Simon Marlow [Fri, 7 Sep 2012 12:35:16 +0000 (13:35 +0100)] 
When using -H with -M<size>, don't exceed the maximum heap size

6 years agomemInventory(): tweak pretty-printing
Simon Marlow [Fri, 7 Sep 2012 12:35:00 +0000 (13:35 +0100)] 
memInventory(): tweak pretty-printing

6 years agoFix the PPC and SPARC NCGs to handle multiple info tables in a proc
Simon Marlow [Fri, 7 Sep 2012 11:50:08 +0000 (12:50 +0100)] 
Fix the PPC and SPARC NCGs to handle multiple info tables in a proc

6 years agoTypo fix in deferred type errors docs.
Edward Z. Yang [Thu, 6 Sep 2012 18:24:36 +0000 (14:24 -0400)] 
Typo fix in deferred type errors docs.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
6 years agoFail nicely when encountering an invalid bang annotation (#7210)
Patrick Palka [Mon, 3 Sep 2012 14:27:26 +0000 (10:27 -0400)] 
Fail nicely when encountering an invalid bang annotation (#7210)

6 years agoFix #7215: we weren't calculating the hashes correctly for sub-binders
Simon Marlow [Wed, 5 Sep 2012 15:38:50 +0000 (16:38 +0100)] 
Fix #7215: we weren't calculating the hashes correctly for sub-binders

6 years agoremove $(GhcStage1DefaultNewCodegen) etc.
Simon Marlow [Wed, 5 Sep 2012 08:26:23 +0000 (09:26 +0100)] 
remove $(GhcStage1DefaultNewCodegen) etc.

6 years agoA further fix for -split-objs with the new codegen
Simon Marlow [Wed, 5 Sep 2012 08:23:04 +0000 (09:23 +0100)] 
A further fix for -split-objs with the new codegen

6 years agoAdd "remote set-branches" support to sync-all
Ian Lynagh [Tue, 4 Sep 2012 13:57:22 +0000 (14:57 +0100)] 
Add "remote set-branches" support to sync-all

6 years agoFix -split-objs with the new code generator
Simon Marlow [Tue, 4 Sep 2012 12:57:26 +0000 (13:57 +0100)] 
Fix -split-objs with the new code generator

We need to make the SRT label external and unique when splitting,
because it is shared amongst all the functions in the module.  Also
some SRT-related cleanup.

6 years agoNarrow the args of the popCnt# primitives (new codegen)
Simon Marlow [Mon, 3 Sep 2012 11:28:35 +0000 (12:28 +0100)] 
Narrow the args of the popCnt# primitives (new codegen)

(this change was previously done in the old codegen only)

6 years agoMake -fhpc a dynamic flag
Ian Lynagh [Mon, 3 Sep 2012 22:42:17 +0000 (23:42 +0100)] 
Make -fhpc a dynamic flag

6 years agoRemove unused -dopt-fuel
Ian Lynagh [Mon, 3 Sep 2012 21:42:07 +0000 (22:42 +0100)] 
Remove unused -dopt-fuel

6 years agoRemove -dstub-dead-values from flag list
Ian Lynagh [Mon, 3 Sep 2012 21:39:28 +0000 (22:39 +0100)] 
Remove -dstub-dead-values from flag list

6 years agoMake -fhistory-size dynamic
Ian Lynagh [Mon, 3 Sep 2012 21:22:34 +0000 (22:22 +0100)] 
Make -fhistory-size dynamic

6 years agoRemove the unused opt_StubDeadValues
Ian Lynagh [Mon, 3 Sep 2012 20:49:16 +0000 (21:49 +0100)] 
Remove the unused opt_StubDeadValues

6 years agoMove ldInputs into DynFlags
Ian Lynagh [Mon, 3 Sep 2012 20:41:55 +0000 (21:41 +0100)] 
Move ldInputs into DynFlags

6 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Mon, 3 Sep 2012 17:20:03 +0000 (18:20 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

6 years agoRemove the way-related CPP frmo DynFlags
Ian Lynagh [Mon, 3 Sep 2012 16:41:11 +0000 (17:41 +0100)] 
Remove the way-related CPP frmo DynFlags

6 years agoRemove doingTickyProfiling
Ian Lynagh [Mon, 3 Sep 2012 16:25:47 +0000 (17:25 +0100)] 
Remove doingTickyProfiling

It's now just 'dopt Opt_Ticky'

6 years agoDefine initial buildTag and rtsBuildTag
Ian Lynagh [Mon, 3 Sep 2012 16:09:11 +0000 (17:09 +0100)] 
Define initial buildTag and rtsBuildTag

6 years agoMake the ways dynamic
Ian Lynagh [Mon, 3 Sep 2012 16:02:18 +0000 (17:02 +0100)] 
Make the ways dynamic

6 years agoRefactor the ways code a bit
Ian Lynagh [Mon, 3 Sep 2012 10:58:48 +0000 (11:58 +0100)] 
Refactor the ways code a bit

We used to use a list lookup that couldn't fail. Now we just use
functions.

There were 3 overlapping entries for WayPar; I've commented out the ones
that were shadowed for now.