| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Bye bye STG Hugs!
|
|
|
|
|
| |
Class decls weren't taking functional dependencies into account when
checking for ambiguous type vars. Fixed.
|
|
|
|
|
|
| |
Defer ambiguity test for class members, so that the test is done *after*
we know the (extended) functional dependencies (this is a patch that was
mostly carried over from hugs98, but a few lines were out of place).
|
|
|
|
| |
Get correct line numbers in type/static error messages.
|
|
|
|
| |
Removing the "import privileged" implementation from hugs.
|
|
|
|
| |
Changing PrimPrel to PrelPrim.
|
|
|
|
| |
Nuke inexplicable calls to moduleThisScript.
|
|
|
|
|
|
|
|
| |
Correctly handle constructors with strict fields, which was broken by
overenthusiastic constructor inlining some time back:
* notice if a constructor has strict fields, and set name(n).hasStrict,
both for source modules and interfaces
* if a constr has strict fields, do not inline applications of it
|
|
|
|
|
| |
Making expressions inport Prelude, not PrimPrel,
fixing the implicit import Prelude back to the Haskell semantics.
|
|
|
|
|
|
|
| |
Adding in support for split Hugs Prelude.
There are now two preludes.
(1) PrimPrel - the Prelude defintions, and the extra magic datatypes.
(2) Prelude - the external interface for Prelude.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixing a couple of problems with Quantified identifiers.
(1) The string building routine for Qid's was not using
the new abstraction for showing names. The old abstraction
worked most of the time in the new system, so was only
getting tickled sometimes.
(2) Fixing the local module that top level expressions
evaluate in. By importing quantified Prelude,
this allows top level expressions like Prelude.take
And a trivial Makefile change.
|
|
|
|
|
| |
Make Hugs compile on Win32 again after recent changes. Also, rename
prelude.h to hugsbasictypes.h to avoid conflicts with includes/Prelude.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Further cleanups of connect.h. Also, zap the Args macro. We really
don't need to support K&R C any more.
|
|
|
|
| |
Update .c files to reflect reorganisation of .h files in this directory.
|
|
|
|
|
|
| |
Compilation cleanups:
* Add some prototypes to header files, to avoid compilation warnings.
* Remove irrelevant #ifdeffery (#if NPLUSK, + various others)
|
|
|
|
|
|
|
| |
Porting bug fix from Classic Hugs to STG Hugs. This was
causing crashes when compiling large examples.
Removing some dead code from static.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
improving the synatax and semantics of the privileged import
Typical use might be:
import Prelude
import privileged Prelude ( IORef , unsafePerformIO )
Which means please ignore the export that comes with Prelude,
and let me at compiler internal magic operations, IORef and
unsafePerformIO (both are later exported by IOExt)
I've also updated the stdlib files to use this (hugs only :-).
|
|
|
|
|
|
|
|
|
| |
Changing name of linkPreludeNames to linkPrimitiveNames (cause that
is what it does).
Adding a Hugs extension "import privileged". This will allow us
to remove the many exports from the prelude of the primitive functions
and types, but still allow us to write libraries that use it.
|
|
|
|
| |
Adding the Feb00 changed from Classic Hugs into STG Hugs.
|
|
|
|
| |
startGHCClass(): set the .dsels (superclass dsels) field.
|
|
|
|
|
|
| |
Remember all the classes loaded from an object file group, and
call visitClass on them at the end of processInterfaces(), so that
the .level numbers on the class get calculated.
|
|
|
|
|
| |
finishGHCModule: correctly create export list entries for non-Names
importEntity: allow TUPLE as a kind of TYCON (am dubious about this)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Merging in the various changes between Sep99 Hugs and Nov99 Hugs.
|
|
|
|
|
| |
Delete optimiser.c (the simplifier) and all supporting bits and
pieces.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is to fix the following bugs:
Reported by Description
----------------------------------------------------------------------
Various cutoff value for -c option seems too low.
Andy weirdness with :i C if C is a zero parameter class.
Ross Paterson Problem with rank 2 parameters and "Showable" class.
Jeff Stronger static checking on instances for classes with
functional dependencies.
|
|
|
|
| |
Basic #ifdeffery to make StgHugs compile out of the box on cygwin.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add foreign import/export implementations for x86 stdcall convention.
Make parser notice calling conventions on f-i and f-x declarations,
check they are supported on the platform Hugs is compiled on. Pass
them all the way through the code generator to the interpreter.
Allow f-i/f-x decls to omit the calling convention, in which case
ccall is used. Remove calling convention from all such decls
in the Prelude so it will work on any platform.
|
|
|
|
| |
Make typeVarsIn non-static since interface.c needs to see it.
|
|
|
|
|
|
|
| |
Adding diffs between Hugs98 (Jan99) and Hugs98 (Sep99)
manually to STG Hugs.
Brings in large change to typechecking sub-system.
|
|
|
|
| |
Updating all copyright messages to the same as Hugs98.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added basic support for foreign export dynamic.
Many aspects of it are still broken:
* Only supports x86-linux.
* The range of allowable types is small: Char Int Float Double
Addr and Word.
* Adjustor thunks are never freed.
* Returning Doubles or Floats doesn't work at all.
I expect to fix some of these shortly. foreign import also
needs redoing, so it can accept any number of arguments of
any type.
Also:
* Fixed setRtsFlags in Evaluator.c to make it endian-independent.
* Fixed raisePrim in Evaluator.c so things like division by zero,
array index errors, etc, throw an exception instead of
terminating StgHugs. raisePrim is renamed makeErrorCall.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Changes to improve runtime performance of STG Hugs.
-- Reorganisation of the evaluator (Evaluator.c).
-- Changes to code emission (Assembler.c) to support peephole opts
-- An experimental simplifier (optimise.c).
-- Many supporting bug fixes and minor changes.
-- Experimental implementation of integer for standalone hugs (sainteger.c).
|
|
|
|
|
|
|
|
|
|
| |
Many improvements resulting from first attempt to run nofib suite:
-- More libraries (lib/*.hs) brought into operation
-- Prelude error handling and basic I/O improved
-- Changed bytecode immediate value fields so large constant
-- tables can be compiled
-- Fixed bugs: translation of FATBAR, negative floating point
-- literals, strict constructors, handling of CAFs
|
|
|
|
|
| |
Mods to make STG-hugs able to compile and run small examples. This
commit also includes proper implementations of seq, raise and catch.
|
|
|
|
|
| |
Preliminary results of the merge of STG hugs and 990121. These files
will compile and link, but don't work yet.
|
|
Move 4.01 onto the main trunk.
|