diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2016-11-29 16:50:32 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-11-29 16:50:33 -0500 |
commit | 6f7ed1e51bf360621a3c2a447045ab3012f68575 (patch) | |
tree | f6e047df820dce2a049ead7927c1b36e95b2bfdd /compiler/utils/FastString.hs | |
parent | 795f8bd460d604c792a5df8cfec937b2a74c3956 (diff) | |
download | haskell-6f7ed1e51bf360621a3c2a447045ab3012f68575.tar.gz |
Make globals use sharedCAF
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.
Reviewers: rwbarton, simonmar, austin, hvr, erikd, bgamari
Reviewed By: simonmar, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2575
Diffstat (limited to 'compiler/utils/FastString.hs')
-rw-r--r-- | compiler/utils/FastString.hs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/compiler/utils/FastString.hs b/compiler/utils/FastString.hs index 1496a8686e..8f76584875 100644 --- a/compiler/utils/FastString.hs +++ b/compiler/utils/FastString.hs @@ -285,13 +285,6 @@ originally assigned to those FastStrings. Thus the lookup fails since the domain of the GlobalRdrEnv is affected by the RdrName's OccName's FastString's unique. -The old `reinitializeGlobals` mechanism is enough to provide the plugin with -read-access to the table, but it insufficient in the general case where the -plugin may allocate FastStrings. This mutates the supply for the FastStrings' -unique, and that needs to be propagated back to the compiler's instance of the -global variable. Such propagation is beyond the `reinitializeGlobals` -mechanism. - Maintaining synchronization of the two instances of this global is rather difficult because of the uses of `unsafePerformIO` in this module. Not synchronizing them risks breaking the rather major invariant that two |