[Git][ghc/ghc][wip/andreask/lsp-crash] 2 commits: Add missing declaration
Andreas Klebinger (@AndreasK)
gitlab at gitlab.haskell.org
Thu Jan 12 16:09:56 UTC 2023
Andreas Klebinger pushed to branch wip/andreask/lsp-crash at Glasgow Haskell Compiler / GHC
Commits:
2470d411 by Andreas Klebinger at 2023-01-12T14:11:52+01:00
Add missing declaration
- - - - -
5eb98b96 by Andreas Klebinger at 2023-01-12T17:09:50+01:00
Slight refactor
- - - - -
4 changed files:
- compiler/GHC.hs
- compiler/cbits/keepCAFsForGHCi.c
- rts/include/rts/storage/GC.h
- rts/sm/Storage.c
Changes:
=====================================
compiler/GHC.hs
=====================================
@@ -563,8 +563,10 @@ initGhcMonad mb_top_dir = setSession =<< liftIO ( do
-- The call to c_keepCAFsForGHCi must not be optimized away. Even in non-debug builds.
-- So we can't use assertM here.
-- See Note [keepCAFsForGHCi] in keepCAFsForGHCi.c for details about why.
+-- #if MIN_VERSION_GLASGOW_HASKELL(9,7,0,0)
!keep_cafs <- c_keepCAFsForGHCi
massert keep_cafs
+-- #endif
initHscEnv mb_top_dir
)
=====================================
compiler/cbits/keepCAFsForGHCi.c
=====================================
@@ -1,4 +1,5 @@
#include <Rts.h>
+#include <ghcversion.h>
// Note [keepCAFsForGHCi]
// ~~~~~~~~~~~~~~~~~~~~~~
@@ -22,6 +23,7 @@
void keepCAFsForGHCi(void) __attribute__((constructor));
+bool get_keepCAFsForGHCi(void);
void keepCAFsForGHCi(void)
{
@@ -30,6 +32,6 @@ void keepCAFsForGHCi(void)
bool get_keepCAFsForGHCi(void)
{
- return getKeepCAFs();
+ return keepCAFs;
}
=====================================
rts/include/rts/storage/GC.h
=====================================
@@ -229,9 +229,6 @@ void revertCAFs (void);
// (preferably use RtsConfig.keep_cafs instead)
void setKeepCAFs (void);
-// Are CAFs being retained?
-bool getKeepCAFs (void);
-
// Let the runtime know that all the CAFs in high mem are not
// to be retained. Useful in conjunction with loadNativeObj
void setHighMemDynamic (void);
=====================================
rts/sm/Storage.c
=====================================
@@ -646,13 +646,6 @@ setKeepCAFs (void)
keepCAFs = 1;
}
-// External API for setting the keepCAFs flag. see #3900.
-bool
-getKeepCAFs (void)
-{
- return keepCAFs;
-}
-
void
setHighMemDynamic (void)
{
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b9fdf977268b13d6305a18010e7d20e26a08c572...5eb98b964c96f96b768a4143ea0f571d7a439cab
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b9fdf977268b13d6305a18010e7d20e26a08c572...5eb98b964c96f96b768a4143ea0f571d7a439cab
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/20230112/6f1cb5e1/attachment-0001.html>
More information about the ghc-commits
mailing list