diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-07-07 13:16:47 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-07-25 00:45:08 -0400 |
commit | 6333d7391068d8029eed3e8eff019b9e2c104c7b (patch) | |
tree | ed9c42bf6df586a976db83ff448b3efd16ef9764 /compiler | |
parent | 342a01af624840ba94f22256079ff4f3cee09ca2 (diff) | |
download | haskell-6333d7391068d8029eed3e8eff019b9e2c104c7b.tar.gz |
Put PlatformConstants into Platform
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Cmm/Info.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Cmm/Type.hs | 8 | ||||
-rw-r--r-- | compiler/GHC/Driver/Session.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/Settings.hs | 5 | ||||
-rw-r--r-- | compiler/GHC/Settings/IO.hs | 2 |
5 files changed, 7 insertions, 14 deletions
diff --git a/compiler/GHC/Cmm/Info.hs b/compiler/GHC/Cmm/Info.hs index 0e187a97b2..1d26c7d5ee 100644 --- a/compiler/GHC/Cmm/Info.hs +++ b/compiler/GHC/Cmm/Info.hs @@ -551,7 +551,7 @@ funInfoArity dflags iptr | otherwise = ( pc_REP_StgFunInfoExtraFwd_arity pc , oFFSET_StgFunInfoExtraFwd_arity dflags ) - pc = platformConstants dflags + pc = platformConstants platform ----------------------------------------------------------------------------- -- diff --git a/compiler/GHC/Cmm/Type.hs b/compiler/GHC/Cmm/Type.hs index bddc933bf1..0f2971dba2 100644 --- a/compiler/GHC/Cmm/Type.hs +++ b/compiler/GHC/Cmm/Type.hs @@ -326,22 +326,22 @@ data ForeignHint rEP_CostCentreStack_mem_alloc :: DynFlags -> CmmType rEP_CostCentreStack_mem_alloc dflags = cmmBits (widthFromBytes (pc_REP_CostCentreStack_mem_alloc pc)) - where pc = platformConstants dflags + where pc = platformConstants (targetPlatform dflags) rEP_CostCentreStack_scc_count :: DynFlags -> CmmType rEP_CostCentreStack_scc_count dflags = cmmBits (widthFromBytes (pc_REP_CostCentreStack_scc_count pc)) - where pc = platformConstants dflags + where pc = platformConstants (targetPlatform dflags) rEP_StgEntCounter_allocs :: DynFlags -> CmmType rEP_StgEntCounter_allocs dflags = cmmBits (widthFromBytes (pc_REP_StgEntCounter_allocs pc)) - where pc = platformConstants dflags + where pc = platformConstants (targetPlatform dflags) rEP_StgEntCounter_allocd :: DynFlags -> CmmType rEP_StgEntCounter_allocd dflags = cmmBits (widthFromBytes (pc_REP_StgEntCounter_allocd pc)) - where pc = platformConstants dflags + where pc = platformConstants (targetPlatform dflags) ------------------------------------------------------------------------- {- Note [Signed vs unsigned] diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index b664f23ec8..8c41a4ca4f 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -464,7 +464,6 @@ data DynFlags = DynFlags { targetPlatform :: Platform, -- Filled in by SysTools toolSettings :: {-# UNPACK #-} !ToolSettings, platformMisc :: {-# UNPACK #-} !PlatformMisc, - platformConstants :: PlatformConstants, rawSettings :: [(String, String)], llvmConfig :: LlvmConfig, @@ -911,7 +910,7 @@ settings dflags = Settings , sTargetPlatform = targetPlatform dflags , sToolSettings = toolSettings dflags , sPlatformMisc = platformMisc dflags - , sPlatformConstants = platformConstants dflags + , sPlatformConstants = platformConstants (targetPlatform dflags) , sRawSettings = rawSettings dflags } @@ -1331,7 +1330,6 @@ defaultDynFlags mySettings llvmConfig = toolSettings = sToolSettings mySettings, targetPlatform = sTargetPlatform mySettings, platformMisc = sPlatformMisc mySettings, - platformConstants = sPlatformConstants mySettings, rawSettings = sRawSettings mySettings, -- See Note [LLVM configuration]. diff --git a/compiler/GHC/Settings.hs b/compiler/GHC/Settings.hs index 6bfc1bac5f..12ad3ce94b 100644 --- a/compiler/GHC/Settings.hs +++ b/compiler/GHC/Settings.hs @@ -6,7 +6,6 @@ module GHC.Settings , ToolSettings (..) , FileSettings (..) , GhcNameVersion (..) - , PlatformConstants (..) , Platform (..) , PlatformMisc (..) , PlatformMini (..) @@ -158,10 +157,6 @@ data GhcNameVersion = GhcNameVersion , ghcNameVersion_projectVersion :: String } --- Produced by deriveConstants --- Provides PlatformConstants datatype -#include "GHCConstantsHaskellType.hs" - ----------------------------------------------------------------------------- -- Accessessors from 'Settings' diff --git a/compiler/GHC/Settings/IO.hs b/compiler/GHC/Settings/IO.hs index c84bf280bc..c4e47618d2 100644 --- a/compiler/GHC/Settings/IO.hs +++ b/compiler/GHC/Settings/IO.hs @@ -92,7 +92,7 @@ initSettings top_dir = do cpp_prog <- getToolSetting "Haskell CPP command" cpp_args_str <- getSetting "Haskell CPP flags" - platform <- either pgmError pure $ getTargetPlatform settingsFile mySettings + platform <- either pgmError pure $ getTargetPlatform settingsFile mySettings platformConstants let unreg_cc_args = if platformUnregisterised platform then ["-DNO_REGS", "-DUSE_MINIINTERPRETER"] |