diff options
Diffstat (limited to 'compiler/main')
| -rw-r--r-- | compiler/main/DynFlags.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index cf1ce81a15..d4c3d535d6 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -120,6 +120,8 @@ module DynFlags ( #include "../includes/dist-derivedconstants/header/GHCConstantsHaskellExports.hs" bLOCK_SIZE_W, wORD_SIZE_IN_BITS, + tAG_MASK, + mAX_PTR_TAG, ) where #include "HsVersions.h" @@ -151,6 +153,7 @@ import System.IO.Unsafe ( unsafePerformIO ) import Data.IORef import Control.Monad +import Data.Bits import Data.Char import Data.List import Data.Map (Map) @@ -3153,3 +3156,9 @@ bLOCK_SIZE_W dflags = bLOCK_SIZE dflags `quot` wORD_SIZE dflags wORD_SIZE_IN_BITS :: DynFlags -> Int wORD_SIZE_IN_BITS dflags = wORD_SIZE dflags * 8 +tAG_MASK :: DynFlags -> Int +tAG_MASK dflags = (1 `shiftL` tAG_BITS dflags) - 1 + +mAX_PTR_TAG :: DynFlags -> Int +mAX_PTR_TAG = tAG_MASK + |
