
I'm validating Option 2 at the moment. It works if the plugins force the
FastStrings before returning to the host compiler. However, robustness
would require that each of the plugin's passes also call
reinitializeGlobals, since some FastStrings may have been allocated between
the installation of the plugin and its passes.
On Thu, Jul 4, 2013 at 12:26 PM, Nicolas Frisby
On Thu, Jul 4, 2013 at 2:52 AM, Simon Peyton-Jones
wrote: Do you put the FS table back after running the plugin? If not, the same unique may be allocated more than once.
S
No, I did not do that. And writing this email, I realized my initial reasoning was flawed. There are some decisions to be made.
I've written it up here. Feel free to skip Option 1; I think it has the least merit.
http://hackage.haskell.org/trac/ghc/wiki/Plugins/ReinitializeGlobals
I'd appreciate if people could weigh in.