diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-03-05 18:25:55 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-03-11 20:33:37 -0400 |
commit | bc41e47123b205a45385a3aa69de97ce22686423 (patch) | |
tree | c36b02eb7ec07c9a8ca661c4fae13d81fb3f2d46 /compiler/GHC.hs | |
parent | 8e6febcee4b91a88a5027baac4bee5a8847fe79b (diff) | |
download | haskell-bc41e47123b205a45385a3aa69de97ce22686423.tar.gz |
Refactor interpreterDynamic and interpreterProfiled
* `interpreterDynamic` and `interpreterProfiled` now take `Interp`
parameters instead of DynFlags
* slight refactoring of `ExternalInterp` so that we can read the iserv
configuration (which is pure) without reading an MVar.
Diffstat (limited to 'compiler/GHC.hs')
-rw-r--r-- | compiler/GHC.hs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/GHC.hs b/compiler/GHC.hs index fb1ac703a2..256a414e64 100644 --- a/compiler/GHC.hs +++ b/compiler/GHC.hs @@ -614,13 +614,15 @@ setSessionDynFlags dflags = do else return (pure ()) let conf = IServConfig - { iservConfProgram = prog - , iservConfOpts = getOpts dflags opt_i - , iservConfHook = createIservProcessHook (hooks dflags) - , iservConfTrace = tr + { iservConfProgram = prog + , iservConfOpts = getOpts dflags opt_i + , iservConfProfiled = gopt Opt_SccProfilingOn dflags + , iservConfDynamic = WayDyn `elem` ways dflags + , iservConfHook = createIservProcessHook (hooks dflags) + , iservConfTrace = tr } - s <- liftIO $ newMVar (IServPending conf) - return (Just (ExternalInterp (IServ s))) + s <- liftIO $ newMVar IServPending + return (Just (ExternalInterp conf (IServ s))) else #if defined(HAVE_INTERNAL_INTERPRETER) return (Just InternalInterp) |