cvs commit: fptools/libraries/base/GHC ForeignPtr.hs

Simon Marlow simonmar at haskell.org
Mon Jun 27 18:31:41 EDT 2005


simonmar    2005/06/27 15:31:41 PDT

  Modified files:
    libraries/base/GHC   ForeignPtr.hs 
  Log:
  As discussed on ghc-users some time ago, optimise the representation
  of ForeignPtr to make withForeignPtr more efficient.  ForeignPtr is
  now represented by a pair of an Addr# and a ForeignPtrContents object.
  
  withForeignPtr just extracts the Addr# and touches the
  ForeignPtrContents.
  
  ForeignPtr no longer uses the primitive ForeignObj# type: it isn't
  required, since we attach the finalizer to the IORef inside
  ForeignPtrContents now.  In fact, the ForeignObj# type is now
  obsolete, and can be removed.
  
  Revision  Changes    Path
  1.21      +36 -30    fptools/libraries/base/GHC/ForeignPtr.hs


More information about the Cvs-libraries mailing list