Commit 43d9be89 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Remove more ifdeffery

parent ba58376a
...@@ -230,13 +230,12 @@ dataConInfoPtrToName x = do ...@@ -230,13 +230,12 @@ dataConInfoPtrToName x = do
-} -}
getConDescAddress :: Ptr StgInfoTable -> IO (Ptr Word8) getConDescAddress :: Ptr StgInfoTable -> IO (Ptr Word8)
getConDescAddress ptr = do getConDescAddress ptr
#ifdef GHCI_TABLES_NEXT_TO_CODE | ghciTablesNextToCode = do
offsetToString <- peek $ ptr `plusPtr` (- wORD_SIZE) offsetToString <- peek $ ptr `plusPtr` (- wORD_SIZE)
return $ (ptr `plusPtr` stdInfoTableSizeB) `plusPtr` (fromIntegral (offsetToString :: StgWord)) return $ (ptr `plusPtr` stdInfoTableSizeB) `plusPtr` (fromIntegral (offsetToString :: StgWord))
#else | otherwise =
peek $ intPtrToPtr $ (ptrToIntPtr ptr) + fromIntegral stdInfoTableSizeB peek $ intPtrToPtr $ (ptrToIntPtr ptr) + fromIntegral stdInfoTableSizeB
#endif
-- parsing names is a little bit fiddly because we have a string in the form: -- parsing names is a little bit fiddly because we have a string in the form:
-- pkg:A.B.C.foo, and we want to split it into three parts: ("pkg", "A.B.C", "foo"). -- pkg:A.B.C.foo, and we want to split it into three parts: ("pkg", "A.B.C", "foo").
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
\begin{code} \begin{code}
module Util ( module Util (
debugIsOn, isWindowsHost, isWindowsTarget, isDarwinTarget, debugIsOn, ghciTablesNextToCode,
isWindowsHost, isWindowsTarget, isDarwinTarget,
-- general list processing -- general list processing
zipEqual, zipWithEqual, zipWith3Equal, zipWith4Equal, zipEqual, zipWithEqual, zipWith3Equal, zipWith4Equal,
...@@ -118,6 +119,13 @@ debugIsOn = True ...@@ -118,6 +119,13 @@ debugIsOn = True
debugIsOn = False debugIsOn = False
#endif #endif
ghciTablesNextToCode :: Bool
#ifdef GHCI_TABLES_NEXT_TO_CODE
ghciTablesNextToCode = True
#else
ghciTablesNextToCode = False
#endif
isWindowsHost :: Bool isWindowsHost :: Bool
#ifdef mingw32_HOST_OS #ifdef mingw32_HOST_OS
isWindowsHost = True isWindowsHost = True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment