
Torsten Schmits pushed to branch wip/torsten.schmits/mercury-ghc9101-backport-2025-07-09 at Glasgow Haskell Compiler / GHC Commits: 6eba53b2 by Ian-Woo Kim at 2025-07-10T12:40:09+02:00 No in-memory resident mi_extra_decls in compilation. They are transiently loaded and removed after byte-code generation. - - - - - 2 changed files: - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Pipeline.hs Changes: ===================================== compiler/GHC/Driver/Main.hs ===================================== @@ -971,8 +971,10 @@ loadByteCode iface mod_sum = do add_iface_to_hpt :: ModIface -> ModDetails -> HscEnv -> HscEnv add_iface_to_hpt iface details = hscUpdateHPT $ \ hpt -> - addToHpt hpt (moduleName (mi_module iface)) - (HomeModInfo iface details emptyHomeModInfoLinkable) + addToHpt hpt (moduleName (mi_module iface')) + (HomeModInfo iface' details emptyHomeModInfoLinkable) + where + iface' = iface { mi_extra_decls = Nothing } -- Knot tying! See Note [Knot-tying typecheckIface] -- See Note [ModDetails and --make mode] ===================================== compiler/GHC/Driver/Pipeline.hs ===================================== @@ -249,7 +249,10 @@ compileOne' mHscMessage -- See Note [ModDetails and --make mode] details <- initModDetails plugin_hsc_env iface linkable' <- traverse (initWholeCoreBindings plugin_hsc_env iface details) (homeMod_bytecode linkable) - return $! HomeModInfo iface details (linkable { homeMod_bytecode = linkable' }) + -- extra_decl is not used any more after generating byte code + let iface' = iface { mi_extra_decls = Nothing } + -- + return $! HomeModInfo iface' details (linkable { homeMod_bytecode = linkable' }) where lcl_dflags = ms_hspp_opts summary location = ms_location summary View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6eba53b2582101f864e4b14e02630eb5... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6eba53b2582101f864e4b14e02630eb5... You're receiving this email because of your account on gitlab.haskell.org.