[Git][ghc/ghc][wip/ghci-leaks-fix] Apply 6 suggestion(s) to 2 file(s)
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Wed Jan 25 09:20:22 UTC 2023
Matthew Pickering pushed to branch wip/ghci-leaks-fix at Glasgow Haskell Compiler / GHC
Commits:
a912ded4 by sheaf at 2023-01-25T09:20:14+00:00
Apply 6 suggestion(s) to 2 file(s)
- - - - -
2 changed files:
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Runtime/Eval.hs
Changes:
=====================================
compiler/GHC/ByteCode/Types.hs
=====================================
@@ -174,16 +174,15 @@ instance NFData BCONPtr where
-- | Information about a breakpoint that we know at code-generation time
-- In order to be used, this needs to be hydrated relative to the current HscEnv by
-- 'hydrateCgBreakInfo'. Everything here can be fully forced and that's critical for
--- prevening space leaks (see #22530)
+-- preventing space leaks (see #22530)
data DehydratedCgBreakInfo
= DehydratedCgBreakInfo
- { cgb_tyvars :: !([IfaceTvBndr]) -- Type variables bound by breakpoint
- , cgb_vars :: !([Maybe (IfaceIdBndr, Word16)])
+ { cgb_tyvars :: ![IfaceTvBndr] -- ^ Type variables in scope at the breakpoint
+ , cgb_vars :: ![Maybe (IfaceIdBndr, Word16)]
, cgb_resty :: !IfaceType
}
-- See Note [Syncing breakpoint info] in GHC.Runtime.Eval
--- Not a real NFData instance because we can't rnf Id or Type
seqCgBreakInfo :: DehydratedCgBreakInfo -> ()
seqCgBreakInfo DehydratedCgBreakInfo{..} =
rnf cgb_tyvars `seq`
=====================================
compiler/GHC/Runtime/Eval.hs
=====================================
@@ -567,7 +567,7 @@ bindLocalsAtBreakpoint hsc_env apStack_fhv (Just BreakInfo{..}) = do
span = modBreaks_locs breaks ! breakInfo_number
decl = intercalate "." $ modBreaks_decls breaks ! breakInfo_number
- -- Rehydrate to understand the breakpoint info relative to the current environemnt.
+ -- Rehydrate to understand the breakpoint info relative to the current environment.
-- This design is critical to preventing leaks (#22530)
(mbVars, result_ty) <- initIfaceLoad hsc_env
$ initIfaceLcl breakInfo_module (text "debugger") NotBoot
@@ -582,8 +582,6 @@ bindLocalsAtBreakpoint hsc_env apStack_fhv (Just BreakInfo{..}) = do
(ids, offsets, occs') = syncOccs mbPointers occs
-
-
free_tvs = tyCoVarsOfTypesWellScoped (result_ty:map idType ids)
-- It might be that getIdValFromApStack fails, because the AP_STACK
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a912ded403480628d85726ecbc56646d9254d664
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a912ded403480628d85726ecbc56646d9254d664
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230125/14e0321d/attachment-0001.html>
More information about the ghc-commits
mailing list