[commit: ghc] master: Remove left-overs from compareByteArray# inline conversion (6bd352a)

git at git.haskell.org git at git.haskell.org
Thu Nov 9 09:40:50 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/6bd352a85ffe9a649848dc79b017bb018e246d36/ghc

>---------------------------------------------------------------

commit 6bd352a85ffe9a649848dc79b017bb018e246d36
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Thu Nov 9 00:38:53 2017 +0100

    Remove left-overs from compareByteArray# inline conversion
    
    These removes left-overs from e3ba26f8b49700b41ff4672f3f7f6a4e453acdcc
    where I implemented `compareByteArray#` as an out-of-line primop, which
    got optimised into an inline primop shortly afterwards
    (as per 7673561555ae354fd9eed8de1e57c681906e2d49).


>---------------------------------------------------------------

6bd352a85ffe9a649848dc79b017bb018e246d36
 includes/stg/MiscClosures.h |  1 -
 rts/PrimOps.cmm             | 14 --------------
 rts/RtsSymbols.c            |  1 -
 3 files changed, 16 deletions(-)

diff --git a/includes/stg/MiscClosures.h b/includes/stg/MiscClosures.h
index 66e2654..76cfbd6 100644
--- a/includes/stg/MiscClosures.h
+++ b/includes/stg/MiscClosures.h
@@ -351,7 +351,6 @@ RTS_FUN_DECL(stg_casArrayzh);
 RTS_FUN_DECL(stg_newByteArrayzh);
 RTS_FUN_DECL(stg_newPinnedByteArrayzh);
 RTS_FUN_DECL(stg_newAlignedPinnedByteArrayzh);
-RTS_FUN_DECL(stg_compareByteArrayszh);
 RTS_FUN_DECL(stg_isByteArrayPinnedzh);
 RTS_FUN_DECL(stg_isMutableByteArrayPinnedzh);
 RTS_FUN_DECL(stg_shrinkMutableByteArrayzh);
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index 467353a..1dad14b 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -152,20 +152,6 @@ stg_newAlignedPinnedByteArrayzh ( W_ n, W_ alignment )
     return (p);
 }
 
-stg_compareByteArrayszh ( gcptr src1, W_ src1_ofs, gcptr src2, W_ src2_ofs, W_ size )
-// ByteArray# -> Int# -> ByteArray# -> Int# -> Int# -> Int#
-{
-    CInt res;
-    W_ src1p, src2p;
-
-    src1p = src1 + SIZEOF_StgHeader + OFFSET_StgArrBytes_payload + src1_ofs;
-    src2p = src2 + SIZEOF_StgHeader + OFFSET_StgArrBytes_payload + src2_ofs;
-
-    (res) = ccall memcmp(src1p "ptr", src2p "ptr", size);
-
-    return (TO_W_(res));
-}
-
 stg_isByteArrayPinnedzh ( gcptr ba )
 // ByteArray# s -> Int#
 {
diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c
index ff15d77..dd233fa 100644
--- a/rts/RtsSymbols.c
+++ b/rts/RtsSymbols.c
@@ -674,7 +674,6 @@
       SymI_HasProto(stg_casMutVarzh)                                    \
       SymI_HasProto(stg_newPinnedByteArrayzh)                           \
       SymI_HasProto(stg_newAlignedPinnedByteArrayzh)                    \
-      SymI_HasProto(stg_compareByteArrayszh)                            \
       SymI_HasProto(stg_isByteArrayPinnedzh)                            \
       SymI_HasProto(stg_isMutableByteArrayPinnedzh)                     \
       SymI_HasProto(stg_shrinkMutableByteArrayzh)                       \



More information about the ghc-commits mailing list