Skip to content
Snippets Groups Projects
Commit 4419dd3a authored by adam's avatar adam Committed by Marge Bot
Browse files

rts: add some more documentation to StgWeak closure type

parent 7f618fd3
No related branches found
No related tags found
No related merge requests found
......@@ -339,17 +339,28 @@ typedef struct _StgStableName {
// Closure types: WEAK
typedef struct _StgWeak {
StgHeader header;
// C finalizers, see StgCFinalizerList below
//
// Points to stg_NO_FINALIZER_closure to indicate no c finalizers.
StgClosure *cfinalizers;
StgClosure *key;
StgClosure *value; // the actual value
StgClosure *value; // the actual value references by the weak reference
// Haskell finalizer (type IO ())
//
// Points to stg_NO_FINALIZER_closure to indicate no Haskell finalizer.
StgClosure *finalizer;
struct _StgWeak *link;
} StgWeak;
// Linked list of c function pointer finalisers for a weak reference
//
// See the addCFinalizerToWeak# primop where these are constructed.
// See the addCFinalizerToWeak# primop where these are constructed and
// runCFinalizers (C) where they are consumed.
//
// Closure type: CONSTR
typedef struct _StgCFinalizerList {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment