From f5e4ce830ec3151f5800f70cee90ccd32664ac30 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 20 Mar 2001 11:37:21 +0000 Subject: [PATCH] [project @ 2001-03-20 11:37:21 by simonmar] a couple of micro-optimisations --- ghc/rts/GC.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 5388590..95afb7c 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.98 2001/03/02 16:15:53 simonmar Exp $ + * $Id: GC.c,v 1.99 2001/03/20 11:37:21 simonmar Exp $ * * (c) The GHC Team 1998-1999 * @@ -1521,15 +1521,15 @@ loop: return q; case IND_STATIC: - /* a revertible CAF - it'll be on the CAF list, so don't do - * anything with it here (we'll scavenge it later). + /* If q->saved_info != NULL, then it's a revertible CAF - it'll be + * on the CAF list, so don't do anything with it here (we'll + * scavenge it later). */ - if (((StgIndStatic *)q)->saved_info != NULL) { - return q; - } - if (major_gc && IND_STATIC_LINK((StgClosure *)q) == NULL) { - IND_STATIC_LINK((StgClosure *)q) = static_objects; - static_objects = (StgClosure *)q; + if (major_gc + && ((StgIndStatic *)q)->saved_info == NULL + && IND_STATIC_LINK((StgClosure *)q) == NULL) { + IND_STATIC_LINK((StgClosure *)q) = static_objects; + static_objects = (StgClosure *)q; } return q; @@ -2664,7 +2664,7 @@ scavenge_static(void) case THUNK_STATIC: case FUN_STATIC: scavenge_srt(info); - /* fall through */ + break; case CONSTR_STATIC: { -- 1.7.10.4