1. 07 Aug, 2000 7 commits
    • qrczak's avatar
      [project @ 2000-08-07 23:37:19 by qrczak] · 4b172698
      qrczak authored
      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).
      * 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.
    • qrczak's avatar
      [project @ 2000-08-07 23:29:46 by qrczak] · 514da0a6
      qrczak authored
      Use \{ \} in regex instead of { } for literal { }.
      Hope it should be OK in theory; needed in practice here.
    • rrt's avatar
      [project @ 2000-08-07 16:09:03 by rrt] · e415f297
      rrt authored
      Add COMPILING_STDLIB symbol analagous to COMPILING_RTS for the extern vars
      in stgio.h.
    • rrt's avatar
      [project @ 2000-08-07 16:07:53 by rrt] · 009c94a9
      rrt authored
      Add gmp.h to boot target so that it gets copied during booting (otherwise
      make boot breaks down).
    • rrt's avatar
      [project @ 2000-08-07 16:06:38 by rrt] · e1ecea72
      rrt authored
      Use $(MV) not mv.
    • sewardj's avatar
      [project @ 2000-08-07 14:15:43 by sewardj] · ef7cf7b0
      sewardj authored
      This is the program which generates bits of primop-related Haskell
      (and, soon, C) code from ghc/compiler/prelude/primops.txt.
    • sewardj's avatar
      [project @ 2000-08-07 14:11:48 by sewardj] · 014a3451
      sewardj authored
      Reorganise the way primops are done.  Most of the information about
      primops, their types and relevant attributes is in prelude/primops.txt.
      A supporting program in fptools/ghc/utils/genprimopcode reads this
      file and generates various bits of code which are #include'd into
      prelude/PrimOp.lhs.  Eventually this mechanism will be extended to
      generate PrelGHC.hi and C code for primops in the bytecode evaluator.
      Also, add a few primops for creating, reading and writing BCOs.
  2. 06 Aug, 2000 2 commits
  3. 04 Aug, 2000 5 commits
  4. 03 Aug, 2000 7 commits
  5. 02 Aug, 2000 6 commits
    • simonmar's avatar
      [project @ 2000-08-02 16:32:51 by simonmar] · f892a421
      simonmar authored
      remove mkdependHS from the list of directories.
    • simonmar's avatar
      [project @ 2000-08-02 15:39:11 by simonmar] · aa282b85
      simonmar authored
      Remove the old mkdependHS cruft.
    • simonmar's avatar
      [project @ 2000-08-02 15:27:25 by simonmar] · c4afba7e
      simonmar authored
      Assimilate mkdependHS into the driver, obsoleting the old Perl version.
      The functionality is pretty much identical, except a few of the flags
      accepted by the old version aren't implemented (--exclude-module,
      --exclude-directory, --include-module).  If anyone needs these
      options, please speak up.
    • rrt's avatar
      [project @ 2000-08-02 14:13:26 by rrt] · 567b2505
      rrt authored
      Many fixes to DLLisation. These were previously covered up because code was
      leaking into the import libraries for DLLs, so the fact that some symbols
      were thought of as local rather than in another DLL wasn't a problem.
      The main problems addressed by this commit are:
      1. Fixes RTS symbols working properly when DLLised. They didn't before.
      2. Uses NULL instead of stg_error_entry, because DLL entry points can't be
         used as static initialisers.
      3. PrelGHC.hi-boot changed to be in package RTS, and export of PrelNum and
         PrelErr moved to PrelBase, so that references to primops & the like
         are cross-DLL as they should be.
      4. Pass imports around as Modules rather than ModuleNames, so that
         ModuleInitLabels can be checked to see if they're in a DLL or not.
    • rrt's avatar
      [project @ 2000-08-02 13:42:32 by rrt] · c0339ba1
      rrt authored
      Now copied from ghc/rts/gmp.h
    • rrt's avatar
      [project @ 2000-08-02 13:38:13 by rrt] · 0b0cebed
      rrt authored
      Allow GMP to be compiled as a DLL.
  6. 01 Aug, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-08-01 09:08:25 by simonpj] · fe69f3c1
      simonpj authored
      Simon's Marktoberdorf Commits
      1.  Tidy up the renaming story for "system binders", such as
      dictionary functions, default methods, constructor workers etc.  These
      are now documented in HsDecls.  The main effect of the change, apart
      from tidying up, is to make the *type-checker* (instead of the
      renamer) generate names for dict-funs and default-methods.  This is
      good because Sergei's generic-class stuff generates new classes at
      typecheck time.
      2.  Fix the CSE pass so it does not require the no-shadowing invariant.
      Keith discovered that the simplifier occasionally returns a result
      with shadowing.  After much fiddling around (which has improved the
      code in the simplifier a bit) I found that it is nearly impossible to
      arrange that it really does do no-shadowing.  So I gave up and fixed
      the CSE pass (which is the only one to rely on it) instead.
      3. Fix a performance bug in the simplifier.  The change is in
      SimplUtils.interestingArg.  It computes whether an argment should 
      be considered "interesting"; if a function is applied to an interesting
      argument, we are more likely to inline that function.
      Consider this case
      	let x = 3 in f x
      The 'x' argument was considered "uninteresting" for a silly reason.
      Since x only occurs once, it was unconditionally substituted, but
      interestingArg didn't take account of that case.  Now it does.
      I also made interestingArg a bit more liberal.  Let's see if we
      get too much inlining now.
      4.  In the occurrence analyser, we were choosing a bad loop breaker.
      Here's the comment that's now in OccurAnal.reOrderRec
          score ((bndr, rhs), _, _)
      	| exprIsTrivial rhs 	   = 3	-- Practically certain to be inlined
      		-- Used to have also: && not (isExportedId bndr)
      		-- But I found this sometimes cost an extra iteration when we have
      		--	rec { d = (a,b); a = ...df...; b = ...df...; df = d }
      		-- where df is the exported dictionary. Then df makes a really
      		-- bad choice for loop breaker
      I also increased the score for bindings with a non-functional type, so that
      dictionaries have a better chance of getting inlined early
      5. Add a hash code to the InScopeSet (and make it properly abstract)
      This should make uniqAway a lot more robust.  Simple experiments suggest
      that uniqAway no longer gets into the long iteration chains that it used
      6.  Fix a bug in the inliner that made the simplifier tend to get into
      a loop where it would keep iterating ("4 iterations, bailing out" message).
      In SimplUtils.mkRhsTyLam we float bindings out past a big lambda, thus:
      	x = /\ b -> let g = \x -> f x x
      		    in E
      	g* = /\a -> \x -> f x x
      	x = /\ b -> let g = g* b in E
      It's essential that we don't simply inling g* back into the RHS of g,
      else we will be back to square 1.  The inliner is meant not to do this
      because there's no benefit to the inlining, but the size calculation
      was a little off in CoreUnfold.
      7.  In SetLevels we were bogus-ly building a Subst with an empty in-scope
      set, so a WARNING popped up when compiling some modules.  (knights/ChessSetList
      was the example that tickled it.)  Now in fact the warning wasn't an error,
      but the Right Thing to do is to carry down a proper Subst in SetLevels, so
      that is what I have now done.  It is very little more expensive.
  7. 31 Jul, 2000 2 commits
  8. 27 Jul, 2000 4 commits
  9. 26 Jul, 2000 6 commits