[Git][ghc/ghc][wip/decode_cloned_stack] 3 commits: Delete TODOs
Sven Tennie (@supersven)
gitlab at gitlab.haskell.org
Sat Jan 21 11:18:12 UTC 2023
Sven Tennie pushed to branch wip/decode_cloned_stack at Glasgow Haskell Compiler / GHC
Commits:
815de870 by Sven Tennie at 2023-01-21T10:02:12+00:00
Delete TODOs
- - - - -
466e7c01 by Sven Tennie at 2023-01-21T10:15:34+00:00
Delete ToDo
- - - - -
c836005e by Sven Tennie at 2023-01-21T11:16:06+00:00
Fix C warnings
- - - - -
4 changed files:
- libraries/ghc-heap/GHC/Exts/DecodeStack.hs
- libraries/ghc-heap/GHC/Exts/StackConstants.hsc
- libraries/ghc-heap/cbits/Stack.c
- libraries/ghc-heap/tests/stack_misc_closures.hs
Changes:
=====================================
libraries/ghc-heap/GHC/Exts/DecodeStack.hs
=====================================
@@ -173,7 +173,6 @@ unpackStackFrameIter sfi@(StackFrameIter (# s#, i# #)) = trace ("decoding ... "
size' = getWord sfi offsetStgRetFunFrameSize
fun' <- getClosure sfi offsetStgRetFunFrameFun
payload' <-
- -- TODO: ARG_BCO is likely very special...
if t == CL.ARG_GEN_BIG then
decodeLargeBitmap getRetFunLargeBitmap# sfi 3##
else
@@ -233,9 +232,6 @@ toInt# (I# i) = i
intToWord# :: Int -> Word#
intToWord# i = int2Word# (toInt# i)
--- TODO: Is the function type below needed? (Was proposed by Ben)
--- derefStackPtr :: StackSnapshot# -> Int# -> a
-
foreign import prim "unpackClosureFromStackFramezh" unpackClosureFromStackFrame# :: StackSnapshot# -> Word# -> (# Addr#, ByteArray#, Array# b #)
foreign import prim "derefStackWordzh" derefStackWord# :: StackSnapshot# -> Word# -> Word#
=====================================
libraries/ghc-heap/GHC/Exts/StackConstants.hsc
=====================================
@@ -67,6 +67,7 @@ offsetStgBCOFrameSize = (#const OFFSET_StgBCO_size) + (#size StgHeader)
offsetStgClosurePayload :: Int
offsetStgClosurePayload = (#const OFFSET_StgClosure_payload) + (#size StgHeader)
+-- TODO: Should be SIZEOF_VOID_P
bytesInWord :: Int
bytesInWord = (#const SIZEOF_UNSIGNED_LONG)
#endif
=====================================
libraries/ghc-heap/cbits/Stack.c
=====================================
@@ -193,7 +193,7 @@ StgArrBytes *getLargeBitmaps(Capability *cap, StgClosure *c) {
StgWord neededWords = ROUNDUP_BITS_TO_WDS(bitmap->size);
StgArrBytes *array =
(StgArrBytes *)allocate(cap, sizeofW(StgArrBytes) + neededWords);
- SET_HDR(array, &stg_ARR_WORDS_info, CCCS);
+ SET_HDR(array, &stg_ARR_WORDS_info, CCS_SYSTEM);
array->bytes = WDS(ROUNDUP_BITS_TO_WDS(bitmap->size));
for (int i = 0; i < neededWords; i++) {
@@ -211,7 +211,7 @@ StgArrBytes *getRetFunLargeBitmaps(Capability *cap, StgRetFun *ret_fun) {
StgWord neededWords = ROUNDUP_BITS_TO_WDS(bitmap->size);
StgArrBytes *array =
(StgArrBytes *)allocate(cap, sizeofW(StgArrBytes) + neededWords);
- SET_HDR(array, &stg_ARR_WORDS_info, CCCS);
+ SET_HDR(array, &stg_ARR_WORDS_info, CCS_SYSTEM);
array->bytes = WDS(ROUNDUP_BITS_TO_WDS(bitmap->size));
for (int i = 0; i < neededWords; i++) {
@@ -231,7 +231,7 @@ StgArrBytes *getBCOLargeBitmaps(Capability *cap, StgClosure *c) {
StgWord neededWords = ROUNDUP_BITS_TO_WDS(bitmap->size);
StgArrBytes *array =
(StgArrBytes *)allocate(cap, sizeofW(StgArrBytes) + neededWords);
- SET_HDR(array, &stg_ARR_WORDS_info, CCCS);
+ SET_HDR(array, &stg_ARR_WORDS_info, CCS_SYSTEM);
array->bytes = WDS(ROUNDUP_BITS_TO_WDS(bitmap->size));
for (int i = 0; i < neededWords; i++) {
=====================================
libraries/ghc-heap/tests/stack_misc_closures.hs
=====================================
@@ -233,7 +233,6 @@ main = do
assertEqual (length pCs) 59
let wds = map getWordFromConstr01 pCs
assertEqual wds [1 .. 59]
- -- TODO: Test ret_fun bco
test any_bco_frame# $
\case
RetBCO {..} -> do
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2255ab49a573d61c9086bd3775d878ef245dec30...c836005ef313c1d7fe6d6e9216944533c6b9ba7e
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2255ab49a573d61c9086bd3775d878ef245dec30...c836005ef313c1d7fe6d6e9216944533c6b9ba7e
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/20230121/5a1ff9e8/attachment-0001.html>
More information about the ghc-commits
mailing list