X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FStorage.h;fp=includes%2FStorage.h;h=ae066c1c9ef5ccf5790ae023d690e6317cf3f2e0;hb=4e79709df545c16812b85f2c27ab3411f5a7b54f;hp=c9cbd9c5e94414183da29b5d88d7e4236e69d1a1;hpb=a4e09e8f27b81e915b128ef244c7b0d082bfb89a;p=ghc-hetmet.git diff --git a/includes/Storage.h b/includes/Storage.h index c9cbd9c..ae066c1 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 */