optimisation for isAlive()
authorSimon Marlow <simonmarhaskell@gmail.com>
Wed, 16 Apr 2008 23:43:49 +0000 (23:43 +0000)
committerSimon Marlow <simonmarhaskell@gmail.com>
Wed, 16 Apr 2008 23:43:49 +0000 (23:43 +0000)
rts/sm/GCAux.c

index 0fb61f1..df47e18 100644 (file)
@@ -41,7 +41,6 @@ isAlive(StgClosure *p)
     q = UNTAG_CLOSURE(p);
 
     ASSERT(LOOKS_LIKE_CLOSURE_PTR(q));
-    info = get_itbl(q);
 
     // ignore static closures 
     //
@@ -71,6 +70,7 @@ isAlive(StgClosure *p)
        return p;
     }
 
+    info = get_itbl(q);
     switch (info->type) {
 
     case IND: