[project @ 2000-03-22 18:14:22 by sewardj]
authorsewardj <unknown>
Wed, 22 Mar 2000 18:14:23 +0000 (18:14 +0000)
committersewardj <unknown>
Wed, 22 Mar 2000 18:14:23 +0000 (18:14 +0000)
commit73be95706890e7e8aa344d51592c5b7b02e07216
tree3456798af4b17b15605c91de017abc38caa46fde
parent048117fec059dd2a75c1a1a1e0f9216aa766ad77
[project @ 2000-03-22 18:14:22 by sewardj]
Initial commit of major changes to module chasing and storage management:

* Total reimplementation of module chasing (see achieveTargetModules
  in hugs.c).  Build, maintain and use module dependency graphs
  to decide what needs reloading when.  The old mechanism with a
  stack of scripts, etc, is gone forever.  All the rest of these points
  are in support of the module-chasing change:

* The result of parsing a module is now a parse tree, rather than a
  half-baked parse tree and a bunch of side-effects.  Hooray!

* Redo symbol tables for Names, Tycons, Classes, Instances and
  Modules.  They are now dynamically expandable, doubling in size
  automatically when full, and use a freelist system to keep track
  of available slots.

* Allow arbitrary modules to be deleted from the system.  The
  main honcho here is nukeModule().

* Not strictly necessary, but ... unify the address space for all
  compile-time entities.  See revised whatIs().  Text is part of
  the unified address space.  This is very convenient for debugging.
  print() can now print practically anything.  Generally simplify
  storage management as much as possible, and zap the years of
  elaborate hacks needed to make Hugs work well in 16-bit systems.
  Added a load of sanity-checking support to storage.[ch].

* We don't support project files any more.  They were useful for a
  while, but no longer seem relevant.

* Nuked a large bunch of irrelevant options in rts/options.h.

As of this commit, the system can load and chase modules, both in
standalone and combined modes.  The :l (load), :a (also), :r (refresh),
:i (info), :t (show type) and :m (set eval module) commands appear
to work.  There are also several temporary limitations which will
be fixed soon:

* Anything to do with external editors, etc, doesn't work.

* The downward-closure-of-object-code (if M is object, all
  modules below M must be too) is not enforced nor checked for.
  It needs to be.

* Module M _must_ reside in M.hs/M.o (sigh).  To be fixed.

* Error handling is probably flaky, and interrupt handling
  very likely is.

* Error messages don't have line numbers.  (A 5-minute fix).

* Progress messages are all at sea; needs re-thinking now that
  the order in which things are done is radically different.

* Compile-time GC is temporarily disabled whilst I figure out how
  to stress-test the GC.

* Freed-up symbol table entries are never re-entered on the free
  lists -- a debugging measure.

* :% is given a bad type in combined mode.  To be investigated.
17 files changed:
ghc/interpreter/Makefile
ghc/interpreter/codegen.c
ghc/interpreter/connect.h
ghc/interpreter/errors.h
ghc/interpreter/hugs.c
ghc/interpreter/input.c
ghc/interpreter/interface.c
ghc/interpreter/lift.c
ghc/interpreter/link.c
ghc/interpreter/machdep.c
ghc/interpreter/parser.y
ghc/interpreter/prelude.h
ghc/interpreter/scc.c
ghc/interpreter/static.c
ghc/interpreter/storage.c
ghc/interpreter/storage.h
ghc/interpreter/subst.c