[Git][ghc/ghc][wip/buggymcbugfix/arrayOf-primop] Add smallarray cases in evac and scav

Vilem-Benjamin Liepelt gitlab at gitlab.haskell.org
Thu Jul 9 21:45:43 UTC 2020



Vilem-Benjamin Liepelt pushed to branch wip/buggymcbugfix/arrayOf-primop at Glasgow Haskell Compiler / GHC


Commits:
9e33d989 by buggymcbugfix at 2020-07-09T23:16:43+02:00
Add smallarray cases in evac and scav

- - - - -


2 changed files:

- rts/sm/Evac.c
- rts/sm/Scav.c


Changes:

=====================================
rts/sm/Evac.c
=====================================
@@ -631,6 +631,13 @@ loop:
            */
           return;
 
+      case SMALL_MUT_ARR_PTRS_CLEAN:
+      case SMALL_MUT_ARR_PTRS_DIRTY:
+      case SMALL_MUT_ARR_PTRS_FROZEN_CLEAN:
+      case SMALL_MUT_ARR_PTRS_FROZEN_DIRTY:
+          evacuate_static_object(STATIC_LINK(info, (StgSmallMutArrPtrs*)q), q);
+          return;
+
       default:
           barf("evacuate(static): strange closure type %d", (int)(info->type));
       }


=====================================
rts/sm/Scav.c
=====================================
@@ -1791,6 +1791,20 @@ scavenge_static(void)
         }
         break;
       }
+    case SMALL_MUT_ARR_PTRS_CLEAN:
+    case SMALL_MUT_ARR_PTRS_DIRTY:
+    case SMALL_MUT_ARR_PTRS_FROZEN_CLEAN:
+    case SMALL_MUT_ARR_PTRS_FROZEN_DIRTY:
+      {
+        StgPtr q, next;
+        StgSmallMutArrPtrs* arr = (StgSmallMutArrPtrs*)p;
+        next = (P_)arr->payload + arr->ptrs;
+        // evacuate the pointers
+        for (q = (P_)arr->payload; q < next; q++) {
+            evacuate((StgClosure **)q);
+        }
+        break;
+      }
 
     default:
       barf("scavenge_static: strange closure %d", (int)(info->type));



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9e33d989ff4557bfc495eb3e2d97eccedf8d6b8c
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/20200709/aabf47ee/attachment-0001.html>


More information about the ghc-commits mailing list