[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.
Showing
- ghc/interpreter/Makefile 2 additions, 2 deletionsghc/interpreter/Makefile
- ghc/interpreter/codegen.c 33 additions, 26 deletionsghc/interpreter/codegen.c
- ghc/interpreter/connect.h 15 additions, 23 deletionsghc/interpreter/connect.h
- ghc/interpreter/errors.h 7 additions, 11 deletionsghc/interpreter/errors.h
- ghc/interpreter/hugs.c 937 additions, 845 deletionsghc/interpreter/hugs.c
- ghc/interpreter/input.c 18 additions, 54 deletionsghc/interpreter/input.c
- ghc/interpreter/interface.c 39 additions, 68 deletionsghc/interpreter/interface.c
- ghc/interpreter/lift.c 3 additions, 3 deletionsghc/interpreter/lift.c
- ghc/interpreter/link.c 40 additions, 26 deletionsghc/interpreter/link.c
- ghc/interpreter/machdep.c 6 additions, 38 deletionsghc/interpreter/machdep.c
- ghc/interpreter/parser.y 94 additions, 112 deletionsghc/interpreter/parser.y
- ghc/interpreter/prelude.h 4 additions, 67 deletionsghc/interpreter/prelude.h
- ghc/interpreter/scc.c 7 additions, 6 deletionsghc/interpreter/scc.c
- ghc/interpreter/static.c 30 additions, 42 deletionsghc/interpreter/static.c
- ghc/interpreter/storage.c 752 additions, 761 deletionsghc/interpreter/storage.c
- ghc/interpreter/storage.h 448 additions, 321 deletionsghc/interpreter/storage.h
- ghc/interpreter/subst.c 3 additions, 16 deletionsghc/interpreter/subst.c
Loading
Please register or sign in to comment