summaryrefslogtreecommitdiff
path: root/ghc/compiler/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* [project @ 2000-11-10 15:12:50 by simonpj]simonpj2000-11-101-47/+65
| | | | | | | | | | | | | | 1. Outputable.PprStyle now carries a bit more information In particular, the printing style tells whether to print a name in unqualified form. This used to be embedded in a Name, but since Names now outlive a single compilation unit, that's no longer appropriate. So now the print-unqualified predicate is passed in the printing style, not embedded in the Name. 2. I tidied up HscMain a little. Many of the showPass messages have migraged into the repective pass drivers
* [project @ 2000-11-08 13:51:58 by simonmar]simonmar2000-11-081-2/+5
| | | | Fixes for compiling w/ 4.08.1
* [project @ 2000-11-07 13:12:21 by simonpj]simonpj2000-11-074-9/+2
| | | | More small changes
* [project @ 2000-10-30 18:13:15 by sewardj]sewardj2000-10-301-1/+15
| | | | | Move readIface from RnM to IO, and commensurate changes. Also, add a field to ModuleLocation to hold preprocessed source locations.
* [project @ 2000-10-27 14:55:01 by simonmar]simonmar2000-10-271-2/+4
| | | | don't fake the processID
* [project @ 2000-10-27 14:36:16 by simonmar]simonmar2000-10-271-2/+1
| | | | s/allocMemory__/malloc
* [project @ 2000-10-27 14:22:34 by sewardj]sewardj2000-10-272-6/+14
| | | | | Final mods to make it compile with 4.08.1. You don't get an interpreter like that, tho.
* [project @ 2000-10-27 14:04:21 by simonmar]simonmar2000-10-271-1/+1
| | | | typo
* [project @ 2000-10-27 13:50:25 by sewardj]sewardj2000-10-271-1/+28
| | | | Half-way through versioning so it will compile, sans interpreter, with 4.08.1
* [project @ 2000-10-27 09:36:39 by sewardj]sewardj2000-10-271-34/+0
| | | | No longer needed. Bye bye Argv!
* [project @ 2000-10-24 08:40:09 by simonpj]simonpj2000-10-241-7/+9
| | | | Small wibbles
* [project @ 2000-10-16 10:16:33 by sewardj]sewardj2000-10-161-1/+1
| | | | Don't try to import IOError non-abstractly (avoids a compiler warning).
* [project @ 2000-10-12 13:11:45 by simonmar]simonmar2000-10-125-58/+113
| | | | | | | | | Move FAST_INT and FAST_BOOL into their own module FastTypes, replacing the macro definitions in HsVersions.h with real definitions. Change most of the names in the process. Now we don't get bogus imports of GlaExts all over the place, and -fwarn-unused-imports is less noisy.
* [project @ 2000-10-11 13:27:35 by simonmar]simonmar2000-10-111-12/+20
| | | | | | | - add prefixMatch & postfixMatch list comparison operators - add 'global' for global vars - remove unused cmpString - remove unused imports
* [project @ 2000-10-03 08:43:00 by simonpj]simonpj2000-10-033-176/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -------------------------------------- Adding generics SLPJ Oct 2000 -------------------------------------- This big commit adds Hinze/PJ-style generic class definitions, based on work by Andrei Serjantov. For example: class Bin a where toBin :: a -> [Int] fromBin :: [Int] -> (a, [Int]) toBin {| Unit |} Unit = [] toBin {| a :+: b |} (Inl x) = 0 : toBin x toBin {| a :+: b |} (Inr y) = 1 : toBin y toBin {| a :*: b |} (x :*: y) = toBin x ++ toBin y fromBin {| Unit |} bs = (Unit, bs) fromBin {| a :+: b |} (0:bs) = (Inl x, bs') where (x,bs') = fromBin bs fromBin {| a :+: b |} (1:bs) = (Inr y, bs') where (y,bs') = fromBin bs fromBin {| a :*: b |} bs = (x :*: y, bs'') where (x,bs' ) = fromBin bs (y,bs'') = fromBin bs' Now we can say simply instance Bin a => Bin [a] and the compiler will derive the appropriate code automatically. (About 9k lines of diffs. Ha!) Generic related things ~~~~~~~~~~~~~~~~~~~~~~ * basicTypes/BasicTypes: The EP type (embedding-projection pairs) * types/TyCon: An extra field in an algebraic tycon (genInfo) * types/Class, and hsSyn/HsBinds: Each class op (or ClassOpSig) carries information about whether it a) has no default method b) has a polymorphic default method c) has a generic default method There's a new data type for this: Class.DefMeth * types/Generics: A new module containing good chunk of the generic-related code It has a .hi-boot file (alas). * typecheck/TcInstDcls, typecheck/TcClassDcl: Most of the rest of the generics-related code * hsSyn/HsTypes: New infix type form to allow types of the form data a :+: b = Inl a | Inr b * parser/Parser.y, Lex.lhs, rename/ParseIface.y: Deal with the new syntax * prelude/TysPrim, TysWiredIn: Need to generate generic stuff for the wired-in TyCons * rename/RnSource RnBinds: A rather gruesome hack to deal with scoping of type variables from a generic patterns. Details commented in the ClassDecl case of RnSource.rnDecl. Of course, there are many minor renamer consequences of the other changes above. * lib/std/PrelBase.lhs Data type declarations for Unit, :+:, :*: Slightly unrelated housekeeping ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * hsSyn/HsDecls: ClassDecls now carry the Names for their implied declarations (superclass selectors, tycon, etc) in a list, rather than laid out one by one. This simplifies code between the parser and the type checker. * prelude/PrelNames, TysWiredIn: All the RdrNames are now together in PrelNames. * utils/ListSetOps: Add finite mappings based on equality and association lists (Assoc a b) Move stuff from List.lhs that is related
* [project @ 2000-09-08 09:26:05 by simonmar]simonmar2000-09-081-1/+5
| | | | oops, forgot to remove an instance of REALLY_HASKELL_1_3
* [project @ 2000-09-05 09:13:38 by simonmar]simonmar2000-09-051-4/+0
| | | | remove last use of REALLY_HASKELL_1_3
* [project @ 2000-09-05 09:10:22 by simonmar]simonmar2000-09-051-16/+15
| | | | Use std monadic operators instead of `thenStrictlyST` and friends.
* [project @ 2000-08-07 23:37:19 by qrczak]qrczak2000-08-073-28/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now Char, Char#, StgChar have 31 bits (physically 32). "foo"# is still an array of bytes. CharRep represents 32 bits (on a 64-bit arch too). There is also Int8Rep, used in those places where bytes were originally meant. readCharArray, indexCharOffAddr etc. still use bytes. Storable and {I,M}Array use wide Chars. In future perhaps all sized integers should be primitive types. Then some usages of indexing primops scattered through the code could be changed to then-available Int8 ones, and then Char variants of primops could be made wide (other usages that handle text should use conversion that will be provided later). I/O and _ccall_ arguments assume ISO-8859-1. UTF-8 is internally used for string literals (only). Z-encoding is ready for Unicode identifiers. Ranges of intlike and charlike closures are more easily configurable. I've probably broken nativeGen/MachCode.lhs:chrCode for Alpha but I don't know the Alpha assembler to fix it (what is zapnot?). Generally I'm not sure if I've done the NCG changes right. This commit breaks the binary compatibility (of course). TODO: * is* and to{Lower,Upper} in Char (in progress). * Libraries for text conversion (in design / experiments), to be plugged to I/O and a higher level foreign library. * PackedString. * StringBuffer and accepting source in encodings other than ISO-8859-1.
* [project @ 2000-06-28 14:00:36 by simonmar]simonmar2000-06-281-4/+4
| | | | | Wave goodbye to hscpp, GHC's lexer now understands the '# \d+ \".*\"' output from cpp.
* [project @ 2000-05-25 12:41:14 by simonpj]simonpj2000-05-254-29/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ~~~~~~~~~~~~ Apr/May 2000 ~~~~~~~~~~~~ This is a pretty big commit! It adds stuff I've been working on over the last month or so. DO NOT MERGE IT WITH 4.07! Interface file formats have changed a little; you'll need to make clean before remaking. Simon PJ Recompilation checking ~~~~~~~~~~~~~~~~~~~~~~ Substantial improvement in recompilation checking. The version management is now entirely internal to GHC. ghc-iface.lprl is dead! The trick is to generate the new interface file in two steps: - first convert Types etc to HsTypes etc, and thereby build a new ParsedIface - then compare against the parsed (but not renamed) version of the old interface file Doing this meant adding code to convert *to* HsSyn things, and to compare HsSyn things for equality. That is the main tedious bit. Another improvement is that we now track version info for fixities and rules, which was missing before. Interface file reading ~~~~~~~~~~~~~~~~~~~~~~ Make interface files reading more robust. * If the old interface file is unreadable, don't fail. [bug fix] * If the old interface file mentions interfaces that are unreadable, don't fail. [bug fix] * When we can't find the interface file, print the directories we are looking in. [feature] Type signatures ~~~~~~~~~~~~~~~ * New flag -ddump-types to print type signatures Type pruning ~~~~~~~~~~~~ When importing data T = T1 A | T2 B | T3 C it seems excessive to import the types A, B, C as well, unless the constructors T1, T2 etc are used. A,B,C might be more types, and importing them may mean reading more interfaces, and so on. So the idea is that the renamer will just import the decl data T unless one of the constructors is used. This turns out to be quite easy to implement. The downside is that we must make sure the constructors are always available if they are really needed, so I regard this as an experimental feature. Elimininate ThinAir names ~~~~~~~~~~~~~~~~~~~~~~~~~ Eliminate ThinAir.lhs and all its works. It was always a hack, and now the desugarer carries around an environment I think we can nuke ThinAir altogether. As part of this, I had to move all the Prelude RdrName defns from PrelInfo to PrelMods --- so I renamed PrelMods as PrelNames. I also had to move the builtinRules so that they are injected by the renamer (rather than appearing out of the blue in SimplCore). This is if anything simpler. Miscellaneous ~~~~~~~~~~~~~ * Tidy up the data types involved in Rules * Eliminate RnEnv.better_provenance; use Name.hasBetterProv instead * Add Unique.hasKey :: Uniquable a => a -> Unique -> Bool It's useful in a lot of places * Fix a bug in interface file parsing for __U[!]
* [project @ 2000-04-14 08:58:00 by simonmar]simonmar2000-04-141-2/+2
| | | | | Text => Show _ByteArray => ByteArray
* [project @ 2000-04-14 08:55:42 by simonmar]simonmar2000-04-141-1/+1
| | | | fix up imports of ForeignObj(..).
* [project @ 2000-04-14 08:52:35 by simonmar]simonmar2000-04-141-4/+4
| | | | _ForeignObj ==> ForeignObj
* [project @ 2000-04-14 08:29:49 by simonmar]simonmar2000-04-141-5/+7
| | | | we should be using hPutBufFull here.
* [project @ 2000-04-13 19:44:22 by panne]panne2000-04-131-1/+1
| | | | | Again: Addr is an abstract type in Addr, so import from PrelAddr instead. Told you so...
* [project @ 2000-04-13 19:31:05 by panne]panne2000-04-132-3/+4
| | | | | | | | | | Bootstrapping fun: * Addr is an abstract type in Addr, so import from PrelAddr instead * Ignore the (recently introduced) return value of hPutBuf{,BA} Probably more to come. No problem, as long as I don't run out of malt first... %-)
* [project @ 2000-04-03 16:46:41 by simonpj]simonpj2000-04-031-1/+1
| | | | | | | | * Minor wibble to type checker error message * Make error messages come out to stderr (I'd switched to stdout temporarily when fighting the Dreaded Stderr Bug and forgot to change back)
* [project @ 2000-04-03 09:52:28 by simonpj]simonpj2000-04-031-1/+1
| | | | | | | | | | | | | | | | | | | * Make it so that recursive newtype declarations don't send GHC into an infinite loop. newtype T = MkT T This happened because Type.repType looked throught newtypes, and that never stopped! Now TcTyDecls.mkNewTyConRep does the job more carefully, and the result is cached in the TyCon itself. * Improve the handling of type signatures & pragmas. Previously a mis-placed (say) SPECIALISE instance pragmas could be silently ignored. Both these changes involved moving quite a lot of stuff between modules.
* [project @ 2000-03-23 17:45:17 by simonpj]simonpj2000-03-233-10/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This utterly gigantic commit is what I've been up to in background mode in the last couple of months. Originally the main goal was to get rid of Con (staturated constant applications) in the CoreExpr type, but one thing led to another, and I kept postponing actually committing. Sorry. Simon, 23 March 2000 I've tested it pretty thoroughly, but doubtless things will break. Here are the highlights * Con is gone; the CoreExpr type is simpler * NoRepLits have gone * Better usage info in interface files => less recompilation * Result type signatures work * CCall primop is tidied up * Constant folding now done by Rules * Lots of hackery in the simplifier * Improvements in CPR and strictness analysis Many bug fixes including * Sergey's DoCon compiles OK; no loop in the strictness analyser * Volker Wysk's programs don't crash the CPR analyser I have not done much on measuring compilation times and binary sizes; they could have got worse. I think performance has got significantly better, though, in most cases. Removing the Con form of Core expressions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The big thing is that For every constructor C there are now *two* Ids: C is the constructor's *wrapper*. It evaluates and unboxes arguments before calling $wC. It has a perfectly ordinary top-level defn in the module defining the data type. $wC is the constructor's *worker*. It is like a primop that simply allocates and builds the constructor value. Its arguments are the actual representation arguments of the constructor. Its type may be different to C, because: - useless dict args are dropped - strict args may be flattened For every primop P there is *one* Id, its (curried) Id Neither contructor worker Id nor the primop Id have a defminition anywhere. Instead they are saturated during the core-to-STG pass, and the code generator generates code for them directly. The STG language still has saturated primops and constructor applications. * The Const type disappears, along with Const.lhs. The literal part of Const.lhs reappears as Literal.lhs. Much tidying up in here, to bring all the range checking into this one module. * I got rid of NoRep literals entirely. They just seem to be too much trouble. * Because Con's don't exist any more, the funny C { args } syntax disappears from inteface files. Parsing ~~~~~~~ * Result type signatures now work f :: Int -> Int = \x -> x -- The Int->Int is the type of f g x y :: Int = x+y -- The Int is the type of the result of (g x y) Recompilation checking and make ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * The .hi file for a modules is not touched if it doesn't change. (It used to be touched regardless, forcing a chain of recompilations.) The penalty for this is that we record exported things just as if they were mentioned in the body of the module. And the penalty for that is that we may recompile a module when the only things that have changed are the things it is passing on without using. But it seems like a good trade. * -recomp is on by default Foreign declarations ~~~~~~~~~~~~~~~~~~~~ * If you say foreign export zoo :: Int -> IO Int then you get a C produre called 'zoo', not 'zzoo' as before. I've also added a check that complains if you export (or import) a C procedure whose name isn't legal C. Code generation and labels ~~~~~~~~~~~~~~~~~~~~~~~~~~ * Now that constructor workers and wrappers have distinct names, there's no need to have a Foo_static_closure and a Foo_closure for constructor Foo. I nuked the entire StaticClosure story. This has effects in some of the RTS headers (i.e. s/static_closure/closure/g) Rules, constant folding ~~~~~~~~~~~~~~~~~~~~~~~ * Constant folding becomes just another rewrite rule, attached to the Id for the PrimOp. To achieve this, there's a new form of Rule, a BuiltinRule (see CoreSyn.lhs). The prelude rules are in prelude/PrelRules.lhs, while simplCore/ConFold.lhs has gone. * Appending of constant strings now works, using fold/build fusion, plus the rewrite rule unpack "foo" c (unpack "baz" c n) = unpack "foobaz" c n Implemented in PrelRules.lhs * The CCall primop is tidied up quite a bit. There is now a data type CCall, defined in PrimOp, that packages up the info needed for a particular CCall. There is a new Id for each new ccall, with an big "occurrence name" {__ccall "foo" gc Int# -> Int#} In interface files, this is parsed as a single Id, which is what it is, really. Miscellaneous ~~~~~~~~~~~~~ * There were numerous places where the host compiler's minInt/maxInt was being used as the target machine's minInt/maxInt. I nuked all of these; everything is localised to inIntRange and inWordRange, in Literal.lhs * Desugaring record updates was broken: it didn't generate correct matches when used withe records with fancy unboxing etc. It now uses matchWrapper. * Significant tidying up in codeGen/SMRep.lhs * Add __word, __word64, __int64 terminals to signal the obvious types in interface files. Add the ability to print word values in hex into C code. * PrimOp.lhs is no longer part of a loop. Remove PrimOp.hi-boot* Types ~~~~~ * isProductTyCon no longer returns False for recursive products, nor for unboxed products; you have to test for these separately. There's no reason not to do CPR for recursive product types, for example. Ditto splitProductType_maybe. Simplification ~~~~~~~~~~~~~~~ * New -fno-case-of-case flag for the simplifier. We use this in the first run of the simplifier, where it helps to stop messing up expressions that the (subsequent) full laziness pass would otherwise find float out. It's much more effective than previous half-baked hacks in inlining. Actually, it turned out that there were three places in Simplify.lhs that needed to know use this flag. * Make the float-in pass push duplicatable bindings into the branches of a case expression, in the hope that we never have to allocate them. (see FloatIn.sepBindsByDropPoint) * Arrange that top-level bottoming Ids get a NOINLINE pragma This reduced gratuitous inlining of error messages. But arrange that such things still get w/w'd. * Arrange that a strict argument position is regarded as an 'interesting' context, so that if we see foldr k z (g x) then we'll be inclined to inline g; this can expose a build. * There was a missing case in CoreUtils.exprEtaExpandArity that meant we were missing some obvious cases for eta expansion Also improve the code when handling applications. * Make record selectors (identifiable by their IdFlavour) into "cheap" operations. [The change is a 2-liner in CoreUtils.exprIsCheap] This means that record selection may be inlined into function bodies, which greatly improves the arities of overloaded functions. * Make a cleaner job of inlining "lone variables". There was some distributed cunning, but I've centralised it all now in SimplUtils.analyseCont, which analyses the context of a call to decide whether it is "interesting". * Don't specialise very small functions in Specialise.specDefn It's better to inline it. Rather like the worker/wrapper case. * Be just a little more aggressive when floating out of let rhss. See comments with Simplify.wantToExpose A small change with an occasional big effect. * Make the inline-size computation think that case x of I# x -> ... is *free*. CPR analysis ~~~~~~~~~~~~ * Fix what was essentially a bug in CPR analysis. Consider letrec f x = let g y = let ... in f e1 in if ... then (a,b) else g x g has the CPR property if f does; so when generating the final annotated RHS for f, we must use an envt in which f is bound to its final abstract value. This wasn't happening. Instead, f was given the CPR tag but g wasn't; but of course the w/w pass gives rotten results in that case!! (Because f's CPR-ness relied on g's.) On they way I tidied up the code in CprAnalyse. It's quite a bit shorter. The fact that some data constructors return a constructed product shows up in their CPR info (MkId.mkDataConId) not in CprAnalyse.lhs Strictness analysis and worker/wrapper ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * BIG THING: pass in the demand to StrictAnal.saExpr. This affects situations like f (let x = e1 in (x,x)) where f turns out to have strictness u(SS), say. In this case we can mark x as demanded, and use a case expression for it. The situation before is that we didn't "know" that there is the u(SS) demand on the argument, so we simply computed that the body of the let expression is lazy in x, and marked x as lazily-demanded. Then even after f was w/w'd we got let x = e1 in case (x,x) of (a,b) -> $wf a b and hence let x = e1 in $wf a b I found a much more complicated situation in spectral/sphere/Main.shade, which improved quite a bit with this change. * Moved the StrictnessInfo type from IdInfo to Demand. It's the logical place for it, and helps avoid module loops * Do worker/wrapper for coerces even if the arity is zero. Thus: stdout = coerce Handle (..blurg..) ==> wibble = (...blurg...) stdout = coerce Handle wibble This is good because I found places where we were saying case coerce t stdout of { MVar a -> ... case coerce t stdout of { MVar b -> ... and the redundant case wasn't getting eliminated because of the coerce.
* [project @ 2000-03-20 15:32:10 by panne]panne2000-03-201-1/+5
| | | | Bootstrapping fix, this time for slurpFile
* [project @ 2000-03-19 13:36:59 by panne]panne2000-03-191-0/+1
| | | | *sigh* hPutBuf{,BA} versionitis again, this time for bootstrapping 4.07
* [project @ 2000-03-15 11:15:19 by simonmar]simonmar2000-03-151-6/+5
| | | | | Use the slightly more standard non-standard module ST instead of the completely non-standard MutableArray.
* [project @ 2000-03-15 11:11:08 by simonmar]simonmar2000-03-151-2/+10
| | | | sigh, add some more #ifdefs to this file (MutableArray/STArray changes).
* [project @ 2000-03-13 10:28:51 by simonmar]simonmar2000-03-131-1/+1
| | | | Pick up the pieces after Sven's Saturday Night Fever :)
* [project @ 2000-03-11 23:55:16 by panne]panne2000-03-111-1/+4
| | | | Saturday Night Fever: hPutBufBA again... >:-(
* [project @ 2000-03-02 22:51:30 by lewie]lewie2000-03-021-0/+8
| | | | | | | Further refine and fix how `with' partitions the LIE. Also moved the partitioning function from Inst to TcSimplify. Fixed layout bug with `with'. Fixed another wibble w/ importing defs w/ implicit params. Make 4-tuples outputable (a convenience in debugging measure).
* [project @ 2000-02-28 21:59:32 by lewie]lewie2000-02-281-0/+4
| | | | | | Fix signatures w/ implicit parameter types in them (in particular, correctly handle the case where there are no type variables). Also made a few more things Outputable. Nuke outdated comment in Parser.y.
* [project @ 2000-02-28 12:02:31 by sewardj]sewardj2000-02-281-44/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many changes to improve the quality and correctness of generated code, both for x86 and all-platforms. The intent is that the x86 NCG will now be good enough for general use. -- Add an almost-trivial Stix (generic) peephole optimiser, whose sole purpose is elide assignments to temporaries used only once, in the very next tree. This generates substantially better code for conditionals on all platforms. Enhance Stix constant folding to take advantage of the inlining. The inlining presents subsequent insn selection phases with more complex trees than would have previously been used to. This has shown up several bugs in the x86 insn selectors, now fixed. (assumptions that data size is Word, when could be Byte, assumptions that an operand will always be in a temp reg, etc) -- x86: Use the FLDZ and FLD1 insns. -- x86: spill FP registers with 80-bit loads/stores so that Intel's extra 16 bits of accuracy are not lost. If this isn't done, FP spills are not suitably transparent. Increase the number of spill words available to 2048. -- x86: give the register allocator more flexibility in choosing spill temporaries. -- x86, RegAllocInfo.regUsage: fix error for GST, and rewrite to make it clearer. -- Correctly track movements in the C stack pointer, and generate correct spill code for archs which spill against the stack pointer even when the stack pointer moves. Redo the x86 ccall mechanism to push args on the C stack in the normal way. Rather than have the spiller have to analyse code sequences to determine the current stack offset, the insn selectors communicate the current offset whenever it changes by inserting a DELTA pseudo-insn. Then the spiller only has to spot DELTAs. This means having a new native-code-generator monad (Stix.NatM) which carries both a UniqSupply and the current stack offset. -- Remove the asmPar/asmSeq ways of grouping insns together. In the presence of fixed registers, it is hard to demonstrate that insn selectors using asmPar always give correct code, and the extra complication doesn't help any. Also, directly construct code sequences using tree-based ordered lists (utils/OrdList.lhs) for linear-time appends, rather than the bizarrely complex method using fns and fn composition. -- Inline some hcats in printing of x86 address modes. -- Document more of the hidden assumptions which insn selection relies on, particular wrt addressing modes.
* [project @ 2000-02-11 13:06:39 by simonpj]simonpj2000-02-111-10/+25
| | | | Add a few functions to Outputable
* [project @ 2000-01-05 17:23:34 by simonmar]simonmar2000-01-051-7/+7
| | | | | Emit a reasonable error message instead of crashing when there's an unterminated literal-liberal in the source file.
* [project @ 1999-12-06 10:50:29 by simonpj]simonpj1999-12-061-1/+5
| | | | | | | | | | | | | Change printDump so that it prints in user style by default. This means that (eg) -ddump-simpl output is much more readable... but you may get confused by variables that look the same but aren't. To recover the previous behaviour use -dppr-debug This change only affects compiler hackers; let me know if it has any good or bad effects. Simon
* [project @ 1999-12-03 18:17:29 by lewie]lewie1999-12-031-0/+3
| | | | | | | Extend getTyVarsToGen to take the closure of the set of tyvars with respect to functional dependencies. Really simple programs using functional dependencies work now. Also fixed a small glitch where trivial (empty) FunDeps were being tossed into the context willy nilly.
* [project @ 1999-11-29 13:21:32 by sewardj]sewardj1999-11-291-1/+1
| | | | error.h --> stgerror.h
* [project @ 1999-11-17 11:25:01 by simonmar]simonmar1999-11-171-29/+0
| | | | Remove unused FiniteSet stuff.
* [project @ 1999-10-13 16:39:10 by simonmar]simonmar1999-10-131-1/+4
| | | | | | | Crude allocation-counting extension to ticky-ticky profiling. Allocations are counted against the closest lexically enclosing function closure, so you need to map the output back to the STG code.
* [project @ 1999-10-13 10:43:15 by simonmar]simonmar1999-10-131-1/+1
| | | | typo
* [project @ 1999-10-13 10:09:03 by simonmar]simonmar1999-10-131-9/+68
| | | | #ifdefs for bootstrapping
* [project @ 1999-10-13 09:59:36 by simonmar]simonmar1999-10-131-17/+71
| | | | add a bunch of #ifdefs so we can bootstrap again
* [project @ 1999-09-20 11:18:05 by simonmar]simonmar1999-09-201-1/+2
| | | | Fix for compiling w/ ghc-2.10