[project @ 1999-10-15 11:02:06 by sewardj]
authorsewardj <unknown>
Fri, 15 Oct 1999 11:03:10 +0000 (11:03 +0000)
committersewardj <unknown>
Fri, 15 Oct 1999 11:03:10 +0000 (11:03 +0000)
commitdfb12323d9fd0c8fb717b8e548592f20163b4ed0
tree7900eb0f51b03a254425cd3f978eb1e245071e11
parentf5fd4677bc522dba98447c6b3451441e8ab8e33e
[project @ 1999-10-15 11:02:06 by sewardj]
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.
22 files changed:
ghc/includes/Assembler.h
ghc/interpreter/Makefile
ghc/interpreter/connect.h
ghc/interpreter/free.c
ghc/interpreter/hugs.c
ghc/interpreter/input.c
ghc/interpreter/lib/Prelude.hs
ghc/interpreter/link.c
ghc/interpreter/link.h
ghc/interpreter/parser.y
ghc/interpreter/static.c
ghc/interpreter/storage.c
ghc/interpreter/translate.c
ghc/interpreter/type.c
ghc/lib/hugs/Prelude.hs
ghc/rts/Assembler.c
ghc/rts/Bytecodes.h
ghc/rts/Disassembler.c
ghc/rts/Evaluator.c
ghc/rts/ForeignCall.c
ghc/rts/ForeignCall.h
ghc/rts/RtsAPI.c