| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Simplify the bitmap-generating code by collecting all the pointer
words rather than all the non-pointer words, and then subtracting
these from a bitmap made of all ones. This is simpler because we only
have to look in the bindings, rather than combining information from
bindings and the free stack slot list.
|
|
|
|
|
|
|
|
| |
Expand bitmaps to cover the full size of the stack frame. Previously
the bitmap would stop at the last non-zero bit, which might shorten
the bitmap by one or more words. The behaviour used to be correct,
but with the eval/apply changes bitmaps must now cover the entire
stack frame rather than everything up to the last non-pointer word.
|
|
|
|
| |
Comment fix.
|
|
|
|
|
| |
Make the new info-table construction code word without instance Bits
Int (i.e. GHC 4.08.x). This probably makes it more correct, too.
|
|
|
|
| |
Tidy up info table generation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Merge the eval-apply-branch on to the HEAD
------------------------------------------
This is a change to GHC's evaluation model in order to ultimately make
GHC more portable and to reduce complexity in some areas.
At some point we'll update the commentary to describe the new state of
the RTS. Pending that, the highlights of this change are:
- No more Su. The Su register is gone, update frames are one
word smaller.
- Slow-entry points and arg checks are gone. Unknown function calls
are handled by automatically-generated RTS entry points (AutoApply.hc,
generated by the program in utils/genapply).
- The stack layout is stricter: there are no "pending arguments" on
the stack any more, the stack is always strictly a sequence of
stack frames.
This means that there's no need for LOOKS_LIKE_GHC_INFO() or
LOOKS_LIKE_STATIC_CLOSURE() any more, and GHC doesn't need to know
how to find the boundary between the text and data segments (BIG WIN!).
- A couple of nasty hacks in the mangler caused by the neet to
identify closure ptrs vs. info tables have gone away.
- Info tables are a bit more complicated. See InfoTables.h for the
details.
- As a side effect, GHCi can now deal with polymorphic seq. Some bugs
in GHCi which affected primitives and unboxed tuples are now
fixed.
- Binary sizes are reduced by about 7% on x86. Performance is roughly
similar, some programs get faster while some get slower. I've seen
GHCi perform worse on some examples, but haven't investigated
further yet (GHCi performance *should* be about the same or better
in theory).
- Internally the code generator is rather better organised. I've moved
info-table generation from the NCG into the main codeGen where it is
shared with the C back-end; info tables are now emitted as arrays
of words in both back-ends. The NCG is one step closer to being able
to support profiling.
This has all been fairly thoroughly tested, but no doubt I've messed
up the commit in some way.
|
|
|
|
| |
Behave decently if there are NoStubs in ForeignStubs
|
|
|
|
| |
Import wibbles
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--------------------------------------
Make Template Haskell into the HEAD
--------------------------------------
This massive commit transfers to the HEAD all the stuff that
Simon and Tim have been doing on Template Haskell. The
meta-haskell-branch is no more!
WARNING: make sure that you
* Update your links if you are using link trees.
Some modules have been added, some have gone away.
* Do 'make clean' in all library trees.
The interface file format has changed, and you can
get strange panics (sadly) if GHC tries to read old interface files:
e.g. ghc-5.05: panic! (the `impossible' happened, GHC version 5.05):
Binary.get(TyClDecl): ForeignType
* You need to recompile the rts too; Linker.c has changed
However the libraries are almost unaltered; just a tiny change in
Base, and to the exports in Prelude.
NOTE: so far as TH itself is concerned, expression splices work
fine, but declaration splices are not complete.
---------------
The main change
---------------
The main structural change: renaming and typechecking have to be
interleaved, because we can't rename stuff after a declaration splice
until after we've typechecked the stuff before (and the splice
itself).
* Combine the renamer and typecheker monads into one
(TcRnMonad, TcRnTypes)
These two replace TcMonad and RnMonad
* Give them a single 'driver' (TcRnDriver). This driver
replaces TcModule.lhs and Rename.lhs
* The haskell-src library package has a module
Language/Haskell/THSyntax
which defines the Haskell data type seen by the TH programmer.
* New modules:
hsSyn/Convert.hs converts THSyntax -> HsSyn
deSugar/DsMeta.hs converts HsSyn -> THSyntax
* New module typecheck/TcSplice type-checks Template Haskell splices.
-------------
Linking stuff
-------------
* ByteCodeLink has been split into
ByteCodeLink (which links)
ByteCodeAsm (which assembles)
* New module ghci/ObjLink is the object-code linker.
* compMan/CmLink is removed entirely (was out of place)
Ditto CmTypes (which was tiny)
* Linker.c initialises the linker when it is first used (no need to call
initLinker any more). Template Haskell makes it harder to know when
and whether to initialise the linker.
-------------------------------------
Gathering the LIE in the type checker
-------------------------------------
* Instead of explicitly gathering constraints in the LIE
tcExpr :: RenamedExpr -> TcM (TypecheckedExpr, LIE)
we now dump the constraints into a mutable varabiable carried
by the monad, so we get
tcExpr :: RenamedExpr -> TcM TypecheckedExpr
Much less clutter in the code, and more efficient too.
(Originally suggested by Mark Shields.)
-----------------
Remove "SysNames"
-----------------
Because the renamer and the type checker were entirely separate,
we had to carry some rather tiresome implicit binders (or "SysNames")
along inside some of the HsDecl data structures. They were both
tiresome and fragile.
Now that the typechecker and renamer are more intimately coupled,
we can eliminate SysNames (well, mostly... default methods still
carry something similar).
-------------
Clean up HsPat
-------------
One big clean up is this: instead of having two HsPat types (InPat and
OutPat), they are now combined into one. This is more consistent with
the way that HsExpr etc is handled; there are some 'Out' constructors
for the type checker output.
So:
HsPat.InPat --> HsPat.Pat
HsPat.OutPat --> HsPat.Pat
No 'pat' type parameter in HsExpr, HsBinds, etc
Constructor patterns are nicer now: they use
HsPat.HsConDetails
for the three cases of constructor patterns:
prefix, infix, and record-bindings
The *same* data type HsConDetails is used in the type
declaration of the data type (HsDecls.TyData)
Lots of associated clean-up operations here and there. Less code.
Everything is wonderful.
|
|
|
|
| |
Remove bogus warning
|
|
|
|
|
|
|
|
|
|
| |
Recent changes to simplify PrimRep had introduced a bug: the heap
check code was assuming that anything with PtrRep representation was
enterable. This isn't the case for the unpointed primitive types
(eg. ByteArray#), resulting in the ARR_WORDS crash in last night's
build.
This bug isn't in STABLE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Housekeeping:
- The main goal is to remove dependencies on hslibs for a
bootstrapped compiler, leaving only a requirement that the
packages base, haskell98 and readline are built in stage 1 in
order to bootstrap. We're almost there: Posix is still required
for signal handling, but all other dependencies on hslibs are now
gone.
Uses of Addr and ByteArray/MutableByteArray array are all gone
from the compiler. PrimPacked defines the Ptr type for GHC 4.08
(which didn't have it), and it defines simple BA and MBA types to
replace uses of ByteArray and MutableByteArray respectively.
- Clean up import lists. HsVersions.h now defines macros for some
modules which have moved between GHC versions. eg. one now
imports 'GLAEXTS' to get at unboxed types and primops in the
compiler.
Many import lists have been sorted as per the recommendations in
the new style guidelines in the commentary.
I've built the compiler with GHC 4.08.2, 5.00.2, 5.02.3, 5.04 and
itself, and everything still works here. Doubtless I've got something
wrong, though.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PrimRep Cleanup
- Remove all PrimReps which were just different flavours of
PtrRep. Now, everything which is a pointer to a closure of
some kind is always a PtrRep.
- Three of the deleted PrimReps, namely ArrayRep, ByteArrayRep,
and ForeignObj rep, had a subtle reason for their existence:
the abstract C pretty-printer(!) used them to decide whether
to apply a shim to an outgoing C-call argument: a ByteArrayRep
argument would be adjusted to point past the object header,
for example.
I've changed this to happen in a much more reasonable and
obvious way: there are now explict macros in AbsCSyn to do the
adjustment, and the code generator makes calls to these as
necessary. Slightly less hackery is necessary in the NCG as
a result.
|
|
|
|
|
|
|
|
|
|
| |
Back off from including the interface file version in the module init
label - we might not recompile modules which depend on the current
one, even if its version changes. Thanks to Sigbjorn for pointing
this out.
We still include the way, however, so we'll still catch cases of
linking modules compiled in different ways.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement a primitive failsafe mechanism for protecting against
linking inconsistent object files. The idea is that if object files
which were compiled in the wrong order (non-dependency order) or
compiled in different ways (eg. profiled vs. non-profiled) are linked
together, a link error will result.
This is achieved by adding the module version and the way to the
module init label. For example, previously the init label for a
module Foo was named
__stginit_Foo
now it is named
__stginit_Foo_<version>_<way>
where <version> is the module version of Foo (same as the version in
the interface file), and <way> is the current way (or empty).
We also have to have a way to refer to the old plain init label, for
using as the argument to shutdownHaskell() in a program using foreign
exports. So the old label now points to a jump instruction which
transfers control to the new init code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
---------------------------------------
Rehash the handling of SeqOp
---------------------------------------
See the comments in the commentary (Cunning Prelude Code).
* Expunge SeqOp altogether
* Add GHC.Base.lazy :: a -> a
to GHC.Base
* Add GHC.Base.lazy
to basicTypes/MkId. The idea is that this defn will over-ride
the info from GHC.Base.hi, thereby hiding strictness and
unfolding
* Make stranal/WorkWrap do a "manual inlining" for GHC.Base.lazy
This happens nicely after the strictness analyser has run.
* Expunge the SeqOp/ParOp magic in CorePrep
* Expunge the RULE for seq in PrelRules
* Change the defns of pseq/par in GHC.Conc to:
{-# INLINE pseq #-}
pseq :: a -> b -> b
pseq x y = x `seq` lazy y
{-# INLINE par #-}
par :: a -> b -> b
par x y = case (par# x) of { _ -> lazy y }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FastString cleanup, stage 1.
The FastString type is no longer a mixture of hashed strings and
literal strings, it contains hashed strings only with O(1) comparison
(except for UnicodeStr, but that will also go away in due course). To
create a literal instance of FastString, use FSLIT("..").
By far the most common use of the old literal version of FastString
was in the pattern
ptext SLIT("...")
this combination still works, although it doesn't go via FastString
any more. The next stage will be to remove the need to use this
special combination at all, using a RULE.
To convert a FastString into an SDoc, now use 'ftext' instead of
'ptext'.
I've also removed all the FAST_STRING related macros from HsVersions.h
except for SLIT and FSLIT, just use the relevant functions from
FastString instead.
|
|
|
|
| |
Friday afternoon pet peeve removal: define (Util.notNull :: [a] -> Bool) and use it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
------------------------------------
Change the treatment of the stupid
context on data constructors
-----------------------------------
Data types can have a context:
data (Eq a, Ord b) => T a b = T1 a b | T2 a
and that makes the constructors have a context too
(notice that T2's context is "thinned"):
T1 :: (Eq a, Ord b) => a -> b -> T a b
T2 :: (Eq a) => a -> T a b
Furthermore, this context pops up when pattern matching
(though GHC hasn't implemented this, but it is in H98, and
I've fixed GHC so that it now does):
f (T2 x) = x
gets inferred type
f :: Eq a => T a b -> a
I say the context is "stupid" because the dictionaries passed
are immediately discarded -- they do nothing and have no benefit.
It's a flaw in the language.
Up to now I have put this stupid context into the type of
the "wrapper" constructors functions, T1 and T2, but that turned
out to be jolly inconvenient for generics, and record update, and
other functions that build values of type T (because they don't
have suitable dictionaries available).
So now I've taken the stupid context out. I simply deal with
it separately in the type checker on occurrences of a constructor,
either in an expression or in a pattern.
To this end
* Lots of changes in DataCon, MkId
* New function Inst.tcInstDataCon to instantiate a data constructor
I also took the opportunity to
* Rename
dataConId --> dataConWorkId
for consistency.
* Tidied up MkId.rebuildConArgs quite a bit, and renamed it
mkReboxingAlt
* Add function DataCon.dataConExistentialTyVars, with the obvious meaning
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the interface file parser, and move .hi-boot parsing into the
main parser. The syntax of .hi-boot files is now greatly improved in
terms of readability; here's an example:
module M where
data T
f :: T -> GHC.Base.Int
note that
(a) layout can be used
(b) there's no explcit export list; everything declared
is implicitly exported
(c) Z-encoding of names is no longer required
(d) Any identifier not declared in the current module must
still be quailified with the module which originally
defined it (eg. GHC.Base.Int above).
We'd like to relax (d), but that will come later.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
------------------------
Change
GlobalName --> ExternalName
LocalName -> InternalName
------------------------
For a long time there's been terminological confusion between
GlobalName vs LocalName (property of a Name)
GlobalId vs LocalId (property of an Id)
I've now changed the terminology for Name to be
ExternalName vs InternalName
I've also added quite a bit of documentation in the Commentary.
|
|
|
|
| |
Import wibbles
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit affects ticky-ticky profiling. Entry counts for thunks,
constructors, functions (standard and direct) and indirections are split into
two counters, one for entries to static closures and one for entries to dynamic
closures.
This required changing ticky-ticky details in the RTS (introducing new counters
and corresponding TICK_* events), and also changing the code generator to
generate the new event names (eg. TICK_ENT_THK is replaced by
TICK_ENT_STATIC_THK and TICK_ENT_DYN_THK).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switch over to the new hierarchical libraries
---------------------------------------------
This commit reorganises our libraries to use the new hierarchical
module namespace extension.
The basic story is this:
- fptools/libraries contains the new hierarchical libraries.
Everything in here is "clean", i.e. most deprecated stuff has
been removed.
- fptools/libraries/base is the new base package
(replacing "std") and contains roughly what was previously
in std, lang, and concurrent, minus deprecated stuff.
Things that are *not allowed* in libraries/base include:
Addr, ForeignObj, ByteArray, MutableByteArray,
_casm_, _ccall_, ``'', PrimIO
For ByteArrays and MutableByteArrays we use UArray and
STUArray/IOUArray respectively now.
Modules previously called PrelFoo are now under
fptools/libraries/GHC. eg. PrelBase is now GHC.Base.
- fptools/libraries/haskell98 provides the Haskell 98 std.
libraries (Char, IO, Numeric etc.) as a package. This
package is enabled by default.
- fptools/libraries/network is a rearranged version of
the existing net package (the old package net is still
available; see below).
- Other packages will migrate to fptools/libraries in
due course.
NB. you need to checkout fptools/libraries as well as
fptools/hslibs now. The nightly build scripts will need to be
tweaked.
- fptools/hslibs still contains (almost) the same stuff as before.
Where libraries have moved into the new hierarchy, the hslibs
version contains a "stub" that just re-exports the new version.
The idea is that code will gradually migrate from fptools/hslibs
into fptools/libraries as it gets cleaned up, and in a version or
two we can remove the old packages altogether.
- I've taken the opportunity to make some changes to the build
system, ripping out the old hslibs Makefile stuff from
mk/target.mk; the new package building Makefile code is in
mk/package.mk (auto-included from mk/target.mk).
The main improvement is that packages now register themselves at
make boot time using ghc-pkg, and the monolithic package.conf
in ghc/driver is gone.
I've updated the standard packages but haven't tested win32,
graphics, xlib, object-io, or OpenGL yet. The Makefiles in
these packages may need some further tweaks, and they'll need
pkg.conf.in files added.
- Unfortunately all this rearrangement meant I had to bump the
interface-file version and create a bunch of .hi-boot-6 files :-(
|
|
|
|
| |
Imports only
|
|
|
|
| |
cope with the fact that StgTickyHeader is no more
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
----------------------
Zero-constructor types
----------------------
If we have
data T
data S = MkS !T
we were getting a crash in the compiler because ctrlRetConvAlg
didn't know what to do for zero-constructor types.
This fix arbitrarily says that they use a non-vectored return,
which fixes the crash. (Since they only have bottom values,
the return never gets exercised, but GC and exception handling
should work.)
What is still unclear is how we handle data types that are defined
with zero constructors in an hi-boot file. I think that Bad Things
may well happen if you do a 'seq' on them before we get up to the
definition. (e.g. as a result of this fix we'll say "unvectored"
whereas the truth may be "vectored".) This obviously doesn't happen
much (because at present we'd get a compiler crash in ctrlRetConvAlg,
but we should look into it.
|
|
|
|
|
|
| |
Fix for previous commit: use the SRT on the top-level constructor when
deciding whether it has any CAF references, since not all top-level
bindings have CgInfo pinned on.
|
|
|
|
| |
Add comment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Implement a small GC optimisation: when a static constructor has
been determined to have no (indirect) CAF references, we set its
static link field to a non-zero value (currently 1). This prevents
the garbage collector from traversing this closure and transitively
everything it points to, and thus should speed up GC a little.
- Omit the static link field from static constructors which have no
pointer fields (i.e. they are CONSTR_NOCAF_STATIC).
- Add the padding words and the static link field for a static
constructor at (AbsC) code generation time, rather than in the back
ends. This eliminates some duplication between PprAbsC and
AbsCStixGen.
|
|
|
|
|
|
| |
Generate better code for case-of-literal (i.e. just do the
assignment). These crop up now that the simplifier is a bit more
careful about duplicating literal strings.
|
|
|
|
| |
shiftery #ifdefs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--------------------------------------------
Translate out PrimOps at the AbstractC level
--------------------------------------------
This is the first in what might be a series of changes intended
to make GHC less dependent on its C back end. The main change is
to translate PrimOps into vanilla abstract C inside the compiler,
rather than having to duplicate that work in each code generation
route. The main changes are:
* A new type, MachOp, in compiler/absCSyn/MachOp.hs. A MachOp
is a primitive operation which we can reasonably expect the
native code generators to implement. The set is quite small
and unlikely to change much, if at all.
* Translations from PrimOps to MachOps, at the end of
absCSyn/AbsCUtils. This should perhaps be moved to a different
module, but it is hard to see how to do this without creating
a circular dep between it and AbsCUtils.
* The x86 insn selector has been updated to track these changes. The
sparc insn selector remains to be done.
As a result of this, it is possible to compile much more code via the
NCG than before. Almost all the Prelude can be compiled with it.
Currently it does not know how to do 64-bit code generation. Once
this is fixed, the entire Prelude should be compilable that way.
I also took the opportunity to clean up the NCG infrastructure.
The old Stix data type has been split into StixStmt (statements)
and StixExpr (now denoting values only). This removes a class
of impossible constructions and clarifies the NCG.
Still to do, in no particular order:
* String and literal lifting, currently done in the NCG at the top
of nativeGen/MachCode, should be done in the AbstractC flattener,
for the benefit of all targets.
* Further cleaning up of Stix assignments.
* Remove word-size dependency from Abstract C. (should be easy).
* Translate out MagicIds in the AbsC -> Stix translation, not
in the Stix constant folder. (!)
Testsuite failures caused by this:
* memo001 - fails (segfaults) for some unknown reason now.
* arith003 - wrong answer in gcdInt boundary cases.
* arith011 - wrong answer for shifts >= word size.
* cg044 - wrong answer for some FP boundary cases.
These should be fixed, but I don't think they are mission-critical for
anyone.
|
|
|
|
|
| |
minor tidyup - move CollectedCCs tysyn to CostCentre (from SCCFinal), and
make use of it where that cost-centre info triple is being passed&returned.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a long-standing bug in the cost attribution of cost-center stacks.
The problem case is this:
let z = _scc_ "z" f x
in ... z ...
previously we were attributing the cost of allocating the closure 'z'
to the enclosing cost center stack (CCCS), when it should really be
attributed to "z":CCCS. The effects are particularly visible with
retainer profiling, because the closure retaining 'f' and 'x' would
show up with the wrong CCS attached.
To fix this, we need a new form of CCS representation internally:
'PushCC CostCentre CostCentreStack' which subsumes (and therefore
replaces) SingletonCCS. SingletonCCS is now represented by 'PushCC cc
NoCCS'.
The CCS argument to SET_HDR may now be an arbitrary expression, such
as PushCostCentre(CCCS,foo_cc), as may be the argument to CCS_ALLOC().
So we combine SET_HDR and CCS_ALLOC into a single macro, SET_HDR_, to
avoid repeated calls to PushCostCentre().
|
|
|
|
| |
Call LDV_ENTER() on entry to a constructor in profiling mode.
|
|
|
|
| |
Call LDV_ENTER() on entry to a thunk or function in profiling mode.
|
|
|
|
|
|
|
|
| |
Add
ldvEnter :: Code
for LDV profiling: it records that the closure pointed to by R1 has
just been entered.
|
|
|
|
|
| |
We don't need to consider Hp as a volatile register across C calls; it
is already saved by the CALLER_SAVES_SYSTEM macro.
|
|
|
|
| |
Tidy up imports
|
|
|
|
| |
Remove the heap-check-size panic, following the RTS fixes for this problem.
|
|
|
|
| |
Change an ASSERT into an ASSERT2
|
|
|
|
|
| |
- only generate split markers if we're splitting
- remove a couple of unused imports
|
|
|
|
| |
follow-on from prev. commit; more tidyups
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Pet peeve removal / code tidyup, replaced various sub-optimal
uses of 'length' with something a bit better, i.e., replaced
the following patterns
* length as `cmpOp` length bs
* length as `cmpOp` val -- incl. uses where val == 1 and val == 0
* {take,drop,splitAt} (length as) bs
* length [ () | pat <- as ]
with uses of misc Util functions.
I'd be surprised if there's a noticeable reduction in running
times as a result of these changes, but every little bit helps.
[ The changes have been tested wrt testsuite/ - I'm seeing a couple
of unexpected breakages coming from CorePrep, but I'm currently
assuming that these are due to other recent changes. ]
- compMan/CompManager.lhs: restored 4.08 compilability + some code
cleanup.
None of these changes are HEADworthy.
|
|
|
|
| |
Fix codegen globalisation for -split-objs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
----------------------------------------------
The CoreTidy/CorePrep/CoreToStg saga continues
[actually, this commit mostly completes the job]
----------------------------------------------
DO NOT MERGE!
* CorePrep injects implicit bindings, not the type checker,
nor CgConTbls. (This way, all the code generators see
them, so no need to fiddle with the byte code generator.)
As a result, all bindings in the module are for LocalIds,
at least until CoreTidy. This is a Big Win.
Hence remove nasty isImplicitId test in update_bndr in
SimplCore and DmdAnal
* hasNoBinding is no longer true of a dataConId (worker).
There's an implicit curried binding for it.
* Remove yukky test in exprIsTrivial that did not regard
a hasNoBinding Id as trivial; similarly in SimplUtils.tryEtaReduce
* In CoreTidy, get the names to avoid from the type env.
That way it includes implicit bindings too.
* CoreTidy set the Arity of a top-level Id permanently;
it's up to the rest of the compiler to respect it.
Notably, CorePrep uses etaExpand to make the manifest arity
match the claimed arity.
* As a result, nuke CgArity, so that CgInfo now contains only
CafInfo. The CafInfo is knot-tied as before.
Other things
* In Simplify.simplLazyBind, be a bit keener to float bindings
out if it's a top-level binding.
|
|
|
|
| |
Tidy up maybeGlobaliseId
|
|
|
|
|
| |
Comment out a bogus assertion, and add a comment to describe why it
isn't necessarily true (see the comment for details).
|
|
|
|
| |
top-level constructor workers should have CCS_SUBSUMED, not NO_CCS.
|