1. 24 Jan, 2003 4 commits
    • simonmar's avatar
      [project @ 2003-01-24 16:05:57 by simonmar] · be659293
      simonmar authored
      remove setting of $(way_) and $(_way); these are now set in boilerplate.mk
    • simonmar's avatar
      [project @ 2003-01-24 14:04:40 by simonmar] · b429adbb
      simonmar authored
      - Generalise seq to allow an unlifted type in its second argument.  This
        works because seq is *always* inlined and replaced by a case.
      - Remove getTag, a wired-in Id with an unfolding, with a definition
        in GHC.Base:
      	getTag x = x `seq` dataToTag# x
        this is why we required the above generalisation to seq (dataToTag#
        returns an Int#).  See the comments in GHC.Base for more details.
      - As a side-effect, this fixes a bug in the interpreter, where the
        compiler optimised away the evaluation of the argument to dataToTag#,
        but the interpreter ended up passing it an unevaluated thunk (nullary
        constructors aren't always evaluated in GHCi, but the simplifier
        assumes they are).  Now, in the interpreter, getTag won't be inlined
        so the compiler can't optimise away the evaluation, and we're saved.
        The real bug here is either (a) dataToTag# requires an evaluated
        argument or (b) the interpreter doesn't supply it with one, take your
    • simonmar's avatar
      [project @ 2003-01-24 13:56:45 by simonmar] · 519c3db4
      simonmar authored
      - Reverse the code for workers and wrappers for nullary constructors.
        For some reason it was the wrong way around, but the effects were
        harmless since they both evaluate to the same thing.
      - When passing a nullary constructor as an argument, we should pass
        the name of the worker rather than the wrapper.  Again, this is
        mostly harmless, but it enables some small simplification in
      - Rearrange/cleanup pushAtom.
    • simonpj's avatar
      [project @ 2003-01-24 11:26:39 by simonpj] · 9ceeb6e5
      simonpj authored
      Perform 'tidying' on the implicit bindings before emitting
      	External Core.  We were getting silly bindings like
      		\ tpl -> case tpl of tpl -> (tpl,tpl) -> tpl
      	Maybe we should add these implicit bindings in CoreTidy,
      	rather than in both MkExternalCore and CorePrep?
  2. 23 Jan, 2003 12 commits
  3. 20 Jan, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-01-20 16:24:51 by simonpj] · 9208de5c
      simonpj authored
      Increase the size of a string literal; cures a simplifier loop
          when an application (f "x") appeared to have size 1, and so was
          inlined repeatedly.  The problem was that "x" appeared to have
          size 0.
  4. 19 Jan, 2003 1 commit
  5. 17 Jan, 2003 3 commits
  6. 14 Jan, 2003 3 commits
  7. 13 Jan, 2003 8 commits
    • simonpj's avatar
      [project @ 2003-01-13 17:01:22 by simonpj] · 0877011a
      simonpj authored
      	(a) Improve reporting of staging errors
      	(b) Tidy up the construction of dict funs
      			and default methods
    • simonpj's avatar
      [project @ 2003-01-13 14:12:31 by simonpj] · 61d8dc50
      simonpj authored
      Bale out earlier if main is not in scope (fixes several test failures)
    • simonmar's avatar
      [project @ 2003-01-13 14:02:07 by simonmar] · 732cf22e
      simonmar authored
      The hook NoRunnableThreads() is not used; kill it.
    • simonpj's avatar
      [project @ 2003-01-13 13:39:34 by simonpj] · a7c1d388
      simonpj authored
    • simonpj's avatar
      [project @ 2003-01-13 13:22:58 by simonpj] · 96b7249d
      simonpj authored
    • simonpj's avatar
      [project @ 2003-01-13 13:20:37 by simonpj] · 90bf3139
      simonpj authored
      	Don't export the inlining for a foreign
      	import that has a #include directive
      Reason for this change: if the inlining is imported into another
      module, the latter may not have the right #include directives.
      Also add notes to the documentation to explain the issues.
    • simonpj's avatar
      [project @ 2003-01-13 13:19:25 by simonpj] · 67398e1b
      simonpj authored
      	Type signature for derived con2tag
      The derived con2tag didn't have a type signature, so we got
      	con2tagFoo :: a -> Int#
      	con2tagFoo = \x -> getTag x
      The getTag generates a case expression, so we get a polymorphic
      case.  The polymorphic case simply does not work in *interpreted*
      GHC 5.02.3 and as a result neither does con2tag.  Alas.
      This commit fixes the problem, by giving a type signature for
      con2TagFoo.  But note that getTag in interpreted GHC 5.02 will continue
      to fail if used in a polymorphic context.  This problem does not arise
      in the HEAD (eval/apply) so I'm going to leave it as a wont-fix bug.
    • simonpj's avatar
      [project @ 2003-01-13 13:10:19 by simonpj] · 0862ecec
      simonpj authored
      Import trimming
  8. 10 Jan, 2003 7 commits
    • wolfgang's avatar
      [project @ 2003-01-10 22:08:20 by wolfgang] · e65d8f38
      wolfgang authored
      blockUserSignal() should use SIG_BLOCK instead of SIG_SETMASK, otherwise it
      would also sometimes unblock signals that should be blocked.
    • simonmar's avatar
      [project @ 2003-01-10 16:33:49 by simonmar] · c3fb6ff1
      simonmar authored
      Changes to the way stack checks are handled in GHCi, to fix a rare bug
      when a stack check fails in a BCO.
      We now aggregate all stack use from case alternatives up to the
      enclosing function/thunk BCO, and do a single stack check at the
      beginning of that BCO.  This simplifies the stack check failure code,
      because it doesn't have to cope with the case when a case alternative
      needs to restart.
      We still employ the trick of doing a fixed stack check before every
      BCO, only inserting an actual stack check instruction in the BCO if it
      needs more stack than this fixed amount.  The fixed stack check is now
      only done before running a function/thunk BCO.
    • simonpj's avatar
      [project @ 2003-01-10 16:10:00 by simonpj] · 2d6705ca
      simonpj authored
      Add notes on real-time profiling from Jan-Willhem
    • simonmar's avatar
      [project @ 2003-01-10 15:00:22 by simonmar] · e60d7bb1
      simonmar authored
      Fix GHCi breakage on the HEAD: my recent fixes to the BCO cases in
      GenApply weren't quite correct.
    • simonpj's avatar
      [project @ 2003-01-10 14:20:41 by simonpj] · 19618439
      simonpj authored
      Export main from Main (only matters for ghci) [missed file]
    • simonpj's avatar
      [project @ 2003-01-10 14:20:01 by simonpj] · 753d8919
      simonpj authored
      Export main from Main (only matters for ghci)
    • simonmar's avatar
      [project @ 2003-01-10 10:55:24 by simonmar] · f7f6daaf
      simonmar authored
      Only add -package readline if $(GhcLibsWithReadline) == YES
      This isn't really the correct solution, since we actually want to know
      whether the bootstrapping compiler has readline, not this one, but
      since the most common bootstrapping compiler is going to be the stage1
      compiler in this tree it's a good guess that GhcLibsWithReadline is
  9. 09 Jan, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-01-09 16:15:51 by simonpj] · ba580284
      simonpj authored
      	Fix export-calculation bug
      Ross points out that in
       	module M where
       	import List as M
       	sort = "foo"
      there is no conflict in the export list. GHC used to treat this
      	module M( module M ) where ...
      which is wrong, wrong, wrong.
      Now fixed.   Test in modules/mod200.hs
      Some other small tidying up (notably in GRE.gre_parent).