[Git][ghc/ghc][wip/decode_cloned_stack] Printer.c: Smaller diff + correct cast

Sven Tennie (@supersven) gitlab at gitlab.haskell.org
Sat May 6 11:25:46 UTC 2023



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


Commits:
a661ec56 by Sven Tennie at 2023-05-06T11:25:22+00:00
Printer.c: Smaller diff + correct cast

- - - - -


1 changed file:

- rts/Printer.c


Changes:

=====================================
rts/Printer.c
=====================================
@@ -296,7 +296,20 @@ printClosure( const StgClosure *obj )
             debugBelch(")\n");
             break;
         }
- 
+
+     case ATOMICALLY_FRAME:
+        {
+            StgAtomicallyFrame* frame = (StgAtomicallyFrame*)obj;
+            debugBelch("ATOMICALLY_FRAME(");
+            printPtr((StgPtr)GET_INFO((StgClosure *)frame));
+            debugBelch(",");
+            printPtr((StgPtr)frame->code);
+            debugBelch(",");
+            printPtr((StgPtr)frame->result);
+            debugBelch(")\n");
+            break;
+        }
+
     case CATCH_RETRY_FRAME:
         {
             StgCatchRetryFrame* frame = (StgCatchRetryFrame*)obj;
@@ -323,19 +336,6 @@ printClosure( const StgClosure *obj )
             break;
         }
 
-    case ATOMICALLY_FRAME:
-        {
-            StgAtomicallyFrame* frame = (StgAtomicallyFrame*)obj;
-            debugBelch("ATOMICALLY_FRAME(");
-            printPtr((StgPtr)GET_INFO((StgClosure *)frame));
-            debugBelch(",");
-            printPtr((StgPtr)frame->code);
-            debugBelch(",");
-            printPtr((StgPtr)frame->result);
-            debugBelch(")\n");
-            break;
-        }
-
     case ARR_WORDS:
         {
             StgWord i;
@@ -715,17 +715,17 @@ printStackChunk( StgPtr sp, StgPtr spBottom )
             debugBelch("RET_FUN (%p) (type=%d)\n", ret_fun->fun, (int)fun_info->f.fun_type);
             switch (fun_info->f.fun_type) {
             case ARG_GEN:
-                printSmallBitmap(spBottom, &ret_fun->payload,
+                printSmallBitmap(spBottom, (StgPtr) &ret_fun->payload,
                                  BITMAP_BITS(fun_info->f.b.bitmap),
                                  BITMAP_SIZE(fun_info->f.b.bitmap));
                 break;
             case ARG_GEN_BIG:
-                printLargeBitmap(spBottom, &ret_fun->payload,
+                printLargeBitmap(spBottom, (StgPtr) &ret_fun->payload,
                                  GET_FUN_LARGE_BITMAP(fun_info),
                                  GET_FUN_LARGE_BITMAP(fun_info)->size);
                 break;
             default:
-                printSmallBitmap(spBottom, &ret_fun->payload,
+                printSmallBitmap(spBottom, (StgPtr) &ret_fun->payload,
                                  BITMAP_BITS(stg_arg_bitmaps[fun_info->f.fun_type]),
                                  BITMAP_SIZE(stg_arg_bitmaps[fun_info->f.fun_type]));
                 break;



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a661ec564e5bab4c0cadb1af9ba2566b9b610df3

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a661ec564e5bab4c0cadb1af9ba2566b9b610df3
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/20230506/ae0b46c7/attachment-0001.html>


More information about the ghc-commits mailing list