Refactor -dynamic-too handling
1) Don't modify DynFlags (too much) for -dynamic-too: now when we generate dynamic outputs for "-dynamic-too", we only set "dynamicNow" boolean field in DynFlags instead of modifying several other fields. These fields now have accessors that take dynamicNow into account. 2) Use DynamicTooState ADT to represent -dynamic-too state. It's much clearer than the undocumented "DynamicTooConditional" that was used before. As a result, we can finally remove the hscs_iface_dflags field in HscRecomp. There was a comment on this field saying: "FIXME (osa): I don't understand why this is necessary, but I spent almost two days trying to figure this out and I couldn't .. perhaps someone who understands this code better will remove this later." I don't fully understand the details, but it was needed because of the changes made to the DynFlags for -dynamic-too. There is still something very dubious in GHC.Iface.Recomp: we have to disable the "dynamicNow" flag at some point for some Backpack's "heinous hack" to continue to work. It may be because interfaces for indefinite units are always non-dynamic, or because we mix and match dynamic and non-dynamic interfaces (#9176), or something else, who knows?
Showing
- compiler/GHC/Data/EnumSet.hs 4 additions, 0 deletionscompiler/GHC/Data/EnumSet.hs
- compiler/GHC/Driver/Backpack.hs 5 additions, 2 deletionscompiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Main.hs 100 additions, 61 deletionscompiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs 4 additions, 4 deletionscompiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/MakeFile.hs 5 additions, 5 deletionscompiler/GHC/Driver/MakeFile.hs
- compiler/GHC/Driver/Pipeline.hs 76 additions, 37 deletionscompiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Session.hs 167 additions, 91 deletionscompiler/GHC/Driver/Session.hs
- compiler/GHC/HsToCore/Usage.hs 1 addition, 1 deletioncompiler/GHC/HsToCore/Usage.hs
- compiler/GHC/Iface/Load.hs 29 additions, 20 deletionscompiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Recomp.hs 6 additions, 1 deletioncompiler/GHC/Iface/Recomp.hs
- compiler/GHC/Linker/Dynamic.hs 1 addition, 1 deletioncompiler/GHC/Linker/Dynamic.hs
- compiler/GHC/Linker/Loader.hs 2 additions, 2 deletionscompiler/GHC/Linker/Loader.hs
- compiler/GHC/Platform/Ways.hs 5 additions, 0 deletionscompiler/GHC/Platform/Ways.hs
- compiler/GHC/Tc/Utils/Monad.hs 9 additions, 4 deletionscompiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Unit/Module/Status.hs 0 additions, 7 deletionscompiler/GHC/Unit/Module/Status.hs
- ghc/Main.hs 1 addition, 1 deletionghc/Main.hs
- testsuite/tests/plugins/static-plugins.hs 1 addition, 1 deletiontestsuite/tests/plugins/static-plugins.hs
Loading
Please register or sign in to comment