Improve the newSpark dud test by using the pointer tag bits
authorDuncan Coutts <duncan@well-typed.com>
Wed, 1 Jun 2011 16:16:29 +0000 (17:16 +0100)
committerDuncan Coutts <duncan@well-typed.com>
Mon, 18 Jul 2011 15:31:13 +0000 (16:31 +0100)
commite0b98b42847dea19aff24df2faa354c9d414fc87
treee354b2c867ffe1d5e1e71b999c25139d5312661f
parent81eddb4c58c6d4171a46c727574112e2083c4878
Improve the newSpark dud test by using the pointer tag bits

newSpark() checks if the spark is a dud, and if so does not add it to
the spark pool. Previously, newSpark would discard the pointer tag bits
and just check closure_SHOULD_SPARK(p). We can take advantage of the
tag bits which can tell us if the pointer points to a value. If it is,
it's a dud spark and we don't need to add it to the spark pool.
rts/Sparks.c
rts/Sparks.h