From 4e79709df545c16812b85f2c27ab3411f5a7b54f Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 17 Apr 2008 21:27:07 +0000 Subject: remove EVACUATED: store the forwarding pointer in the info pointer --- includes/ClosureTypes.h | 1 - includes/Closures.h | 5 ----- includes/Storage.h | 6 +++++- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'includes') diff --git a/includes/ClosureTypes.h b/includes/ClosureTypes.h index 8247a1516f..4876931d1c 100644 --- a/includes/ClosureTypes.h +++ b/includes/ClosureTypes.h @@ -82,7 +82,6 @@ #define FETCH_ME 58 #define FETCH_ME_BQ 59 #define RBH 60 -#define EVACUATED 61 #define REMOTE_REF 62 #define TVAR_WATCH_QUEUE 63 #define INVARIANT_CHECK_QUEUE 64 diff --git a/includes/Closures.h b/includes/Closures.h index 64582ba6b5..05cf7baaf8 100644 --- a/includes/Closures.h +++ b/includes/Closures.h @@ -173,11 +173,6 @@ typedef struct { StgHeader header; } StgStopFrame; -typedef struct { - StgHeader header; - StgClosure *evacuee; -} StgEvacuated; - typedef struct { StgHeader header; StgWord data; 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 */ -- cgit v1.2.1