summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorAdam Sandberg Eriksson <adam@sandbergericsson.se>2019-07-24 12:56:16 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-07-26 09:49:14 -0400
commit7c9fb2f0eb7d362c569a05bd509a1571f9257678 (patch)
tree072603827a6f2c08522e42762dd1360a7f6d716b /rts
parentea08fa37c05303dea42f6ce2e9fdfe16e73a4df7 (diff)
downloadhaskell-7c9fb2f0eb7d362c569a05bd509a1571f9257678.tar.gz
ghc-heap: implement WEAK closure type #16974
Diffstat (limited to 'rts')
-rw-r--r--rts/Heap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/rts/Heap.c b/rts/Heap.c
index f0cc3567d9..0e31a779b4 100644
--- a/rts/Heap.c
+++ b/rts/Heap.c
@@ -214,6 +214,14 @@ StgMutArrPtrs *heap_view_closurePtrs(Capability *cap, StgClosure *closure) {
ptrs[nptrs++] = ((StgMVar *)closure)->value;
break;
+ case WEAK:
+ ptrs[nptrs++] = (StgClosure *)((StgWeak *)closure)->cfinalizers;
+ ptrs[nptrs++] = (StgClosure *)((StgWeak *)closure)->key;
+ ptrs[nptrs++] = (StgClosure *)((StgWeak *)closure)->value;
+ ptrs[nptrs++] = (StgClosure *)((StgWeak *)closure)->finalizer;
+ ptrs[nptrs++] = (StgClosure *)((StgWeak *)closure)->link;
+ break;
+
default:
fprintf(stderr,"closurePtrs: Cannot handle type %s yet\n",
closure_type_names[info->type]);