1. 11 Mar, 2003 2 commits
  2. 10 Mar, 2003 3 commits
    • simonmar's avatar
      [project @ 2003-03-10 13:27:34 by simonmar] · bda047d0
      simonmar authored
      Use STK_CHK_NP rather than STK_CHK_GEN in the entry code for AP and
      AP_STACK thunks.
      The reason is that if the check fails, on return the closure might
      have been blackholed (perhaps due to lazy blackholing, or even because
      another thread has entered it), so we *must* enter the closure to
      continue, rather than just continuing at the original entry point.
      All compiler-generated thunks do this anyway, I think these are the
      only cases of thunks which don't follow the rule.
      Thanks to Robert Ennals for spotting, and correctly diagnosing, the
    • stolz's avatar
      [project @ 2003-03-10 12:48:10 by stolz] · 4e25c045
      stolz authored
      Fix typo
    • umuta's avatar
      [project @ 2003-03-10 10:30:26 by umuta] · 3c709aa7
      umuta authored
      Fix compilation problem on mingw32
  3. 07 Mar, 2003 4 commits
  4. 06 Mar, 2003 5 commits
  5. 05 Mar, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-03-05 10:22:22 by simonmar] · 9a1114e3
      simonmar authored
      Duh.  hsc2hs should be in $(GhcBinDistShScripts), not
      $(GhcBinDistBins), otherwise it doesn't get the right directories
      tacked on the front at installation time.  Strange that nobody
      complained that hsc2hs wasn't working from a binary dist *shrug*.
  6. 04 Mar, 2003 3 commits
  7. 03 Mar, 2003 5 commits
    • simonmar's avatar
      [project @ 2003-03-03 12:43:31 by simonmar] · 19108ede
      simonmar authored
      A round of space-leak fixing.
        - re-instate zapping of the PersistentCompilerState at various
          points during the compilation cycle in HscMain.  This affects
          one-shot compilation only, since in this mode the information
          collected in the PCS is not required after creating the final
          interface file.
        - Unravel the recursive dependency between MkIface and
          CoreTidy/CoreToStg.  Previously the CafInfo for each binding was
          calculated by CoreToStg, and fed back into the IdInfo of the Ids
          generated by CoreTidy (an earlier pass).  MkIface then took this
          IdInfo and the bindings from CoreTidy to generate the interface;
          but it couldn't do this until *after* CoreToStg, because the CafInfo
          hadn't been calculated yet.  The result was that the CoreTidy
          output lived until after CoreToStg, and at the same time as the
          CorePrep and STG syntax, which is wasted space, not to mention
          the complexity and general ugliness in HscMain.
          So now we calculate CafInfo directly in CoreTidy.  The downside is
          that we have to predict what CorePrep is going to do to the
          bindings so we can tell what will turn into a CAF later, but it's
          no worse than before (it turned out that we were doing this
          prediction before in CoreToStg anyhow).
        - The typechecker lazilly typechecks unfoldings.  It turns out that
          this is a good idea from a performance perspective, but it also
          means that it must hang on to all the information it needs to
          do the typechecking.  Previously this meant holding on to the
          whole of the typechecker's environment, which includes all sorts
          of stuff which isn't necessary to typecheck unfoldings.  By paring
          down the environment captured by the lazy unfoldings, we can
          save quite a bit of space in the phases after typechecking.
    • simonmar's avatar
      [project @ 2003-03-03 12:31:55 by simonmar] · 1b2e253b
      simonmar authored
      Use listArray rather than array in (un)?boxedTupleArr.
    • simonmar's avatar
      [project @ 2003-03-03 12:30:59 by simonmar] · 4ce67061
      simonmar authored
      Remove unused export.
    • simonmar's avatar
      [project @ 2003-03-03 12:30:39 by simonmar] · eb2c5629
      simonmar authored
      underscore some variables that aren't used.
    • simonmar's avatar
      [project @ 2003-03-03 12:30:11 by simonmar] · ac04a368
      simonmar authored
      Compilation fix after recent addition of environment stuff to System.Posix.
  8. 26 Feb, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-02-26 17:04:11 by simonpj] · c86e9006
      simonpj authored
      	Improve higher-rank type inference
      Yanling Wang pointed out that if we have
      	f = \ (x :: forall a. a->a). x
      it would be reasonable to expect that type inference would get the "right"
      rank-2 type for f.  She also found that the plausible definition
      	f :: (forall a. a->a) = \x -> x
      acutally failed to type check.
      This commit fixes up TcBinds.tcMonoBinds so that it does a better job.
      The main idea is that there are three cases to consider in a function binding:
        a) 'f' has a separate type signature
      	In this case, we know f's type everywhere
        b) The binding is recursive, and there is no type sig
      	In this case we must give f a monotype in its RHS
        c) The binding is non-recursive, and there is no type sig
      	Then we do not need to add 'f' to the envt, and can
      	simply infer a type for the RHS, which may be higher
  9. 24 Feb, 2003 3 commits
    • simonmar's avatar
      [project @ 2003-02-24 13:12:08 by simonmar] · c68c1f2e
      simonmar authored
      Remove mention of man pages, which we don't have, and clarify a couple
      of other things while I'm here.
    • simonpj's avatar
      [project @ 2003-02-24 12:44:38 by simonpj] · ec803f04
      simonpj authored
      *** My last commit had a bogus commit message **
      	*** This is the right one.  I've appended the **
      	*** list of files changed as well.
      	   Fix up HOST/TARGET_OS ifdefs
      Sigbjorn and Simon helped me to understand when it's appropriate to
      say 'ifdef mingw32_HOST_OS' and when 'ifdef mingw32_TARGET_OS'.  I've
      documented this in the building guide.
      I've fixed up the ifdefs I erroneously changed last week, in this
      commit.  I'm not certain about all of them.  For examples, in
      DriverPhases there's an ifdef that deals with filename suffices.
      Should this be the filename suffices for the system on which GHC runs
      (HOST), or the system on which the compiled code will run (TARGET)?
      Currently it's the latter.
      Similarly, there's some path mangling ('/' vs '\') in DriverState:
      should this be for the system on which GHC runs (HOST) or the system
      on which the compiled code will run (TARGET)?  Currently the former.
      I think some of the darwin_TARGET_OS should be darwin_HOST_OS's.
      Finally, for the GHCi stuff we require that HOST_OS = TARGET_OS.  Rather than
      make an arbitrary choice in (e.g.) Linker.lhs, it's be better to say
      '#ifdef mingw32_OS', and arrange that this macro is set only in stage-2.
      I have not done this.
      I think these are 'right'.  But I'm not sure the filename mangling is
      consistent throughout.
      [Changes in the original commit, which had a bogus message.]
        Revision  Changes    Path
        1.46      +30 -0     fptools/docs/building/building.sgml
        1.148     +4 -4      fptools/ghc/compiler/ghci/InteractiveUI.hs
        1.114     +2 -2      fptools/ghc/compiler/main/DriverFlags.hs
        1.23      +3 -1      fptools/ghc/compiler/main/DriverPhases.hs
        1.85      +11 -11    fptools/ghc/compiler/main/SysTools.lhs
        1.20      +3 -3      fptools/ghc/compiler/utils/Panic.lhs
    • simonpj's avatar
      [project @ 2003-02-24 12:39:24 by simonpj] · 395917a0
      simonpj authored
      Three Template Haskell improvements
      a) Add type synonyms to THSyntax (and DsMeta, Convert)
      b) Make Q into a newtype instead of a type synonym
      c) Eliminate tiresome and error prone argument to DsMeta.wrapGenSyms
         and similarly addTyVarBinds
  10. 22 Feb, 2003 2 commits
    • sof's avatar
      [project @ 2003-02-22 06:13:41 by sof] · 384d5bcf
      sof authored
      bring getourtimeofday() proto into scope
    • sof's avatar
      [project @ 2003-02-22 04:51:50 by sof] · 557947d3
      sof authored
      Clean up code&interfaces that deals with timers and asynchrony:
      - Timer.{c,h} now defines the platform-independent interface
        to the timing services needed by the RTS. Itimer.{c,h} +
        win32/Ticker.{c,h} defines the OS-specific services that
        creates/destroys a timer.
      - For win32 plats, drop the long-standing use of the 'multimedia'
        API timers and implement the ticking service ourselves. Simpler
        and more flexible.
      - Select.c is now solely for platforms that use select() to handle
        non-blocking I/O & thread delays. win32/AwaitEvent.c provides
        the same API on the Win32 side.
      - support threadDelay on win32 platforms via worker threads.
      Not yet compiled up on non-win32 platforms; will do once checked in.
  11. 21 Feb, 2003 11 commits