1. 11 Jan, 2000 1 commit
    • sewardj's avatar
      [project @ 2000-01-11 14:09:17 by sewardj] · 1e53309d
      sewardj authored
      startGHCInstance: allocate a name() entry for the instance builder fn,
      and store the name in the instance's .builder field.  Without this,
      it's impossible to generate any code which uses an instance builder :-(
      1e53309d
  2. 07 Jan, 2000 3 commits
    • 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)
      interface.c(startGHCClass):
                    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)
      acc74b01
    • 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)
      107e3692
    • 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.
      9ac5c76c
  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.
      e1016718
    • 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.
      236156d9
    • 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.
      1aad16b6
    • 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.
      4b0d52eb
  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.
      0f92da17
  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.
      3e47ab23
  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.
      a8bf3684
    • 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.
      0c97d649
  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
        storage.h.
      
      * Add findSimpleInstance in storage.c.
      51c33894
  9. 03 Dec, 1999 2 commits
    • sewardj's avatar
      [project @ 1999-12-03 17:01:20 by sewardj] · 68b0b216
      sewardj authored
      More mods to interface file parsing:
      * Strictness annotations in data decls
      * Allow qualified names in a couple more places
      68b0b216
    • sewardj's avatar
      [project @ 1999-12-03 12:39:38 by sewardj] · e3911d34
      sewardj authored
      Add initial support for loading GHC Prelude (doesn't work yet):
      
      * Command line flag, +c/-c to start up in combined or standalone mode.
        In combined mode, looks for GHC's prelude in ghc/interpreter/GhcPrel
        (pro tem).
      
      * Parse unboxed tuple types and usage annotations in interface files.
      e3911d34
  10. 29 Nov, 1999 1 commit
    • 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.
      b3c8ae4e
  11. 29 Oct, 1999 1 commit
  12. 06 Jul, 1999 1 commit
    • sewardj's avatar
      [project @ 1999-07-06 15:24:36 by sewardj] · ca6e1e45
      sewardj authored
      Mods to enable interworking with simple compiled code.  Supports fns and
      data decls.  Classes, instances, primops, don't work yet.
      Unregisterised, mininterpreted x86-ELF is the supported object format.
      GC appears to work correctly.
      ca6e1e45
  13. 07 Jun, 1999 1 commit
    • sewardj's avatar
      [project @ 1999-06-07 17:22:31 by sewardj] · 820f09b2
      sewardj authored
      Many changes needed to support loading of GHC compiled code.  The main
      changes are to parser.y and interface.c to load .hi files and create
      appropriate symbol table entries.  Also, interface.c has the
      beginnings of and ELF loader/linker in it.
      820f09b2
  14. 03 Feb, 1999 1 commit
  15. 02 Dec, 1998 1 commit