[Git][ghc/ghc][wip/decode_cloned_stack] 2 commits: Remove checkSTACK check

Sven Tennie (@supersven) gitlab at gitlab.haskell.org
Sun Feb 12 09:40:28 UTC 2023



Sven Tennie pushed to branch wip/decode_cloned_stack at Glasgow Haskell Compiler / GHC


Commits:
45fe745d by Sven Tennie at 2023-02-12T09:39:29+00:00
Remove checkSTACK check

- - - - -
a4dfafd9 by Sven Tennie at 2023-02-12T09:40:02+00:00
Make valid casts

- - - - -


2 changed files:

- libraries/ghc-heap/cbits/Stack.cmm
- libraries/ghc-heap/tests/stack_misc_closures_c.c


Changes:

=====================================
libraries/ghc-heap/cbits/Stack.cmm
=====================================
@@ -178,7 +178,6 @@ getStackInfoTableAddrzh(P_ stack){
 getBoxedClosurezh(P_ stack, W_ offsetWords){
   ccall debugBelch("getBoxedClosurezh - stack %p , offsetWords %lu", stack, offsetWords);
 
-  ccall checkSTACK(stack);
   P_ ptr;
   ptr = StgStack_sp(stack) + WDS(offsetWords);
 


=====================================
libraries/ghc-heap/tests/stack_misc_closures_c.c
=====================================
@@ -29,7 +29,7 @@ void create_any_update_frame(Capability *cap, StgStack *stack, StgWord w) {
   StgUpdateFrame *updF = (StgUpdateFrame *)stack->sp;
   SET_HDR(updF, &stg_upd_frame_info, CCS_SYSTEM);
   // StgInd and a BLACKHOLE have the same structure
-  StgInd *blackhole = allocate(cap, sizeofW(StgInd));
+  StgInd *blackhole = (StgInd *)allocate(cap, sizeofW(StgInd));
   SET_HDR(blackhole, &test_fake_blackhole_info, CCS_SYSTEM);
   StgClosure *payload = rts_mkWord(cap, w);
   blackhole->indirectee = payload;
@@ -207,8 +207,9 @@ RTS_RET(test_ret_bco);
 void create_any_bco_frame(Capability *cap, StgStack *stack, StgWord w) {
   StgClosure *c = (StgClosure *)stack->sp;
   SET_HDR(c, &test_ret_bco_info, CCS_SYSTEM);
-  StgWord bcoSizeWords = sizeofW(StgBCO) + sizeofW(StgLargeBitmap) + sizeofW(StgWord);
-  StgBCO *bco = allocate(cap, bcoSizeWords);
+  StgWord bcoSizeWords =
+      sizeofW(StgBCO) + sizeofW(StgLargeBitmap) + sizeofW(StgWord);
+  StgBCO *bco = (StgBCO *)allocate(cap, bcoSizeWords);
   SET_HDR(bco, &stg_BCO_info, CCS_MAIN);
   c->payload[0] = (StgClosure *)bco;
 
@@ -231,7 +232,8 @@ void create_any_bco_frame(Capability *cap, StgStack *stack, StgWord w) {
   bco->literals = literals;
 
   StgWord ptrsSize = 1 + mutArrPtrsCardTableSize(1);
-  StgMutArrPtrs *ptrs = allocate(cap, sizeofW(StgMutArrPtrs) + ptrsSize);
+  StgMutArrPtrs *ptrs =
+      (StgMutArrPtrs *)allocate(cap, sizeofW(StgMutArrPtrs) + ptrsSize);
   SET_HDR(ptrs, &stg_MUT_ARR_PTRS_FROZEN_CLEAN_info, ccs);
   ptrs->ptrs = 1;
   ptrs->size = ptrsSize;
@@ -366,8 +368,7 @@ StgStack *any_bco_frame(Capability *cap) {
 }
 
 StgStack *any_underflow_frame(Capability *cap) {
-  return setup(cap, sizeofW(StgUnderflowFrame),
-               &create_any_underflow_frame);
+  return setup(cap, sizeofW(StgUnderflowFrame), &create_any_underflow_frame);
 }
 
 void belchStack(StgStack *stack) { printStack(stack); }



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/82033392304caa9c992071a240fca07864e10855...a4dfafd9b53365a4b4f7005fed86ce8c936a785b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/82033392304caa9c992071a240fca07864e10855...a4dfafd9b53365a4b4f7005fed86ce8c936a785b
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/20230212/6e74c6a6/attachment-0001.html>


More information about the ghc-commits mailing list