[Git][ghc/ghc][wip/decode_cloned_stack] Remove duplicated code in Printer.c (rebase fixup)

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



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


Commits:
31d6f67b by Sven Tennie at 2023-05-06T11:20:11+00:00
Remove duplicated code in Printer.c (rebase fixup)

- - - - -


1 changed file:

- rts/Printer.c


Changes:

=====================================
rts/Printer.c
=====================================
@@ -279,6 +279,24 @@ printClosure( const StgClosure *obj )
             break;
         }
 
+    case UNDERFLOW_FRAME:
+        {
+            StgUnderflowFrame* u = (StgUnderflowFrame*)obj;
+            debugBelch("UNDERFLOW_FRAME(");
+            printPtr((StgPtr)u->next_chunk);
+            debugBelch(")\n");
+            break;
+        }
+
+    case STOP_FRAME:
+        {
+            StgStopFrame* u = (StgStopFrame*)obj;
+            debugBelch("STOP_FRAME(");
+            printPtr((StgPtr)GET_INFO((StgClosure *)u));
+            debugBelch(")\n");
+            break;
+        }
+ 
     case CATCH_RETRY_FRAME:
         {
             StgCatchRetryFrame* frame = (StgCatchRetryFrame*)obj;
@@ -318,63 +336,6 @@ printClosure( const StgClosure *obj )
             break;
         }
 
-    case UNDERFLOW_FRAME:
-        {
-            StgUnderflowFrame* u = (StgUnderflowFrame*)obj;
-            debugBelch("UNDERFLOW_FRAME(");
-            printPtr((StgPtr)u->next_chunk);
-            debugBelch(")\n");
-            break;
-        }
-
-    case STOP_FRAME:
-        {
-            StgStopFrame* u = (StgStopFrame*)obj;
-            debugBelch("STOP_FRAME(");
-            printPtr((StgPtr)GET_INFO((StgClosure *)u));
-            debugBelch(")\n");
-            break;
-        }
-
-    case ATOMICALLY_FRAME:
-        {
-            StgAtomicallyFrame* u = (StgAtomicallyFrame*)obj;
-            debugBelch("ATOMICALLY_FRAME(");
-            printPtr((StgPtr)GET_INFO((StgClosure *)u));
-            debugBelch(",");
-            printPtr((StgPtr)u->code);
-            debugBelch(",");
-            printPtr((StgPtr)u->result);
-            debugBelch(")\n");
-            break;
-        }
-
-    case CATCH_RETRY_FRAME:
-        {
-            StgCatchRetryFrame* u = (StgCatchRetryFrame*)obj;
-            debugBelch("CATCH_RETRY_FRAME(");
-            printPtr((StgPtr)GET_INFO((StgClosure *)u));
-            debugBelch(",");
-            printPtr((StgPtr)u->first_code);
-            debugBelch(",");
-            printPtr((StgPtr)u->alt_code);
-            debugBelch(")\n");
-            break;
-        }
-
-    case CATCH_STM_FRAME:
-        {
-            StgCatchSTMFrame* u = (StgCatchSTMFrame*)obj;
-            debugBelch("CATCH_STM_FRAME(");
-            printPtr((StgPtr)GET_INFO((StgClosure *)u));
-            debugBelch(",");
-            printPtr((StgPtr)u->code);
-            debugBelch(",");
-            printPtr((StgPtr)u->handler);
-            debugBelch(")\n");
-            break;
-        }
-
     case ARR_WORDS:
         {
             StgWord i;
@@ -618,9 +579,6 @@ printStackChunk( StgPtr sp, StgPtr spBottom )
 
         case UPDATE_FRAME:
         case CATCH_FRAME:
-        case CATCH_RETRY_FRAME:
-        case CATCH_STM_FRAME:
-        case ATOMICALLY_FRAME:
         case UNDERFLOW_FRAME:
         case STOP_FRAME:
         case ATOMICALLY_FRAME:



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

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


More information about the ghc-commits mailing list