Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Jul 20, 2011

  1. Simon Marlow

    remove some dead code

    authored July 14, 2011

Jul 01, 2011

  1. Simon Marlow

    update freeHaskellFuncationPtr following changes to x86 adjustors

    (fixes various ffi test failures on x86.  This change was supposed to
    be part of 9f61598, but somehow it
    got lost).
    authored June 30, 2011

Jun 29, 2011

  1. Simon Marlow

    Use the x86/Darwin implementation of Adjustors on all x86 platforms,

    as it maintains 16-byte alignment of the stack pointer (see #5250)
    authored June 29, 2011

Jul 13, 2010

  1. igfoo

    Change some TARGET tests to HOST tests in the RTS

    Which was being used seemed to be random
    authored July 13, 2010

Jun 19, 2010

  1. igfoo

    SET_ARR_HDR's last argument is now a number of bytes, rather than words

    This avoids unnecessary work and potential loss of information
    authored June 19, 2010
  2. igfoo

    Replace an (incorrect) bytes-to-words calculation with ROUNDUP_BYTES_…

    authored June 19, 2010

Aug 07, 2009

  1. igfoo

    Fix the build on OS X

    authored August 07, 2009

Aug 03, 2009

  1. Simon Marlow

    x86_64 warning fixes

    authored August 03, 2009

Aug 02, 2009

  1. Simon Marlow

    RTS tidyup sweep, first phase

    The first phase of this tidyup is focussed on the header files, and in
    particular making sure we are exposinng publicly exactly what we need
    to, and no more.
     - Rts.h now includes everything that the RTS exposes publicly,
       rather than a random subset of it.
     - Most of the public header files have moved into subdirectories, and
       many of them have been renamed.  But clients should not need to
       include any of the other headers directly, just #include the main
       public headers: Rts.h, HsFFI.h, RtsAPI.h.
     - All the headers needed for via-C compilation have moved into the
       stg subdirectory, which is self-contained.  Most of the headers for
       the rest of the RTS APIs have moved into the rts subdirectory.
     - I left MachDeps.h where it is, because it is so widely used in
       Haskell code.
     - I left a deprecated stub for RtsFlags.h in place.  The flag
       structures are now exposed by Rts.h.
     - Various internal APIs are no longer exposed by public header files.
     - Various bits of dead code and declarations have been removed
     - More gcc warnings are turned on, and the RTS code is more
     - More source files #include "PosixSource.h", and hence only use
       standard POSIX (1003.1c-1995) interfaces.
    There is a lot more tidying up still to do, this is just the first
    pass.  I also intend to standardise the names for external RTS APIs
    (e.g use the rts_ prefix consistently), and declare the internal APIs
    as hidden for shared libraries.
    authored August 02, 2009

May 20, 2009

  1. igfoo

    OS X / amd64 fixes

    authored May 20, 2009

Sep 19, 2008

  1. Simon Marlow

    On Linux use libffi for allocating executable memory (fixed #738)

    authored September 19, 2008

Jul 29, 2008

  1. igfoo

    Fix a typo in powerpc/Linux-only code; spotted by Jeroen Pulles

    authored July 29, 2008

Apr 08, 2008

  1. Import libffi-3.0.4, and use it to provide FFI support in GHCi

    This replaces the hand-rolled architecture-specific FFI support in
    GHCi with the standard libffi as used in GCJ, Python and other
    projects.  I've bundled the complete libffi-3.0.4 tarball in the
    source tree in the same way as we do for GMP, the difference being
    that we always build and install our own libffi regardless of whether
    there's one on the system (it's small, and we don't want
    dependency/versioning headaches).
    In particular this means that unregisterised builds will now have a
    fully working GHCi including FFI out of the box, provided libffi
    supports the platform.
    There is also code in the RTS to use libffi in place of
    rts/Adjustor.c, but it is currently not enabled if we already have
    support in Adjustor.c for the current platform.  We need to assess the
    performance impact before using libffi here too (in GHCi we don't care
    too much about performance).
    authored April 08, 2008

Jan 04, 2008

  1. Use the correct libffi type for pointers

    authored January 04, 2008

Jan 03, 2008

  1. Optionally use libffi to implement 'foreign import "wrapper"' (#793)

    To enable this, set UseLibFFI=YES in mk/  
    The main advantage here is that this reduces the porting effort for
    new platforms: libffi works on more architectures than our current
    adjustor code, and it is probably more heavily tested.  We could
    potentially replace our existing code, but since it is probably faster
    than libffi (just a guess, I'll measure later) and is already working,
    it doesn't seem worthwhile.
    Right now, you must have libffi installed on your system.  I used the
    one supplied by Debian/Ubuntu.
    authored January 03, 2008

Oct 29, 2007

  1. Aaron Tomb

    Fix freeHaskellFunctionPtr for Darwin/i386

    authored October 29, 2007

Oct 16, 2007

  1. remove an incorrect assertion

    authored October 16, 2007

Jun 01, 2007

  1. remove OpenBSD-specific initAdjustor() code that shouldn't be require…

    …d now
    Submitted by: Matthias Kilian <>
    authored June 01, 2007

Apr 01, 2007

  1. fix adjustor generation on ia64 (test case ffi009)

    Some fixes to adjustor functions.  The 8-byte address returned by the 
    allocator is adjusted to be aligned to 16-byte boundaries.  Fixed a typo 
    in inserting an immediate address into an instruction.
    This fixes the calls to 5-argument and 6-argument functions in ffi009.  
    Some functions still break.  I suspect it's related to passing arguments on 
    the stack.
    authored April 01, 2007

Nov 15, 2006

  1. remove unused includes, now that Storage.h & Stable.h are included by…

    … Rts.h
    authored November 15, 2006

Oct 24, 2006

  1. Split GC.c, and move storage manager into sm/ directory

    In preparation for parallel GC, split up the monolithic GC.c file into
    smaller parts.  Also in this patch (and difficult to separate,
      - Don't include Stable.h in Rts.h, instead just include it where
      - consistently use STATIC_INLINE in source files, and INLINE_HEADER
        in header files.  STATIC_INLINE is now turned off when DEBUG is on,
        to make debugging easier.
      - The GC no longer takes the get_roots function as an argument.
        We weren't making use of this generalisation.
    authored October 24, 2006

May 30, 2006

  1. replace stgMallocBytesRWX() with our own allocator

    See bug #738
    Allocating executable memory is getting more difficult these days.  In
    particular, the default SELinux policy on Fedora Core 5 disallows
    making the heap (i.e. malloc()'d memory) executable, although it does
    apparently allow mmap()'ing anonymous executable memory by default.
    Previously, stgMallocBytesRWX() used malloc() underneath, and then
    tried to make the page holding the memory executable.  This was rather
    hacky and fails with Fedora Core 5.  
    This patch adds a mini-allocator for executable memory, based on the
    block allocator.  We grab page-sized blocks and make them executable,
    then allocate small objects from the page.  There's a simple free
    function, that will free whole pages back to the system when they are
    authored May 30, 2006

May 24, 2006

  1. fix a _TARGET_ARCH that should be _HOST_ARCH

    authored May 24, 2006

Apr 07, 2006

  1. Reorganisation of the source tree

    Most of the other users of the fptools build system have migrated to
    Cabal, and with the move to darcs we can now flatten the source tree
    without losing history, so here goes.
    The main change is that the ghc/ subdir is gone, and most of what it
    contained is now at the top level.  The build system now makes no
    pretense at being multi-project, it is just the GHC build system.
    No doubt this will break many things, and there will be a period of
    instability while we fix the dependencies.  A straightforward build
    should work, but I haven't yet fixed binary/source distributions.
    Changes to the Building Guide will follow, too.
    authored April 07, 2006
Something went wrong with that request. Please try again.