1. 31 Jan, 2002 3 commits
  2. 30 Jan, 2002 20 commits
    • simonmar's avatar
      [project @ 2002-01-30 17:19:15 by simonmar] · 69201230
      simonmar authored
      Add a short section on modules & packages.
    • simonpj's avatar
      [project @ 2002-01-30 17:16:36 by simonpj] · dd214d28
      simonpj authored
      	Tidy up the top level of TcModule
      This commit started life as sorting out the TcInstDcls thing that
      we got wrong a few weeks back, but it spiraled out of control.
      However, the result is a nice tidy up of TcModule.
      typecheckModule/tcModule compiles a module from source code
      typecheckIface/tcIface   compiles a module from its interface file
      typecheckStmt		 compiles a Stmt
      typecheckExpr		 compiles a Expr
      tcExtraDecls is used by typecheckStmt/typecheckExpr
      	to compile interface-file decls.
      	It is just a wrapper for:
      tcIfaceImports, which is used by tcExtraDecls and tcIface
      	to compile interface file-file decls.
      tcImports, is similar to tcIfaceImports, but is used only by tcModule
      tcIfaceImports is used when compiling an interface, and can
      	therefore be quite a bit simpler
    • simonpj's avatar
      [project @ 2002-01-30 17:16:04 by simonpj] · 605fd82f
      simonpj authored
      Improved printing
    • simonmar's avatar
      [project @ 2002-01-30 16:54:18 by simonmar] · 913ed135
      simonmar authored
      Fix markup bug.
    • simonmar's avatar
      [project @ 2002-01-30 16:37:59 by simonmar] · 487968ec
      simonmar authored
      comsetic only: shorten some lines.
    • simonmar's avatar
      [project @ 2002-01-30 16:37:14 by simonmar] · 4aed87eb
      simonmar authored
      Simplify the package story inside the compiler.  The new story is
        The Finder no longer determines a module's package based on its
        filesystem location.  The filesystem location indicates only whether
        a given module is in the current package or not (i.e. found along
        the -i path ==> current package, found along the package path ==>
        other package).
        Hence a Module no longer contains a package name.  Instead it just
        contains PackageInfo, which is either ThisPackage or AnotherPackage.
        The compiler uses this information for generating cross-DLL calls
        and omitting certain version information from .hi files.
        The interface still contains the package name.  This isn't used for
        anything right now, but in the future (when we have hierarchical
        libraries) we might use it to automatically determine which packages
        a binary should be linked against.  When building a package, you
        should still use -package-name, but it won't be fatal if you don't.
      The warning/error about package name mismatches has gone away.
    • simonmar's avatar
      [project @ 2002-01-30 16:27:34 by simonmar] · 1e046f78
      simonmar authored
      Set $(HC) *after* including boilerplate.mk, which re-defines it.
    • simonmar's avatar
      [project @ 2002-01-30 16:25:20 by simonmar] · 6c09a020
      simonmar authored
      Don't use :: rules for building HSstd.o, they cause it to be rebuilt
      every time.  According to the GNU make manual, :: rules are vary
      rarely actually useful, and I'm sure we use them too much.
    • simonmar's avatar
      [project @ 2002-01-30 14:05:36 by simonmar] · abbc07ed
      simonmar authored
      Minor cleanups.
    • simonmar's avatar
      [project @ 2002-01-30 14:05:01 by simonmar] · 6682d974
      simonmar authored
      Cleanup sweep, we can now use more of the std fptools build system
      machinery in here.
    • simonmar's avatar
      [project @ 2002-01-30 14:01:29 by simonmar] · 54b445f3
      simonmar authored
      - .hsc sources can generate .hc files too
      - Fix the sense of a conditional
    • sewardj's avatar
      [project @ 2002-01-30 13:23:25 by sewardj] · f50b4739
      sewardj authored
      Fix debug build.
    • simonmar's avatar
      [project @ 2002-01-30 13:13:55 by simonmar] · 0f8bc606
      simonmar authored
      Oops, better not pre-compute PRE_SRCS in paths.mk, because ALL_DIRS is
      not set yet.  Instead, defer it until we include target.mk.
    • simonmar's avatar
      [project @ 2002-01-30 12:17:21 by simonmar] · 975ef297
      simonmar authored
      Clean up this Makefile:
        - Use the enhanced automatic source-finding machinery from
          paths.mk rather than rolling our own,
        - Turn on UseGhcForCc to get our C files compiled with GHC.
          This fixes some obscure bugs caused by the fact that we
          were re-initializing $(CC_OPTS) in this Makefile using
          :=, when it had previously already been set with = (apparently
          different versions of GNU make behave differently presented
          with this kind of mixed assigment).
    • simonmar's avatar
      [project @ 2002-01-30 12:13:59 by simonmar] · 3dfd7d76
      simonmar authored
      GHC_CC_OPTS is a derived version of CC_OPTS with -optc prepended to
      each option.  This is used when $(UseGhcForCc) = "YES" (see suffix.mk).
    • simonmar's avatar
      [project @ 2002-01-30 12:13:11 by simonmar] · a7cfd56b
      simonmar authored
      Introduce a new tweakable $(UseGhcForCc) which if set to "YES" enables
      a different set of suffix rules which build C-ish files using $(HC)
      instead of $(CC).  We'll use this to clean up the ghc/rts Makefile.
    • simonmar's avatar
      [project @ 2002-01-30 12:11:35 by simonmar] · 8335c227
      simonmar authored
      - Consider .hc files as real sources unless they are derived from
        .hs/.lhs sources (using the existing "derived sources" mechanism").
      - Set PRE_SRCS using := rather than =, to avoid re-expanding the
        $(wildcard) multiple times.  In a simple test I did, this can save
        a 1/4 second (depending on the size of the directores involved) per
    • sewardj's avatar
      [project @ 2002-01-30 10:52:38 by sewardj] · dca430c4
      sewardj authored
      Fix syntax error in printing indirect calls in sparc assembly.
    • simonmar's avatar
      [project @ 2002-01-30 10:30:34 by simonmar] · 13a46b43
      simonmar authored
      - Allow sources from multiple subdirectories to be selected, by
        setting $(ALL_DIRS).
      - Automatically detect Happy sources in the same way as other kinds
        of sources.
    • sof's avatar
      [project @ 2002-01-30 01:06:14 by sof] · 17861c1b
      sof authored
      cope with the fact that StgTickyHeader is no more
  3. 29 Jan, 2002 17 commits
    • krasimir's avatar
      [project @ 2002-01-29 19:26:38 by krasimir] · ce56bd8b
      krasimir authored
      Add ObjectIO to standard packages
    • sof's avatar
      [project @ 2002-01-29 18:50:28 by sof] · 7d47dea7
      sof authored
      Add ProjectPatchLevel
    • sof's avatar
      [project @ 2002-01-29 18:32:18 by sof] · 77d12b43
      sof authored
      StgParHeader&StgTickyHeader vestige removal
    • sof's avatar
      [project @ 2002-01-29 18:28:49 by sof] · c732b368
      sof authored
      sigh, steer clear of mingw backquoting issues
    • simonmar's avatar
      [project @ 2002-01-29 17:12:53 by simonmar] · 0cb35eb6
      simonmar authored
      Add instance Eq Exception (and hence instance Eq IOError).
    • sewardj's avatar
      [project @ 2002-01-29 16:54:41 by sewardj] · 975b3c32
      sewardj authored
      x86 only: remove special ccall support for calling PerformGC_wrapper
      using dodgy-looking calling convention.  PerformGC_wrapper was last
      seen alive in GHC 3.X, AFAIK.
    • simonmar's avatar
      [project @ 2002-01-29 16:52:46 by simonmar] · aeefae7c
      simonmar authored
      Remove some empty structs that weren't used.  Apparently empty structs
      are illegal C.
    • sewardj's avatar
      [project @ 2002-01-29 16:52:25 by sewardj] · 383f737f
      sewardj authored
      sparc NCG fixes for f-i-dynamic.
    • simonmar's avatar
      [project @ 2002-01-29 16:50:08 by simonmar] · 2674c7c3
      simonmar authored
      Remove StgParInfo - not used anywhere.
    • simonmar's avatar
      [project @ 2002-01-29 16:49:42 by simonmar] · 1b0e92fe
      simonmar authored
      Remove PAR_ITBL_SIZE - not used anywhere.
    • simonmar's avatar
      [project @ 2002-01-29 16:24:08 by simonmar] · 662555be
      simonmar authored
      Inline mpz_cmp_si() into cmpIntegerInt#, and mpz_cmp() into cmpInteger#
      to offset recent performance degradation caused by outlining of these
      Also remove heap checks in these primitives: they don't do any
      allocation, so no heap check is necessary.
    • simonmar's avatar
      [project @ 2002-01-29 14:41:52 by simonmar] · 5bed878b
      simonmar authored
      Fix highly obscure bug.
      The heap check in cmpIntegerzh_fast was erroneously passing
      cmpIntegerIntzh_fast as the resumption point instead of
      cmpIntegerzh_fast, with the result that if a heap-check happened to
      strike in cmpIntegerzh_fast then we would end up resuming in
      cmpIntegerIntzh and returning an incorrect comparison result.  One
      symptom is that very occasionally floating point numbers would print
      incorrectly (ending in an 'a').
    • sewardj's avatar
      [project @ 2002-01-29 13:22:28 by sewardj] · ec269b12
      sewardj authored
      Teach the NCG how to do f-i-dynamic.  Nothing unexpected.
      sparc-side now needs fixing.
    • sewardj's avatar
      [project @ 2002-01-29 11:07:26 by sewardj] · 7f42c60a
      sewardj authored
      Allow constructors with non-ptr fields to be allocated in-line.
    • simonpj's avatar
      [project @ 2002-01-29 09:58:14 by simonpj] · f2054812
      simonpj authored
      	Rule phasing
      This commit adds a little more control to when rules are enabled.
        {-# RULES
             "foo" [2] forall ...
             "baz" [~2] forall ...
      Rule "foo" is active in phase 2 and later.  The new thing is that the
      "~2" means that Rule "baz" is active in phase 3 and earlier.
      (Remember tha phases decrease towards zero.)
      All the machinery was there to implement this, it just needed the syntax.
      Why do this?  Peter Gammie (at UNSW) found that rules weren't firing
      because of bindings of the form
      	M.f = f
      	f = ....
      where the rules where on the M.f binding.  It turned out that an old
      hack (which have for some time elicited the harmless "shortMeOut" debug
      warnings) prevented this trivial construction from being correctly
      simplified.  The hack in turn derived from a trick in the way the
      foldr/build rule was implemented....and that hack is no longer necessary
      now we can switch rules *off* as well as *on*.
      There are consequential changes in the Prelude foldr/build RULE stuff.
      It's a clean-up.... Instead of strange definitions like
      	map = mapList
      which we had before, we have an ordinary recursive defn of map, together
      with rules to convert first to foldr/build form, and then (if nothing
      happens) back again.
      There's a fairly long comment about the general plan of attack in
      PrelBase, near the defn of map.
    • sof's avatar
      [project @ 2002-01-29 06:15:03 by sof] · a704ee9c
      sof authored
      Update comments re: reloc overflow. A careful re-read of the PE
      spec did prove useful; Sec 4.1 (last para) describes how overflow
      is handled.
    • sof's avatar
      [project @ 2002-01-29 02:41:21 by sof] · 9efa7107
      sof authored
      PEi386/COFF: handle relocation overflows, i.e., if a section is
      marked with the flag (MY)IMAGE_SCN_LNK_NRELOC_OVFL, then
      the first entry in the relocation table holds the 32-bit
      relocation count rather than 16-bit number in the section header.
      Apparently, a version of the MS PE spec exists that spells this
      out, but haven't been able to locate it (perhaps people on the
      'inside' could try to locate an up-to-date version...?) winnt.h
      is clear enough about it though (as is the GNU libbfd sources).
      This is the Right Way to compute the relocation count, but
      unfortunately libbfd / GNU ld is generating bogus output
      when the reloc field overflows (causing objdump/nm etc. to
      crash when trying to read the generated output!) Looking into it.
      Once this has been cleared up/fixed, the splitting up of HSstd.o
      (and HSwin32.o) should be a thing of the past. I've taken the
      liberty of disabling the suspiciously-large-reloc-section test