diff options
author | Simon Marlow <marlowsd@gmail.com> | 2017-04-01 11:51:43 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-04-01 12:31:59 -0400 |
commit | 3b5f786c7257298657fd34b3840d8cf6da968ef6 (patch) | |
tree | 1ee1e930874dd4fa9a61e0287fc64afe3b5e543d /ghc | |
parent | 83ac462449d9365ebd8b51f252f9cf81b35f119d (diff) | |
download | haskell-3b5f786c7257298657fd34b3840d8cf6da968ef6.tar.gz |
Optimise common cases of GHC.setProgramDynFlags
* If the package flags haven't changed, don't do initPackages (which
might take multiple seconds in extreme cases)
* Provide a way to change the log_action without invalidating the
summary cache.
Test Plan: validate
Reviewers: niteria, bgamari, austin, erikd, ezyang
Reviewed By: bgamari
Subscribers: mpickering, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3392
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/GHCi/UI.hs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index f684bf7e6f..71be20c20e 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -2593,13 +2593,6 @@ setOptions wds = -- then, dynamic flags when (not (null minus_opts)) $ newDynFlags False minus_opts -packageFlagsChanged :: DynFlags -> DynFlags -> Bool -packageFlagsChanged idflags1 idflags0 = - packageFlags idflags1 /= packageFlags idflags0 || - ignorePackageFlags idflags1 /= ignorePackageFlags idflags0 || - pluginPackageFlags idflags1 /= pluginPackageFlags idflags0 || - trustFlags idflags1 /= trustFlags idflags0 - newDynFlags :: Bool -> [String] -> GHCi () newDynFlags interactive_only minus_opts = do let lopts = map noLoc minus_opts |