summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2016-12-11 11:32:28 +0000
committerTamar Christina <tamar@zhox.com>2016-12-11 15:29:17 +0000
commitc3c702441137dc8f7ee0dd5ac313be96d625459a (patch)
treea59633ac90b97a7df7c09db560bf8030c15ebf2e /testsuite
parent490b9429a8ed3c55d17bf0964fb14582eb206a3d (diff)
downloadhaskell-c3c702441137dc8f7ee0dd5ac313be96d625459a.tar.gz
Make globals use sharedCAF
Summary: The use of globals is quite painful when multiple rts are loaded, e.g. when plugins are loaded, which bring in a second rts. The sharedCAF appraoch was employed for the FastStringTable; I've taken the libery to extend this to the other globals I could find. This is a reboot of D2575, that should hopefully not exhibit the same windows build issues. Reviewers: Phyx, simonmar, goldfire, bgamari, austin, hvr, erikd Reviewed By: Phyx, simonmar, bgamari Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2773
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/plugins/LinkerTicklingPlugin.hs4
-rw-r--r--testsuite/tests/plugins/annotation-plugin/SayAnnNames.hs1
-rw-r--r--testsuite/tests/simplCore/should_compile/T7702plugin/T7702Plugin.hs1
3 files changed, 1 insertions, 5 deletions
diff --git a/testsuite/tests/plugins/LinkerTicklingPlugin.hs b/testsuite/tests/plugins/LinkerTicklingPlugin.hs
index 7ee63cd7a0..52d5e177bb 100644
--- a/testsuite/tests/plugins/LinkerTicklingPlugin.hs
+++ b/testsuite/tests/plugins/LinkerTicklingPlugin.hs
@@ -12,6 +12,4 @@ plugin = defaultPlugin {
-- or a new instance of it. If it is a new instance the staticFlags
-- won't have been initialised, so we'll get a GHC panic here:
install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
-install _options todos = reinitializeGlobals >> (length staticFlags `seq` return todos)
- --- XXX: remove reinitializeGlobals when we have fixed the linker
- -- problem (see comment with reinitializeGlobals in CoreMonad.hs)
+install _options todos = length staticFlags `seq` return todos
diff --git a/testsuite/tests/plugins/annotation-plugin/SayAnnNames.hs b/testsuite/tests/plugins/annotation-plugin/SayAnnNames.hs
index 883ba3ada6..55e32e5b69 100644
--- a/testsuite/tests/plugins/annotation-plugin/SayAnnNames.hs
+++ b/testsuite/tests/plugins/annotation-plugin/SayAnnNames.hs
@@ -13,7 +13,6 @@ plugin = defaultPlugin {
install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
install _ todo = do
- reinitializeGlobals
return (CoreDoPluginPass "Say name" pass : todo)
pass :: ModGuts -> CoreM ModGuts
diff --git a/testsuite/tests/simplCore/should_compile/T7702plugin/T7702Plugin.hs b/testsuite/tests/simplCore/should_compile/T7702plugin/T7702Plugin.hs
index cb6a03d394..e411d04e67 100644
--- a/testsuite/tests/simplCore/should_compile/T7702plugin/T7702Plugin.hs
+++ b/testsuite/tests/simplCore/should_compile/T7702plugin/T7702Plugin.hs
@@ -8,7 +8,6 @@ plugin = defaultPlugin { installCoreToDos = install }
where
install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
install _ todos = do
- reinitializeGlobals
putMsgS "T7702Plugin"