Pointer Tagging
[ghc-hetmet.git] / rts / Sparks.c
index ca60e13..0ff4ee4 100644 (file)
@@ -200,6 +200,12 @@ newSpark (StgRegTable *reg, StgClosure *p)
 {
     StgSparkPool *pool = &(reg->rSparks);
 
+    /* I am not sure whether this is the right thing to do.
+     * Maybe it is better to exploit the tag information
+     * instead of throwing it away?
+     */
+    p = UNTAG_CLOSURE(p);
+
     ASSERT_SPARK_POOL_INVARIANTS(pool);
 
     if (closure_SHOULD_SPARK(p)) {