
Torsten Schmits pushed to branch wip/torsten.schmits/mercury-ghc9101-backport-2025-07-09 at Glasgow Haskell Compiler / GHC Commits: 5f90d390 by Ian-Woo Kim at 2025-07-10T12:39:25+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 ===================================== @@ -972,7 +972,9 @@ 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) + (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/5f90d390598245fd32e7f4383efc0fe3... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5f90d390598245fd32e7f4383efc0fe3... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Torsten Schmits (@torsten.schmits)