1. 10 Jan, 2000 3 commits
  2. 07 Jan, 2000 4 commits
    • sewardj's avatar
      [project @ 2000-01-07 17:49:29 by sewardj] · 48fd138c
      sewardj authored
      type.c: implement typechecker(POSTPREL), so that initialisation
          of the typechecker is completed correctly in combined mode.
      storage.c(addTupleTycon): create a name table entry for () so that
          nameUnit in the above can be bound to something.
    • sewardj's avatar
      [project @ 2000-01-07 16:56:47 by sewardj] · acc74b01
      sewardj authored
      storage.c:   unZcode tuple types (eg Z4T) correctly (off by one)
                    remember to do dictapsToQualtype on class member types
                 (processInterfaces): return a Bool if Prelude.hi was
                    processed, so we can know when to do everybody(POSTPREL)
    • sewardj's avatar
      [project @ 2000-01-07 15:31:12 by sewardj] · 107e3692
      sewardj authored
      finishGHCModule: correctly create export list entries for non-Names
      importEntity: allow TUPLE as a kind of TYCON (am dubious about this)
    • sewardj's avatar
      [project @ 2000-01-07 10:29:59 by sewardj] · 9ac5c76c
      sewardj authored
      Add a few more symbols to EXTERN_SYMS to track recent GHC Prelude changes.
  3. 06 Jan, 2000 2 commits
  4. 05 Jan, 2000 4 commits
    • andy's avatar
      [project @ 2000-01-05 19:10:21 by andy] · e1016718
      andy authored
      Commenting out the debugging messages for in the new interface code.
    • sewardj's avatar
      [project @ 2000-01-05 18:05:33 by sewardj] · 236156d9
      sewardj authored
      Fix more interface-reading bugs:
      -- Qualtypes were not being generated from DICTAPs for overloaded
         non-class values.  New function dictapsToQualtype to handle this.
      -- Incorrect construction of constructor result type in startGHCDataDecl
         for parameterised types eg   Just :: a -> Maybe a.
      Changed meaning of DICTAP, so that the construction is
        ap(DICTAP, (QConId, Type))  rather than
        ap(DICTAP, (QConId, [Type])).  Will have to undo this if we want
                                       to support multiparam type classes.
    • sewardj's avatar
      [project @ 2000-01-05 15:57:40 by sewardj] · 1aad16b6
      sewardj authored
      Remember to add entities to module(m).names/.tycons/.classes as well as
      to module(m).exports.  Otherwise the 'eval environment' will be wrong.
      Add assertions in storage.c for addName/addTycon/addClass.
    • sewardj's avatar
      [project @ 2000-01-05 13:53:36 by sewardj] · 4b0d52eb
      sewardj authored
      Fix some serious errors in the handling of instances in interfaces.
  5. 20 Dec, 1999 1 commit
    • sewardj's avatar
      [project @ 1999-12-20 16:55:26 by sewardj] · 0f92da17
      sewardj authored
      * Fix silly bugs in new linker, object.[ch].
      * Allow modules to have arbitrary numbers of "extra" object files
        as well as their primary object file.  Initial requirement is
        that Prelude needs libHS_cbits.o/.dll as well as Prelude.o
        module(m).object is the primary object
        module(m).objectExtras are the extra objects
        module(m).objectExtraNames :: [Text] are their names.
        Modify machdep.c to assume that extra objects for module M
        live in the same directory as M's primary object.
      * Stuff 130ish symbol names into the RTS symbol table, enough
        so that the whole Prelude can be linked.  That includes symbols
        in the C library needed by libHS_cbits.  This is very hacky
        and needs to be fixed properly.
  6. 17 Dec, 1999 1 commit
    • sewardj's avatar
      [project @ 1999-12-17 16:34:08 by sewardj] · 3e47ab23
      sewardj authored
      Reorganised object code loader/linker to make it much more modular and
      cleaner.  All the machinery is now in object.[ch].  This stuff is
      packaged up as close to a standalone library as I can reasonably get
      it -- in particular, it knows nothing about Hugs -- so that the linker
      could easily be used in some entirely different application with
      almost no changes, if we so desire.
      Minor mods to interface.c & storage.c to use the new linker API.
  7. 16 Dec, 1999 2 commits
    • sewardj's avatar
      [project @ 1999-12-16 16:42:56 by sewardj] · a8bf3684
      sewardj authored
      Add extended version of previous commit message as a comment.
    • sewardj's avatar
      [project @ 1999-12-16 16:34:40 by sewardj] · 0c97d649
      sewardj authored
      Further major improvements in interface processing, mostly in the
      handling of types.
      Interfaces can contain references to unboxed types, and these need to
      be handled carefully.  The following is a summary of how the interface
      loader now works.  It is applied to groups of interfaces simultaneously,
      viz, the entire Prelude at once:
      1.  Throw away any entity not mentioned in the export lists.
      2.  Delete type (not data or newtype) definitions which refer to
          unknown types in their right hand sides.  Because Hugs doesn't
          know of any unboxed types, this has the side effect of removing
          all type defns referring to unboxed types.  Repeat step 2 until
          a fixed point is reached.
      3.  Make abstract all data/newtype defns which refer to an unknown
          type.  eg, data Word = MkW Word# becomes data Word, because
          Word# is unknown.  Hugs is happy to know about abstract boxed
          Words, but not about Word#s.
      4.  Step 2 could delete types referred to by values, instances and
          classes.  So filter all entities, and delete those referring to
          unknown types _or_ classes.  This could cause other entities
          to become invalid, so iterate step 4 to a fixed point.
          After step 4, the interfaces no longer contain anything
          unpalatable to Hugs.
      5.  Steps 1-4 operate purely on the iface syntax trees.  We now start
          creating symbol table entries.  First, create a module table
          entry for each interface, and locate and read in the corresponding
          object file.
      6.  Traverse all interfaces.  For each entity, create an entry in
          the name, tycon, class or instance table, and fill in relevant
          fields, but do not attempt to link tycon/class/instance/name uses
          to their symbol table entries.
      7.  Revisit all symbol table entries created in step 6.  We should
          now be able to replace all references to tycons/classes/instances/
          names with the relevant symbol table entries.
      8.  Traverse all interfaces.  For each iface, examine the export lists
          and use it to build export lists in the module table.  Do the
          implicit 'import Prelude' thing if necessary.  Finally, resolve
          references in the object code for this module.
      I'm sure the number of passes could be reduced.  For the moment,
      understandability is of much higher priority.
      Hugs can now complete stages 1 through 8 for the whole GHC Prelude,
      excepting doing the object linking, which needs further work.
  8. 10 Dec, 1999 1 commit
    • sewardj's avatar
      [project @ 1999-12-10 15:59:41 by sewardj] · 51c33894
      sewardj authored
      Major improvements in interface processing, and minor supporting
      improvements to CT-storage management.
      * Make the iface parser return the complete interface as a single
        tree, which is processed later.  Added abs syntax tags
        I_INTERFACE .. I_VALUE to support this.
      * Add tagged ("z") 2,3,4,5 tuples.  Because they are tagged, they can't
        be confused with lists, etc.  Selectors zfst, zsnd ... zsel45, zsel55
        check tags first.  Iface processing uses z-tuples wherever it can.
      * Add unap as a safe "inverse" of ap; it checks tags.  So
        unap(TAG1, ap(TAG2,cell)) == cell but only if TAG1==TAG2, else
        assertion failure.
      * In interface.c, clean up the startGHC*/endGHC* functions.
        processInterfaces() is the top-level driver; it makes 4
        passes over the supplied iface trees.
      * Throw away iface symbols not mentioned in export lists.
      * Use iface export lists to construct both the export and
        eval environments for a module.
      * Don't use Texts to refer to things.  Instead use ConId and
        VarId.  Added ConId and VarId as synonyms for Cell in
      * Add findSimpleInstance in storage.c.
  9. 07 Dec, 1999 2 commits
    • sewardj's avatar
      [project @ 1999-12-07 11:36:40 by sewardj] · 95b10333
      sewardj authored
      Correctly detect saturated applications of tuples, following
      recent change to Tuple machinery in Hugs.
    • sewardj's avatar
      [project @ 1999-12-07 11:14:56 by sewardj] · 6478af6d
      sewardj authored
      Don't create a new infotable for every constructor application.
      Amazingly, that's what the codegen.c used to do.  It didn't generate
      vast numbers of redundant infotables until recently, when I changed
      translate.c to generate saturated constructor applications in line.
      Prior to that, there was only ever one application of each constructor,
      so the old scheme was ok.
      Also, fix the assembler so that info table ptrs are commoned up.
      Eg, for [1,2,3], store only one copy of the address of the (:) itbl,
      rather than 3, in the BCO.
  10. 06 Dec, 1999 3 commits
    • sewardj's avatar
      [project @ 1999-12-06 16:47:07 by sewardj] · 0e0bde9e
      sewardj authored
      Remove compile-time address space allocated to tuples, and remove all
      references to TUPMIN.  I think I have fixed the address mapping for
      when TREX is defined, but you never know.
    • sewardj's avatar
      [project @ 1999-12-06 16:25:23 by sewardj] · 39135867
      sewardj authored
      Remove Hugs' special treatment of tuples, and instead have them as
      just another Tycon.  This is to make interworking with GHC simpler.
      Put tuple entries in the Tycon table.  Modify isTycon, isTuple, tupleOf,
      mkTuple and whatIs so that client code doesn't see any difference.
      Add allocTupleTycon to manufacture tuple Tycon entries as startup.
    • sewardj's avatar
      [project @ 1999-12-06 16:20:26 by sewardj] · 7c0ef81a
      sewardj authored
      Only detect (# and #) as special tokens when parsing interface files.
  11. 03 Dec, 1999 5 commits
  12. 01 Dec, 1999 3 commits
  13. 29 Nov, 1999 2 commits
    • sewardj's avatar
      [project @ 1999-11-29 18:59:23 by sewardj] · b3c8ae4e
      sewardj authored
      Make StgHugs use the same naming scheme as GHC does for class +
      instance machinery.
      Add machinery to do Z-encoding/decoding of names extracted from
      interface files.
      Make the ELF object loader work again.  It seemed to have suffered
      slight bitrot over the past couple of months.  Fix various minor bugs.
      Track a small change in interface file syntax.
      Make Printer.c print tagged-unboxed stack sections in a decent way
      now that Alastair-style stack tags have been abandoned.
    • sewardj's avatar
      [project @ 1999-11-29 18:53:14 by sewardj] · 13d14c51
      sewardj authored
      Implement foreign import dynamic.
  14. 25 Nov, 1999 4 commits
  15. 24 Nov, 1999 3 commits