summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-06-03 22:22:42 +0200
committerBen Gamari <ben@smart-cactus.org>2016-06-04 09:35:49 +0200
commit4dbacbc89a999bf371d51194b4662a209ac907f1 (patch)
tree50f20abee2974212ef19ae7660802a3da367e7b9 /testsuite/tests/codeGen
parenteda73a3ad3fdd98cf877b25c3c984c6e1b2217fc (diff)
downloadhaskell-4dbacbc89a999bf371d51194b4662a209ac907f1.tar.gz
Rename isPinnedByteArray# to isByteArrayPinned#
Reviewers: simonmar, duncan, erikd, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2290 GHC Trac Issues: #12059
Diffstat (limited to 'testsuite/tests/codeGen')
-rw-r--r--testsuite/tests/codeGen/should_run/T12059.hs27
-rw-r--r--testsuite/tests/codeGen/should_run/T12059.stdout2
2 files changed, 26 insertions, 3 deletions
diff --git a/testsuite/tests/codeGen/should_run/T12059.hs b/testsuite/tests/codeGen/should_run/T12059.hs
index 0b99bd36a4..3d815fcd1c 100644
--- a/testsuite/tests/codeGen/should_run/T12059.hs
+++ b/testsuite/tests/codeGen/should_run/T12059.hs
@@ -8,20 +8,41 @@ import GHC.IO
main :: IO ()
main = do
+ -- Unpinned MutableByteArray
r <- IO $ \s0 ->
case newByteArray# 1024# s0 of
(# s1, mba #) ->
- (# s1, isTrue# (isPinnedByteArray# mba) #)
+ (# s1, isTrue# (isMutableByteArrayPinned# mba) #)
print r
+ -- Pinned MutableByteArray
r <- IO $ \s0 ->
case newPinnedByteArray# 1024# s0 of
(# s1, mba #) ->
- (# s1, isTrue# (isPinnedByteArray# mba) #)
+ (# s1, isTrue# (isMutableByteArrayPinned# mba) #)
print r
+ -- Pinned, Aligned MutableByteArray
r <- IO $ \s0 ->
case newAlignedPinnedByteArray# 1024# 16# s0 of
(# s1, mba #) ->
- (# s1, isTrue# (isPinnedByteArray# mba) #)
+ (# s1, isTrue# (isMutableByteArrayPinned# mba) #)
+ print r
+
+ -- Unpinned ByteArray
+ r <- IO $ \s0 ->
+ case newByteArray# 1024# s0 of
+ (# s1, mba #) ->
+ case unsafeFreezeByteArray# mba s1 of
+ (# s2, ba #) ->
+ (# s2, isTrue# (isByteArrayPinned# ba) #)
+ print r
+
+ -- Pinned ByteArray
+ r <- IO $ \s0 ->
+ case newPinnedByteArray# 1024# s0 of
+ (# s1, mba #) ->
+ case unsafeFreezeByteArray# mba s1 of
+ (# s2, ba #) ->
+ (# s2, isTrue# (isByteArrayPinned# ba) #)
print r
diff --git a/testsuite/tests/codeGen/should_run/T12059.stdout b/testsuite/tests/codeGen/should_run/T12059.stdout
index 70cea9e2ea..8a39f7a810 100644
--- a/testsuite/tests/codeGen/should_run/T12059.stdout
+++ b/testsuite/tests/codeGen/should_run/T12059.stdout
@@ -1,3 +1,5 @@
False
True
True
+False
+True \ No newline at end of file