- 25 Jul, 2006 1 commit
-
-
Simon Marlow authored
The I# constructor is always removed when we make a unique later anyway, so this just saves a bit of time and allocation.
-
- 07 Apr, 2006 1 commit
-
-
Simon Marlow authored
Most of the other users of the fptools build system have migrated to Cabal, and with the move to darcs we can now flatten the source tree without losing history, so here goes. The main change is that the ghc/ subdir is gone, and most of what it contained is now at the top level. The build system now makes no pretense at being multi-project, it is just the GHC build system. No doubt this will break many things, and there will be a period of instability while we fix the dependencies. A straightforward build should work, but I haven't yet fixed binary/source distributions. Changes to the Building Guide will follow, too.
-
- 31 Mar, 2005 1 commit
-
-
simonmar authored
foreign import syntax
-
- 06 Nov, 2003 1 commit
-
-
simonpj authored
------------------------------------ Major increment for Template Haskell ------------------------------------ 1. New abstract data type "Name" which appears where String used to be. E.g. data Exp = VarE Name | ... 2. New syntax 'x and ''T, for quoting Names. It's rather like [| x |] and [t| T |] respectively, except that a) it's non-monadic: 'x :: Name b) you get a Name not an Exp or Type 3. reify is an ordinary function reify :: Name -> Q Info New data type Info which tells what TH knows about Name 4. Local variables work properly. So this works now (crashed before): f x = $( [| x |] ) 5. THSyntax is split up into three modules: Language.Haskell.TH TH "clients" import this Language.Haskell.TH.THSyntax data type declarations and internal stuff Language.Haskell.TH.THLib Support library code (all re-exported by TH), including smart constructors and pretty printer 6. Error reporting and recovery are in (not yet well tested) report :: Bool {- True <=> fatal -} -> String -> Q () recover :: Q a -> Q a -> Q a 7. Can find current module currentModule :: Q String Much other cleaning up, needless to say.
-
- 17 Sep, 2003 1 commit
-
-
panne authored
Simplified my previous quick-fix-after-some-beers
-
- 16 Sep, 2003 1 commit
-
-
panne authored
Make "one of the most hammered bits in the whole compiler" (quotation from the source code :-) compile without _ccall_
-
- 29 Aug, 2002 1 commit
-
-
simonmar authored
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.
-
- 01 Apr, 2002 1 commit
-
-
simonpj authored
Comments
-
- 11 Dec, 2001 1 commit
-
-
panne authored
Never-ending story, part #2: The shifting continues...
-
- 18 May, 2001 1 commit
-
-
simonpj authored
----------------------------- Get unbox-strict-fields right ----------------------------- The problem was that when a library was compiled *without* -funbox-strict-fields, and the main program was compiled *with* that flag, we were wrongly treating the fields of imported data types as unboxed. To fix this I added an extra constructor to StrictnessMark to express whether the "!" annotation came from an interface file (don't fiddle) or a source file (decide whether to unbox). On the way I tided things up: * StrictnessMark moves to Demand.lhs, and doesn't have the extra DataCon fields that kept it in DataCon before. * HsDecls.BangType has one constructor, not three, with a StrictnessMark field. * DataCon keeps track of its strictness signature (dcRepStrictness), but not its "user strict marks" (which were never used) * All the functions, like getUniquesDs, that used to take an Int saying how many uniques to allocate, now return an infinite list. This saves arguments and hassle. But it involved touching quite a few files. * rebuildConArgs takes a list of Uniques to use as its unique supply. This means I could combine DsUtils.rebuildConArgs with MkId.rebuildConArgs (hooray; the main point of the previous change) I also tidied up one or two error messages
-
- 07 Dec, 2000 1 commit
-
-
simonpj authored
Do a better job of eta expansion. This showed up in one of Manuel's programs, where he got code like: $wsimpleGen ww (\ i :: Int -> case i of wild1 { I# i# -> case w of wild2 { I# e# -> __coerce (ST RealWorld ()) (\ s# :: (State# RealWorld) -> case writeIntArray# @ RealWorld mba# i# e# s# of s2#1 { __DEFAULT -> (# s2#1, () #) }) } }) s2# The argument wasn't eta expanded, so it got right through to the code generator as two separte lambdas. Needless to say, I fiddled around with things in a vain attempt to tidy them up. Yell if anything seems to go wrong, or perfomance drops on any programs.
-
- 15 Jun, 2000 1 commit
-
-
sewardj authored
Major thing: new register allocator. Brief description follows. Should correctly handle code with loops in, even though we don't generate any such at the moment. A lot of comments. The previous machinery for spilling is retained, as is the idea of a fast-and-easy initial allocation attempt intended to deal with the majority of code blocks (about 60% on x86) very cheaply. Many comments explaining in detail how it works :-) The Stix inliner is now on by default. Integer code seems to run within about 1% of that -fvia-C. x86 fp code is significantly worse, up to about 30% slower, depending on the amount of fp activity. Minor thing: lazyfication of the top-level NCG plumbing, so that the NCG doesn't require any greater residency than compiling to C, just a bit more time. Created lazyThenUs and lazyMapUs for this purpose. The new allocator is somewhat, although not catastophically, slower than the old one. Fixing of the long-standing NCG space leak more than makes up for it; overall hsc run-time is down about 5%, due to significantly reduced GC time. -------------------------------------------------------------------- Instructions are numbered sequentially, starting at zero. A flow edge (FE) is a pair of insn numbers (MkFE Int Int) denoting a possible flow of control from the first insn to the second. The input to the register allocator is a list of instructions, which mention Regs. A Reg can be a RealReg -- a real machine reg -- or a VirtualReg, which carries a unique. After allocation, all the VirtualReg references will have been converted into RealRegs, and possibly some spill code will have been inserted. The heart of the register allocator works in four phases. 1. (find_flow_edges) Calculate all the FEs for the code list. Return them not as a [FE], but implicitly, as a pair of Array Int [Int], being the successor and predecessor maps for instructions. 2. (calc_liveness) Returns a FiniteMap FE RegSet. For each FE, indicates the set of registers live on that FE. Note that the set includes both RealRegs and VirtualRegs. The former appear because the code could mention fixed register usages, and we need to take them into account from the start. 3. (calc_live_range_sets) Invert the above mapping, giving a FiniteMap Reg FeSet, indicating, for each virtual and real reg mentioned in the code, which FEs it is live on. 4. (calc_vreg_to_rreg_mapping) For virtual reg, try and find an allocatable real register for it. Each real register has a "current commitment", indicating the set of FEs it is currently live on. A virtual reg v can be assigned to real reg r iff v's live-fe-set does not intersect with r's current commitment fe-set. If the assignment is made, v's live-fe-set is union'd into r's current commitment fe-set. There is also the minor restriction that v and r must be of the same register class (integer or floating). Once this mapping is established, we simply apply it to the input insns, and that's it. If no suitable real register can be found, the vreg is mapped to itself, and we deem allocation to have failed. The partially allocated code is returned. The higher echelons of the allocator (doGeneralAlloc and runRegAlloc) then cooperate to insert spill code and re-run allocation, until a successful allocation is found.
-
- 11 May, 1999 1 commit
-
-
keithw authored
(this is number 4 of 9 commits to be applied together) The major purpose of this commit is to introduce usage information and usage analysis into the compiler, per the paper _Once Upon a Polymorphic Type_ (Keith Wansbrough and Simon Peyton Jones, POPL'99, and Glasgow TR-1998-19). Usage information has been added to types, in the form of a new kind of NoteTy: (UsgNote UsageAnn(UsOnce|UsMany|UsVar UVar)). Usages print as __o (once), __m (many, usually omitted), or (not in interface files) __uvxxxx. Usage annotations should only appear at certain places in a type (see the paper). The `default' annotation is __m, and so an omitted annotation implies __m. Utility functions for handling usage annotations are provided in Type. If the compiler is built with -DUSMANY (a flag intended for use in debugging by KSW only), __m are *required* and may not be omitted. The major constraint is that type arguments (eg to mkAppTy) must be unannotated on top. To maintain this invariant, many functions required the insertion of Type.unUsgTy (removing annot from top of a type) or UsageSPUtils.unannotTy (removing all annotations from a type). A function returning usage-annotated types for primops has been added to PrimOp. A new kind of Note, (TermUsg UsageAnn), has been added to annotate Terms. This note is *not* printed in interface files, and for the present does not escape the internals of the usage inference engine.
-
- 29 Jan, 1999 1 commit
-
-
simonm authored
zh --> Zh
-
- 28 Jan, 1999 1 commit
-
-
simonm authored
Zh --> zh
-
- 18 Dec, 1998 1 commit
-
-
simonpj authored
Another big commit from Simon. Actually, the last one didn't all go into the main trunk; because of a CVS glitch it ended up in the wrong branch. So this commit includes: * Scoped type variables * Warnings for unused variables should work now (they didn't before) * Simplifier improvements: - Much better treatment of strict arguments - Better treatment of bottoming Ids - No need for w/w split for fns that are merely strict - Fewer iterations needed, I hope * Less gratuitous renaming in interface files and abs C * OccName is a separate module, and is an abstract data type I think the whole Prelude and Exts libraries compile correctly. Something isn't quite right about typechecking existentials though.
-
- 02 Dec, 1998 1 commit
-
-
simonm authored
Move 4.01 onto the main trunk.
-
- 03 Feb, 1998 1 commit
-
-
simonm authored
- Fixes for bootstrapping with 3.01. - Use 'official' extension interfaces rather than internal prelude modules (such as ArrBase) where possible. - Remove some cruft. - Delete some unused imports found by '-fwarn-unused-imports'.
-
- 08 Jan, 1998 1 commit
-
-
simonm authored
The Great Multi-Parameter Type Classes Merge. Notes from Simon (abridged): * Multi-parameter type classes are fully implemented. * Error messages from the type checker should be noticeably improved * Warnings for unused bindings (-fwarn-unused-names) * many other minor bug fixes. Internally there are the following changes * Removal of Haskell 1.2 compatibility. * Dramatic clean-up of the PprStyle stuff. * The type Type has been substantially changed. * The dictionary for each class is represented by a new data type for that purpose, rather than by a tuple.
-
- 24 Nov, 1997 1 commit
-
-
sof authored
fix to have it compile with 2.09 (and later)
-
- 06 Jun, 1997 1 commit
-
-
sof authored
last minute 2.04 fixes
-
- 19 May, 1997 1 commit
-
-
sof authored
2.04 changes
-
- 14 Mar, 1997 1 commit
-
-
simonpj authored
Major update to more-or-less 2.02
-
- 17 Jan, 1997 1 commit
-
-
simonpj authored
Cross module worker-wrappers
-
- 19 Dec, 1996 1 commit
-
-
simonpj authored
SLPJ new renamer and lots more
-
- 25 Jul, 1996 1 commit
-
-
partain authored
Bulk of final changes for 2.01
-
- 26 Jun, 1996 1 commit
-
-
partain authored
SLPJ 1.3 changes through 96/06/25
-
- 05 Jun, 1996 1 commit
-
-
partain authored
SLPJ changes through 960604
-
- 01 May, 1996 1 commit
-
-
partain authored
SLPJ 1.3 changes through 960501
-
- 30 Apr, 1996 1 commit
-
-
partain authored
SLPJ 1.3 changes to 960430
-
- 25 Apr, 1996 1 commit
-
-
partain authored
SLPJ 1.3 changes through 960425
-
- 07 Apr, 1996 1 commit
-
-
partain authored
Sansom 1.3 changes through 960407
-
- 05 Apr, 1996 1 commit
-
-
partain authored
Add SLPJ/WDP 1.3 changes through 960404
-
- 21 Mar, 1996 1 commit
-
-
partain authored
Final compiler stuff before Sansom renamer 960321
-
- 19 Mar, 1996 1 commit
-
-
partain authored
simonpj/sansom/partain/dnt 1.3 compiler stuff through 96/03/18
-