[commit: ghc] master: Add new primtypes 'ArrayArray#' and 'MutableArrayArray#' (021a0dd)
Manuel Chakravarty
chak at cse.unsw.edu.au
Wed Dec 7 13:42:34 CET 2011
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/021a0dd265ff34c1e292813c06185eff1d6b5c1c
>---------------------------------------------------------------
commit 021a0dd265ff34c1e292813c06185eff1d6b5c1c
Author: Manuel M T Chakravarty <chak at cse.unsw.edu.au>
Date: Wed Dec 7 22:40:14 2011 +1100
Add new primtypes 'ArrayArray#' and 'MutableArrayArray#'
The primitive array types, such as 'ByteArray#', have kind #, but are represented by pointers. They are boxed, but unpointed types (i.e., they cannot be 'undefined').
The two categories of array types â[Mutable]Array# and [Mutable]ByteArray#â are containers for unboxed (and unpointed) as well as for boxed and pointed types. So far, we lacked support for containers for boxed, unpointed types (i.e., containers for the primitive arrays themselves). This is what the new primtypes provide.
Containers for boxed, unpointed types are crucial for the efficient implementation of scattered nested arrays, which are central to the new DPH backend library dph-lifted-vseg. Without such containers, we cannot eliminate all unboxing from the inner loops of traversals processing scattered nested arrays.
compiler/codeGen/CgPrimOp.hs | 29 +++++++++-
compiler/codeGen/StgCmmPrim.hs | 9 +++-
compiler/prelude/PrelNames.lhs | 6 ++-
compiler/prelude/TysPrim.lhs | 34 ++++++++----
compiler/prelude/primops.txt.pp | 111 ++++++++++++++++++++++++++++++++++++++-
includes/stg/MiscClosures.h | 1 +
rts/Linker.c | 1 +
rts/PrimOps.cmm | 39 ++++++++++++++
utils/genprimopcode/Main.hs | 31 ++++++-----
9 files changed, 227 insertions(+), 34 deletions(-)
Diff suppressed because of size. To see it, use:
git show 021a0dd265ff34c1e292813c06185eff1d6b5c1c
More information about the Cvs-ghc
mailing list