Changes between Version 8 and Version 9 of Plugins/ReinitializeGlobals


Ignore:
Timestamp:
Jul 5, 2013 4:52:04 PM (20 months ago)
Author:
nfrisby
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Plugins/ReinitializeGlobals

    v8 v9  
    168168This Option does not have any laziness issues. Thunks that end up adding `FastString`s to the table, when forced, always begin by reading the `string_table` `IORef`.  Thus, they will see the `Just_FST` if they're forced after `reinitializeGlobals`, regardless of when those thunks were created.  In other words, thunks only cache the `IORef`, not its contents. Since each image's `IORef`'s contents now includes a reference to the other image's `IORef`, the thunks will mutate both tables in synch. 
    169169 
    170 === Option 6: Have the `FastString` module use `UniqSupply` === 
     170=== Option 6: Use `UniqSupply` in `FastString` === 
    171171 
    172172Instead of allocating `FastString`s' uniques linearly, let's use a `UniqSupply`. Then we'd just need to split the supply in order to prevent the danger of two `FastString`s getting the same unique. Whatever routine does the splitting just needs to be called the first time libHSghc is loaded dynamically and never again.