• sewardj's avatar
    [project @ 1999-10-15 11:02:06 by sewardj] · dfb12323
    sewardj authored
    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.
    dfb12323
RtsAPI.c 9.15 KB