From f43a705a473a77e03a8caee78d2320d86e3641f0 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 19 Apr 2002 10:15:22 +0000 Subject: [PATCH] [project @ 2002-04-19 10:15:22 by simonmar] A WEAK pointer gets turned into a DEAD_WEAK by the finalizeWeak# primop. It's important that we keep all the fields of the original WEAK pointer when this happens, so as not to break the linked list of weak pointers. Hence, we give the payload size of DEAD_WEAK as 4 non-pointers instead of just 1. --- ghc/rts/StgMiscClosures.hc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ghc/rts/StgMiscClosures.hc b/ghc/rts/StgMiscClosures.hc index 6cb46b2..b07fc1d 100644 --- a/ghc/rts/StgMiscClosures.hc +++ b/ghc/rts/StgMiscClosures.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgMiscClosures.hc,v 1.74 2002/02/14 11:56:05 njn Exp $ + * $Id: StgMiscClosures.hc,v 1.75 2002/04/19 10:15:22 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -683,13 +683,7 @@ NON_ENTERABLE_ENTRY_CODE(WEAK); // we set the size of a DEAD_WEAK to 4 non-pointers, rather than its // usual 1. -#ifdef PROFILING -#define DEAD_WEAK_PAYLOAD_WORDS 4 -#else -#define DEAD_WEAK_PAYLOAD_WORDS 1 -#endif - -INFO_TABLE_CONSTR(stg_DEAD_WEAK_info,stg_DEAD_WEAK_entry,0,DEAD_WEAK_PAYLOAD_WORDS,0,CONSTR,,EF_,"DEAD_WEAK","DEAD_WEAK"); +INFO_TABLE_CONSTR(stg_DEAD_WEAK_info,stg_DEAD_WEAK_entry,0,4,0,CONSTR,,EF_,"DEAD_WEAK","DEAD_WEAK"); NON_ENTERABLE_ENTRY_CODE(DEAD_WEAK); /* ----------------------------------------------------------------------------- -- 1.7.10.4