summaryrefslogtreecommitdiff
path: root/includes/Storage.h
diff options
context:
space:
mode:
authorSimon Marlow <simonmarhaskell@gmail.com>2008-04-17 21:27:07 +0000
committerSimon Marlow <simonmarhaskell@gmail.com>2008-04-17 21:27:07 +0000
commit4e79709df545c16812b85f2c27ab3411f5a7b54f (patch)
tree518c23ecad5b34b5ad99d5ecd7b2fb2c52949c4f /includes/Storage.h
parenta4e09e8f27b81e915b128ef244c7b0d082bfb89a (diff)
downloadhaskell-4e79709df545c16812b85f2c27ab3411f5a7b54f.tar.gz
remove EVACUATED: store the forwarding pointer in the info pointer
Diffstat (limited to 'includes/Storage.h')
-rw-r--r--includes/Storage.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/Storage.h b/includes/Storage.h
index c9cbd9c5e9..ae066c1c9e 100644
--- a/includes/Storage.h
+++ b/includes/Storage.h
@@ -357,7 +357,7 @@ void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p);
-------------------------------------------------------------------------- */
#define LOOKS_LIKE_INFO_PTR(p) \
- (p && LOOKS_LIKE_INFO_PTR_NOT_NULL(p))
+ (p && (IS_FORWARDING_PTR(p) || LOOKS_LIKE_INFO_PTR_NOT_NULL(p)))
#define LOOKS_LIKE_INFO_PTR_NOT_NULL(p) \
(((StgInfoTable *)(INFO_PTR_TO_STRUCT(p)))->type != INVALID_OBJECT && \
@@ -592,4 +592,8 @@ extern StgClosure * RTS_VAR(caf_list);
extern StgClosure * RTS_VAR(revertible_caf_list);
extern StgTSO * RTS_VAR(resurrected_threads);
+#define IS_FORWARDING_PTR(p) ((((StgWord)p) & 1) != 0)
+#define MK_FORWARDING_PTR(p) (((StgWord)p) | 1)
+#define UN_FORWARDING_PTR(p) (((StgWord)p) - 1)
+
#endif /* STORAGE_H */