summaryrefslogtreecommitdiff
path: root/rts/StgMiscClosures.cmm
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-12-10 15:04:25 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-12-10 15:04:25 +0000
commit6c095bfa3c8c81b52ad92853acd326453d320d7b (patch)
tree3f7658288a4f7f0744bb4959ca5a6113cf02babd /rts/StgMiscClosures.cmm
parentd4a17c3a253d02c2ebf2315e71a29cb740278977 (diff)
downloadhaskell-6c095bfa3c8c81b52ad92853acd326453d320d7b.tar.gz
FIX #1364: added support for C finalizers that run as soon as the value is not longer reachable.
Patch originally by Ivan Tomac <tomac@pacific.net.au>, amended by Simon Marlow: - mkWeakFinalizer# commoned up with mkWeakFinalizerEnv# - GC parameters to ALLOC_PRIM fixed
Diffstat (limited to 'rts/StgMiscClosures.cmm')
-rw-r--r--rts/StgMiscClosures.cmm6
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/StgMiscClosures.cmm b/rts/StgMiscClosures.cmm
index 7f7cf78f7b..639ac7e03a 100644
--- a/rts/StgMiscClosures.cmm
+++ b/rts/StgMiscClosures.cmm
@@ -435,16 +435,16 @@ INFO_TABLE(stg_TSO, 0,0,TSO, "TSO", "TSO")
live weak pointers with dead ones).
------------------------------------------------------------------------- */
-INFO_TABLE(stg_WEAK,0,4,WEAK,"WEAK","WEAK")
+INFO_TABLE(stg_WEAK,1,4,WEAK,"WEAK","WEAK")
{ foreign "C" barf("WEAK object entered!") never returns; }
/*
* It's important when turning an existing WEAK into a DEAD_WEAK
* (which is what finalizeWeak# does) that we don't lose the link
* field and break the linked list of weak pointers. Hence, we give
- * DEAD_WEAK 4 non-pointer fields, the same as WEAK.
+ * DEAD_WEAK 5 non-pointer fields.
*/
-INFO_TABLE_CONSTR(stg_DEAD_WEAK,0,4,0,CONSTR,"DEAD_WEAK","DEAD_WEAK")
+INFO_TABLE_CONSTR(stg_DEAD_WEAK,0,5,0,CONSTR,"DEAD_WEAK","DEAD_WEAK")
{ foreign "C" barf("DEAD_WEAK object entered!") never returns; }
/* ----------------------------------------------------------------------------