diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2014-09-23 08:44:45 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-09-23 08:44:46 -0500 |
commit | 330bb3ef856166d18d959b377f12a51c2629b223 (patch) | |
tree | 2beed4c0c3829747428f8b775a9e43eb84144544 /compiler/utils/FastFunctions.lhs | |
parent | 2a743bbddd4de41a77af9b83ec4720cd013292cf (diff) | |
download | haskell-330bb3ef856166d18d959b377f12a51c2629b223.tar.gz |
Delete all /* ! __GLASGOW_HASKELL__ */ code
Summary:
```
git grep -l '\(#ifdef \|#if defined\)(\?__GLASGOW_HASKELL__)\?'
```
Test Plan: validate
Reviewers: rwbarton, hvr, austin
Reviewed By: rwbarton, hvr, austin
Subscribers: rwbarton, simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D218
Diffstat (limited to 'compiler/utils/FastFunctions.lhs')
-rw-r--r-- | compiler/utils/FastFunctions.lhs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/compiler/utils/FastFunctions.lhs b/compiler/utils/FastFunctions.lhs index 457fcc9c93..854bd13b11 100644 --- a/compiler/utils/FastFunctions.lhs +++ b/compiler/utils/FastFunctions.lhs @@ -19,8 +19,6 @@ import FastTypes import Data.IORef import System.IO.Unsafe -#if defined(__GLASGOW_HASKELL__) - import GHC.Exts import GHC.Word import GHC.Base (unsafeChr) @@ -37,29 +35,6 @@ indexWord8OffFastPtrAsFastChar p i = indexCharOffAddr# p i indexWord8OffFastPtrAsFastInt p i = word2Int# (indexWord8OffAddr# p i) -- or ord# (indexCharOffAddr# p i) -#else /* ! __GLASGOW_HASKELL__ */ - -import Foreign.Ptr -import Data.Word - --- hey, no harm inlining it, :-P -{-# INLINE inlinePerformIO #-} -inlinePerformIO :: IO a -> a -inlinePerformIO = unsafePerformIO - -unsafeDupableInterleaveIO :: IO a -> IO a -unsafeDupableInterleaveIO = unsafeInterleaveIO - --- truly, these functions are unsafe: they assume --- a certain immutability of the pointer's target area. -indexWord8OffFastPtr p i = inlinePerformIO (peekByteOff p n) :: Word8 -indexWord8OffFastPtrAsFastInt p i = - iUnbox (fromIntegral (inlinePerformIO (peekByteOff p n) :: Word8)) -indexWord8OffFastPtrAsFastChar p i = - fastChr (iUnbox (fromIntegral (inlinePerformIO (peekByteOff p n) :: Word8))) - -#endif /* ! __GLASGOW_HASKELL__ */ - --just so we can refer to the type clearly in a macro type Global a = IORef a global :: a -> Global a |