From 0675454371608ee9696edb765aeffb64fa10a942 Mon Sep 17 00:00:00 2001
From: simonmar <unknown>
Date: Wed, 25 Jul 2001 11:55:57 +0000
Subject: [PATCH] [project @ 2001-07-25 11:55:57 by simonmar] Specialise
 thread_static() a little bit: improves performance for threading the static
 object list.

---
 ghc/rts/GCCompact.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/ghc/rts/GCCompact.c b/ghc/rts/GCCompact.c
index 7b2aca06aa6..b3f4fb7d211 100644
--- a/ghc/rts/GCCompact.c
+++ b/ghc/rts/GCCompact.c
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: GCCompact.c,v 1.3 2001/07/24 15:13:01 simonmar Exp $
+ * $Id: GCCompact.c,v 1.4 2001/07/25 11:55:57 simonmar Exp $
  *
  * (c) The GHC Team 2001
  *
@@ -148,18 +148,23 @@ thread_static( StgClosure* p )
       
     case IND_STATIC:
 	thread((StgPtr)&((StgInd *)p)->indirectee);
-	break;
+	p = IND_STATIC_LINK(p);
+	continue;
       
     case THUNK_STATIC:
+	p = THUNK_STATIC_LINK(p);
+	continue;
     case FUN_STATIC:
+	p = FUN_STATIC_LINK(p);
+	continue;
     case CONSTR_STATIC:
-	break;
+	p = STATIC_LINK(info,p);
+	continue;
       
     default:
 	barf("thread_static: strange closure %d", (int)(info->type));
     }
 
-    p = STATIC_LINK(info,p);
   }
 }
 
-- 
GitLab