1. 15 Sep, 2013 2 commits
    • Duncan Coutts's avatar
      New primops for byte range copies ByteArray# <-> Addr# · f11289f6
      Duncan Coutts authored
      We have primops for copying ranges of bytes between ByteArray#s:
       * ByteArray# -> MutableByteArray#
       * MutableByteArray# -> MutableByteArray#
      This extends it with three further cases:
       * Addr# -> MutableByteArray#
       * ByteArray# -> Addr#
       * MutableByteArray# -> Addr#
      One use case for these is copying between ForeignPtr-based
      representations and in-heap arrays (like Text, UArray etc).
      The implementation is essentially the same as for the existing
      primops, and shares the memcpy stuff in the code generators.
      Defficiencies / future directions: none of these primops (existing
      or the new ones) let one take advantage of knowing that ByteArray#s
      are word-aligned in memory. Though it is unclear that any of the
      code generators would make use of this information unless the size
      to copy is also known at compile time.
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
    • bos's avatar
      Cause "make install" to install dynamic libraries (#8194) · 865956a6
      bos authored
      Our special ghc-cabal command needs to be told that we are building with
      dynamic library support when it does its copying. We do so by passing an
      extra parameter from ghc.mk.
  2. 14 Sep, 2013 9 commits
  3. 13 Sep, 2013 14 commits
  4. 12 Sep, 2013 3 commits
    • Jan Stolarek's avatar
      Improve sinking pass · ad15c2b4
      Jan Stolarek authored
      This commit does two things:
        * Allows duplicating of global registers and literals by inlining
          them. Previously we would only inline global register or literal
          if it was used only once.
        * Changes method of determining conflicts between a node and an
          assignment. New method has two advantages. It relies on
          DefinerOfRegs and UserOfRegs typeclasses, so if a set of registers
          defined or used by a node should ever change, `conflicts` function
          will use the changed definition. This definition also catches
          more cases than the previous one (namely CmmCall and CmmForeignCall)
          which is a step towards making it possible to run sinking pass
          before stack layout (currently this doesn't work).
      This patch also adds a lot of comments that are result of about two-week
      long investigation of how sinking pass works and why it does what it does.
    • Jan Stolarek's avatar
      Add missing semicolon in rts/Linker.c (#8271) · 66aa489f
      Jan Stolarek authored
      And remove some trailing whitespaces from that file.
    • Austin Seipp's avatar
      Implement the AMP warning (#8004) · 75a9664a
      Austin Seipp authored
      This patch implements a warning when definitions conflict with the
      Applicative-Monad Proposal (AMP), described in #8004. Namely, this will
      cause a warning iff:
          * You have an instance of Monad, but not Applicative
          * You have an instance of MonadPlus, but not Alternative
          * You locally defined a function named join, <*>, or pure.
      In GHC 7.10, these warnings will actually be enforced with superclass
      constraints through changes in base, so programs will fail to compile
      This warning is enabled by default. Unfortunately, not all of
      our upstream libraries have accepted the appropriate patches. So we
      temporarily fix ./validate by ignoring the AMP warning.
      Dan Rosén made an initial implementation of this change, and the
      remaining work was finished off by David Luposchainsky. I finally made
      some minor refactorings.
      Authored-by: danr's avatarDan Rosén <danr@chalmers.se>
      Authored-by: quchen's avatarDavid Luposchainsky <dluposchainsky@gmail.com>
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
  5. 11 Sep, 2013 6 commits
  6. 10 Sep, 2013 6 commits