sven.panne@aedion.de [Wed, 14 Mar 2007 12:22:33 +0000 (12:22 +0000)]
Use -Wall for compilation of genprimopcode
simonpj@microsoft.com [Wed, 14 Mar 2007 12:14:10 +0000 (12:14 +0000)]
Improve typechecker error messages; see Trac #1221
Ian Lynagh [Tue, 13 Mar 2007 22:05:45 +0000 (22:05 +0000)]
Fix the way configure sets the ghc_ge_* variables
Simon Marlow [Tue, 13 Mar 2007 16:00:08 +0000 (16:00 +0000)]
cache the values of ghc_ge_XXX at configure-time
This avoids recomputing them via $(shell) each time make expands one
of these variables, which is very expensive (0.3s or so) on Windows.
Brian Alliet [Wed, 14 Mar 2007 05:28:07 +0000 (05:28 +0000)]
Update the wired-in name for Data.String.IsString
simonpj@microsoft.com [Tue, 13 Mar 2007 16:22:54 +0000 (16:22 +0000)]
Add helpful cross-references
Simon Marlow [Tue, 13 Mar 2007 14:46:14 +0000 (14:46 +0000)]
fix #1200: don't evaluate the result of main
Simon Marlow [Tue, 23 Jan 2007 10:40:25 +0000 (10:40 +0000)]
Fix a bug in the liveness analysis
We were being overly conservative, registers that were live only at a
branch target were not recorded as being dead in the branch-not-taken
code.
Ian Lynagh [Mon, 12 Mar 2007 10:50:53 +0000 (10:50 +0000)]
Be a bit more verbose about what's happening when recursively making in subdirs
Ian Lynagh [Sun, 11 Mar 2007 17:50:25 +0000 (17:50 +0000)]
Have configure take arguments telling it where gmp is; fixes trac #957
Ian Lynagh [Fri, 9 Mar 2007 17:48:25 +0000 (17:48 +0000)]
Avoid duplication in the binary-dist rules for docs
Rather than building complex sh stuff and echoing what we're doing
ourselves, use make rules to do the looping and let make print things
out.
Ian Lynagh [Fri, 9 Mar 2007 17:43:07 +0000 (17:43 +0000)]
Remove duplication in binary dist rules
Rather than building complex sh stuff and echoing what we're doing
ourselves, use make rules to do the looping and let make print things
out.
wolfgang.thaller@gmx.net [Thu, 8 Mar 2007 02:05:03 +0000 (02:05 +0000)]
Make constructor names in info tables position independent
Info tables, like everything else in the text section, MUST NOT contain
pointers. A pointer is, by definition, position dependent and is therefore
fundamentally incompatible with generating position independent code.
Therefore, we have to store an offset from the info label to the string
instead of the pointer, just as we already did for other things referred
to by the info table (SRTs, large bitmaps, etc.)
Simon Marlow [Thu, 8 Mar 2007 15:46:53 +0000 (15:46 +0000)]
when invoking gcc, instead of the -B<dir> flag, use GCC_EXEC_PREFIX
should hopefully fix/workaround #1110, but I haven't had a chance to
test it yet.
Simon Marlow [Thu, 8 Mar 2007 13:45:43 +0000 (13:45 +0000)]
small cleanups
Simon Marlow [Thu, 8 Mar 2007 11:06:19 +0000 (11:06 +0000)]
refactor: use do-notation rather than `thenBc`-style
Simon Marlow [Thu, 8 Mar 2007 10:19:21 +0000 (10:19 +0000)]
add missing %ENTRY_CODE()
fixes unreg way in HEAD
Simon Marlow [Thu, 8 Mar 2007 09:57:17 +0000 (09:57 +0000)]
add noDuplicatezh_fast to symbol table
Simon Marlow [Wed, 7 Mar 2007 08:56:48 +0000 (08:56 +0000)]
add declaration for noDuplicatezh_fast
Ian Lynagh [Tue, 6 Mar 2007 15:26:54 +0000 (15:26 +0000)]
Remove outdated libraries/doc/libraries.xml and libraries/doc/libtable.xml
Simon Marlow [Tue, 6 Mar 2007 14:31:12 +0000 (14:31 +0000)]
add noDuplicate#
This primop ensures that the current computation is not being
duplicated, by calling threadPaused(). The idea is to use it inside
unsafePerformIO/unsafeInterleaveIO (see #986).
Simon Marlow [Tue, 6 Mar 2007 14:27:32 +0000 (14:27 +0000)]
THREADED_RTS: use cas() when claiming thunks
I guess I forgot to do this the first time around; the upshot is that
there could be some uncaught duplication of work on a multiprocessor
(but unlikely).
Simon Marlow [Tue, 6 Mar 2007 14:04:53 +0000 (14:04 +0000)]
workerTaskStop(): set task->cap = NULL
avoids an assertion failure in newBoundTask()
Simon Marlow [Tue, 6 Mar 2007 13:55:43 +0000 (13:55 +0000)]
disable -Wbad-function-cast; it's hard/impossible to work around
Simon Marlow [Tue, 6 Mar 2007 12:35:33 +0000 (12:35 +0000)]
remove vestiges of CCallable/CReturnable
Ian Lynagh [Tue, 6 Mar 2007 14:47:24 +0000 (14:47 +0000)]
Remove references to the in-tree building guide from teh old commentary
Ian Lynagh [Tue, 6 Mar 2007 14:43:41 +0000 (14:43 +0000)]
Remove old references to the in-tree building guide
Simon Marlow [Tue, 6 Mar 2007 09:35:25 +0000 (09:35 +0000)]
fix the timer_create() test
simonpj@microsoft.com [Tue, 6 Mar 2007 06:56:41 +0000 (06:56 +0000)]
Simple fix for Trac #1199 (pls merge to branch)
Simon Marlow [Mon, 5 Mar 2007 14:45:50 +0000 (14:45 +0000)]
forkProcess: startTimer() in the child, because the timer will be reset
Simon Marlow [Mon, 5 Mar 2007 14:36:43 +0000 (14:36 +0000)]
better autoconfery for timer_create()
Ian Lynagh [Sat, 3 Mar 2007 14:53:15 +0000 (14:53 +0000)]
Use Data.String rather than GHC.Base for IsString/fromString
Simon Marlow [Fri, 2 Mar 2007 11:31:04 +0000 (11:31 +0000)]
Use timer_create() for the interval timer, if available
This lets the threaded RTS use SIGVTALRM rather than SIGALRM for its
interval timer signal, so the threaded and non-threaded RTS are
compatible. It unfortunately doesn't completely fix #850/#1156, for
that we really have to use a restartable sleep instead of usleep().
Also I cleaned up the timer API a little: instead of returning an
error value that ultimately gets ignored, we now report errors from
system calls and exit.
Simon Marlow [Thu, 1 Mar 2007 13:06:28 +0000 (13:06 +0000)]
further improvements to the x86/x86_64 NCG
Ian Lynagh [Thu, 1 Mar 2007 13:03:39 +0000 (13:03 +0000)]
Fix typo in primops docs
simonpj@microsoft.com [Thu, 1 Mar 2007 11:45:13 +0000 (11:45 +0000)]
Do not go into an infinite loop when pretty-printer finds a negative indent (Trac #1176)
Simon Marlow [Thu, 1 Mar 2007 11:26:25 +0000 (11:26 +0000)]
Use the most complex form of addressing modes on x86
We had a pattern that matched (base+(index<<N)), but not
(base+(index<<N)+M).
Simon Marlow [Thu, 1 Mar 2007 11:25:13 +0000 (11:25 +0000)]
is64BitInteger: truncate to 64 bits before testing
We weren't catching some literals that actually fit in 32 bits before,
because e.g. -1 was sometimes represented as 0xffffffffffffffff in CmmInt.
Simon Marlow [Thu, 1 Mar 2007 09:57:49 +0000 (09:57 +0000)]
Fix -keep-s-file with --make
Simon Marlow [Thu, 1 Mar 2007 09:22:50 +0000 (09:22 +0000)]
some more vectored return stuff to be removed
Simon Marlow [Wed, 28 Feb 2007 16:34:42 +0000 (16:34 +0000)]
Fix #839 (Generate documentation for built-in types and primitve operations)
This patch was originally by dinko.tenev@gmail.com, but I re-recorded
it in order to add a better log message.
The effect of this patch is to add entries for primitive types in the
documentation: Int#, Char#, etc. and to document the built-in
identifiers (seq, lazy, inline, unsafeCoerce#).
Simon Marlow [Wed, 28 Feb 2007 15:50:09 +0000 (15:50 +0000)]
Fix #249 (-caf-all bugs)
There were two bugs:
* we were generating the symbol name for the CAF
cost centre from the OccName, which isn't unique enough
in the case of system-generated non-external names
* :Main.main caused problems, because we were assuming that
every top-level CAF was from the current module.
Simon Marlow [Wed, 28 Feb 2007 15:33:04 +0000 (15:33 +0000)]
use -fforce-recomp when compiling Main.hs against the ghc package.
This is necessary because GHC's recompilation checker doesn't check
across package boundaries.
Simon Marlow [Wed, 28 Feb 2007 13:07:14 +0000 (13:07 +0000)]
Remove vectored returns.
We recently discovered that they aren't a win any more, and just cost
code size.
Simon Marlow [Wed, 28 Feb 2007 12:03:19 +0000 (12:03 +0000)]
Windows: the .hp file is <prog>.exe.hp
simonpj@microsoft.com [Tue, 27 Feb 2007 23:13:13 +0000 (23:13 +0000)]
Make let-matching work in Rules again
A RULE is supposed to match even if there is an intervening let:
RULE f (x:xs) = ....
target f (let x = thing in x:xs)
It's surprisingly tricky to get this right; in effect we are doing
let-floating on the fly. I managed to get it wrong before, or at least
be over-conservative. And in "fixing" that I got it wrong again in a
different way, which made it far too conservative. In particular, it
failed to match f (let x = y+y in let z=x+y in z:xs)
because the binder x was cloned and looked "locally-bound". See the
ever growing comments with the Let rule for details.
That patch reverts to the previous story, which is still a bit too
conservative, but not so egregiously so. Fixes Romans's problem.
Ian Lynagh [Tue, 27 Feb 2007 17:45:42 +0000 (17:45 +0000)]
Fixes for the mangler on IA64
From heatsink, in trac #1150.
Simon Marlow [Tue, 27 Feb 2007 13:46:09 +0000 (13:46 +0000)]
Remove the itbls field of BCO, put itbls in with the literals
This is a simplification & minor optimisation for GHCi
Simon Marlow [Tue, 27 Feb 2007 13:43:58 +0000 (13:43 +0000)]
fix data con patch for 64-bit architectures
bjpop@csse.unimelb.edu.au [Tue, 20 Feb 2007 19:07:31 +0000 (19:07 +0000)]
Constructor names in info tables
This patch adds data constructor names into their info tables.
This is useful in the ghci debugger. It replaces the old scheme which
was based on tracking data con names in the linker.
Ian Lynagh [Tue, 27 Feb 2007 12:57:31 +0000 (12:57 +0000)]
Doc typo
sven.panne@aedion.de [Sat, 24 Feb 2007 18:01:23 +0000 (18:01 +0000)]
Don't hardwire RELEASE into configure.ac
Previously one had to edit configure.ac to build a release version. This is
evil, so one can now specify this on the configure invocation line like:
RELEASE=YES ./configure
Note that non-released versions are still the default.
Manuel M T Chakravarty [Sat, 24 Feb 2007 06:11:50 +0000 (06:11 +0000)]
Fix parsing of parallel array literals
simonpj@microsoft.com [Fri, 23 Feb 2007 14:10:32 +0000 (14:10 +0000)]
Tidy up typechecking for newtypes
Ian Lynagh [Fri, 23 Feb 2007 12:23:12 +0000 (12:23 +0000)]
pthread_key_delete wants the key itself, not a pointer to it
Pepe Iborra [Fri, 23 Feb 2007 10:29:57 +0000 (10:29 +0000)]
Wibble
Manuel M T Chakravarty [Fri, 23 Feb 2007 03:38:48 +0000 (03:38 +0000)]
Moved argument position info of ATs into tycon rhs info
Pepe Iborra [Thu, 22 Feb 2007 18:12:01 +0000 (18:12 +0000)]
Unbreak HEAD
My previous patch was creating problems with hs-boot files.
Ian Lynagh [Thu, 22 Feb 2007 14:43:06 +0000 (14:43 +0000)]
Free thread local storage on shutdown
Simon Marlow [Thu, 22 Feb 2007 10:28:23 +0000 (10:28 +0000)]
upload documentation too
Simon Marlow [Thu, 22 Feb 2007 10:03:49 +0000 (10:03 +0000)]
refactoring
Simon Marlow [Thu, 11 Jan 2007 09:19:44 +0000 (09:19 +0000)]
refactoring only: remove unused code/imports
Pepe Iborra [Wed, 21 Feb 2007 18:56:49 +0000 (18:56 +0000)]
Improving the performance of breakpoints up to 50% (by playing with laziness)
This patch performs several optimizations with the goal of minimizing the cost of building the arguments to breakpointJump:
- Group them all in a single tuple, to minimize closure creation in heap
- Wrap this with the GHC.Base.lazy combinator, to induce max laziness
- Remove as many literal strings as possible
* injecting a module-local CAF to store the module name and use that
* eliminating the package string (not needed).
Pepe Iborra [Wed, 21 Feb 2007 15:11:17 +0000 (15:11 +0000)]
Fix the behaviour of :print with functions
It now outputs "<function>" instead of showing them as thunks
Pepe Iborra [Wed, 21 Feb 2007 15:09:42 +0000 (15:09 +0000)]
Fix an incomplete pattern in the code for :print
Pepe Iborra [Mon, 19 Feb 2007 12:21:34 +0000 (12:21 +0000)]
Removed unnecessary code
The breakpointJump functions never show up in the code that the typechecker sees, as they are inserted by the desugarer later.
simonpj@microsoft.com [Wed, 21 Feb 2007 17:04:01 +0000 (17:04 +0000)]
Allow GADT syntax for newtypes
Fixes Trac #1154. Please merge.
Tests are tc225, and tcfail176.
simonpj@microsoft.com [Wed, 21 Feb 2007 16:53:12 +0000 (16:53 +0000)]
Import trimming
simonpj@microsoft.com [Wed, 21 Feb 2007 16:30:47 +0000 (16:30 +0000)]
Deal more correctly with orphan instances
Conal Eliott (Trac #1145) exposed a nasty flaw in the way in which
orphan instances are computed, when there are functional dependencies
in the class. It took me some time to figure out what was going on,
and led to more refactoring.
Briefly:
* Elaborate comments about orphan-hood and versioning added to IfaceSyn
* The is_orph field vanishes from InstEnv.Instance
* Similarly ru_orph vanishes from CoreSyn.CoreRule
* Orphan-hood is computed in MkIface.instanceToIfaceInst, and
MkIface.coreRuleToIfaceRule
Elsewhere just tidying up.
simonpj@microsoft.com [Wed, 21 Feb 2007 13:13:40 +0000 (13:13 +0000)]
Remove dead code from FunDeps
I forgot to to this when refactoring some months ago!
simonpj@microsoft.com [Wed, 21 Feb 2007 12:47:39 +0000 (12:47 +0000)]
Fix a deriving bug, arising from recent refactoring
This one is a hangover from something I did a month or two ago, but
didn't get quite right. tcSimplifyDefault should not check for no-instances;
instead the checkValidInstance in TcDeriv does so.
Conal's DeepArrow needs this fix. Test is drv015.
simonpj@microsoft.com [Wed, 21 Feb 2007 10:36:45 +0000 (10:36 +0000)]
Fix defaulting for overloaded strings
This patch fixes the typechecking of the default declaration itself,
when overloaded strings are involved. It also documents the behaviour
in the user manual.
nofib/spectral/power should work again now!
Simon Marlow [Wed, 21 Feb 2007 09:29:50 +0000 (09:29 +0000)]
MERGE from 6.6: Windows fix for stdcall foreign-import-wrapper, fixes ffi012(ghci)
simonpj@microsoft.com [Wed, 21 Feb 2007 09:11:23 +0000 (09:11 +0000)]
Fix case-merge bug that was breaking the HEAD
My re-org of the case-merging transformation introduced a bug, which led
to incorrect code. This only showed up occasionally, but it generated
incorrect code for PprC.pprCastReg in the stage-2 compiler. As a result
the stage-2 compiler ran without crashing, but itself generated bogus C.
For a change, this is one that Core Lint couldn't find, so the trail was
a bit longer. The fix is easy (and commented).
simonpj@microsoft.com [Tue, 20 Feb 2007 17:47:14 +0000 (17:47 +0000)]
Fix obscure bug in reportDeprecations
Fixes Trac #1128
Please merge to STABLE
A rather obscure bug related to -fno-implicit-prelude.
See Note [Used names with interface not loaded] in RnNames.
Easily fixed, however. Test is rn051
Simon Marlow [Tue, 20 Feb 2007 13:25:32 +0000 (13:25 +0000)]
describe the Z-encoding for __stginit symbol names (addresses #1014)
Simon Marlow [Tue, 20 Feb 2007 09:54:56 +0000 (09:54 +0000)]
freeTaskManager: don't free Tasks that are still in use
See conc059.
Simon Marlow [Tue, 20 Feb 2007 09:07:16 +0000 (09:07 +0000)]
Fix sleep delay for the non-threaded Windows RTS
This is the Windows counterpart to "Make the non-threaded-RTS
threadDelay wait at least as long as asked"
simonpj@microsoft.com [Mon, 19 Feb 2007 17:52:48 +0000 (17:52 +0000)]
Signature type variables must not be instantiated with tycons
An egregious bug in the type checker meant that it was possible for a
"signature type variable" (a MetaTv of SigTv form) to be instantatiated
with a type-constructor application. This destroys the invariant for
SigTv.
The fix is easy; adding the predicate TcType.isTyConableTyVar
Fixes Trac #1153
Pepe Iborra [Fri, 16 Feb 2007 20:10:52 +0000 (20:10 +0000)]
Fixed a bug with the :print command spotted by Bernie Pope.
Test ghci.debugger/scripts/print018 covers this
Pepe Iborra [Fri, 16 Feb 2007 19:54:24 +0000 (19:54 +0000)]
Uniform user interface
Print
"Breakpoint set at Main:26:13"
instead of
"Breakpoint set at (26,13)"
Pepe Iborra [Fri, 16 Feb 2007 19:38:10 +0000 (19:38 +0000)]
Taught :breakpoint add to guess the module name if not given
Now the user can say
> :break add 13
at the ghci prompt and the debugger will use the first top level module as the target for the breakpoint
Judah Jacobson [Wed, 14 Feb 2007 03:42:34 +0000 (03:42 +0000)]
Fix left-bias in ghci tab-completion code
Pepe Iborra [Thu, 15 Feb 2007 18:19:34 +0000 (18:19 +0000)]
Fixed a bug in the datacon names extension in the dynamic linker
My code was doing unnecessary work when trying to get hold of all the BCOs in order to sniff the datacon names.
This involved calculating the transitive closure of a relation and was causing a huge performance slowdown in GHCi, as benchmarks uncovered. It turns out that this calculation was unnecessary.
Pepe Iborra [Tue, 13 Feb 2007 20:30:43 +0000 (20:30 +0000)]
Modify the breakpoint desugaring to introduce more laziness
Benchmarks have shown that making the formation of the list of locals more lazy can improve performance of -fdebugging up to 50% in some cases
Simon Marlow [Thu, 15 Feb 2007 11:58:52 +0000 (11:58 +0000)]
When the pipeline just copies the file, prepend a LINE pragma
For example, "ghc -E Foo.hs -o Foo.bar" just copies Foo.hs to
Foo.bar. This patch adds a LINE pragma to the beginning of Foo.bar so
that further processing can track the location of the original file.
The motiviation for this is bug #1044. When generating Haddock docs,
we preprocess the .hs to a .raw-hs, sometimes this doesn't involve any
actual preprocessing and in those cases we lose track of the original
filename.
Simon Marlow [Wed, 14 Feb 2007 14:47:16 +0000 (14:47 +0000)]
add a ToDo, reference bug #1147
Simon Marlow [Wed, 14 Feb 2007 12:04:01 +0000 (12:04 +0000)]
fix closure_sizeW_() for AP closures
Since thunks grew an extra padding word in GHC 6.6, closure_sizeW()
has been wrong for AP closures because it assumed compatible layout
between PAPs and APs. One symptom is that the compacting GC would
crash if it encountered an AP. APs conly crop up in GHCi or
when using asynchronous exceptions.
Fixes #1010
andy@galois.com [Tue, 13 Feb 2007 22:02:03 +0000 (22:02 +0000)]
Fixing bad allocation of tix box breakpointing array.
andy@galois.com [Tue, 13 Feb 2007 18:44:02 +0000 (18:44 +0000)]
Using RTS debug tracing support inside Hpc.c
simonpj@microsoft.com [Fri, 9 Feb 2007 17:36:45 +0000 (17:36 +0000)]
Major improvement to SpecConstr
This patch improves the SpecConstr pass, by
a) making it work with join points
b) making it generate specialisations transitively
As part of it, SpecConstr now carries a substitution with it, which
runs over the whole program as it goes. This turned out to be
a big win; simplified the implementation quite a bit.
I have *disabled* the specialisation on lambdas; it's pretty fragile,
and sometimes generates more and more specialisations. Something to
come back to, perhaps.
I rejigged the flag-handling a bit. Now the specification of passes
in DynFlags is a bit nicer; see
- optLevelFlags top-level data structure
- runWhen function
- CoreDoPasses constructor
There are now command-line flags
-fspec-constr
-fliberate-case
-fspec-threshold=N
which do the obvious thing. -O2 switches on both spec-constr and liberate-case.
You can use -fno-liberate-case, -fno-spec-constr after -O2 to switch them off again.
The spec-threshold applies to both these transformations; default value 200 for now.
simonpj@microsoft.com [Fri, 9 Feb 2007 17:29:38 +0000 (17:29 +0000)]
Refactor the simplifier's treatment of case expressions
(NB: this patch could conceivably require some bits of the
following SpecConstr patch to compile cleanly. It's conceptually
independent, but I'm not 100% certain that I've included all
the necessary bits here.)
This patch cleans up the simplifier's handling of various
otimisations for case expressions, notably
- case elimination (discarding the case altogether)
- merging identical alternatives
- discarding impossible alternative
- merging nested cases
Previously this was partly handled before, and partly after,
simplifying the case alternatives. The trouble with that is
that the dead-ness information on the case binders gets munged
during simplification, and that turned out to mean that
case elmination essentially never happened -- stupid.
Now I've moved it all to before simplifying the alterntives.
In fact this reduces the amount of code, I think, and it's
certainly tidier. I don't think there is any loss.
Simon Marlow [Fri, 9 Feb 2007 14:08:18 +0000 (14:08 +0000)]
Ticky is an RTS-only way; also fix collateral damage to other ways
The ticky static flag was being poked too early, which lead to
breakage in the -prof way amongst other things. I've installed some
sanity checking to make sure we catch this earlier if it happens again.
Simon Marlow [Thu, 8 Feb 2007 15:13:23 +0000 (15:13 +0000)]
Make it a warning, not an error, if the version date cannot be determined
This happens when the build tree is a link-tree to the source tree,
because lndir will normally omit the _darcs directory.
Simon Marlow [Thu, 8 Feb 2007 12:15:55 +0000 (12:15 +0000)]
make VERSION a dependency of dist
Simon Marlow [Thu, 8 Feb 2007 12:07:12 +0000 (12:07 +0000)]
fix cut-and-pasto in code for binary-dist upload
Kirsten Chevalier [Wed, 7 Feb 2007 22:59:57 +0000 (22:59 +0000)]
Fixed typo in devel1 flavor
Under GhcStage2HcOpts, "O" should be "-O"; fixed.
Pepe Iborra [Wed, 7 Feb 2007 20:59:47 +0000 (20:59 +0000)]
Type reconstruction/RTTI: improve handling of newtypes
Newtypes have always been a problem because they are not there at runtime, but we need to take them into account.
Tests ghci.debugger/print011 and ghci.debugger/print012 cover this
Pepe Iborra [Wed, 7 Feb 2007 08:21:10 +0000 (08:21 +0000)]
Optimize dynamic breakpoints for speed
Made a bit faster the test which gets done every time a running program hits a dynamic breakpoint. I moved the bounds checking inside a DEBUG pragma and replaced (IArray.!) for unsafeAt
Ian Lynagh [Wed, 7 Feb 2007 16:53:44 +0000 (16:53 +0000)]
Teach darcs-all how to get testsuite and nofib