summaryrefslogtreecommitdiff
path: root/ghc/includes
diff options
context:
space:
mode:
authorsimonmar <unknown>2001-01-29 17:23:41 +0000
committersimonmar <unknown>2001-01-29 17:23:41 +0000
commitee3e75b51e5a86dda79bb990a83bfaa49915a22a (patch)
tree5080e94899a9e26ff6ee637e7af13ffd6474d302 /ghc/includes
parent489aed0633fced729097280d760db9d497481846 (diff)
downloadhaskell-ee3e75b51e5a86dda79bb990a83bfaa49915a22a.tar.gz
[project @ 2001-01-29 17:23:40 by simonmar]
Remove the old Hugs CAF code, install our own (minimal, somewhat cryptic, but better commented) CAF reversion story. See Storage.c:newCaf() for the details.
Diffstat (limited to 'ghc/includes')
-rw-r--r--ghc/includes/ClosureTypes.h26
-rw-r--r--ghc/includes/Closures.h19
-rw-r--r--ghc/includes/StgMiscClosures.h6
-rw-r--r--ghc/includes/Updates.h17
4 files changed, 38 insertions, 30 deletions
diff --git a/ghc/includes/ClosureTypes.h b/ghc/includes/ClosureTypes.h
index 0fea250669..d9f092d98c 100644
--- a/ghc/includes/ClosureTypes.h
+++ b/ghc/includes/ClosureTypes.h
@@ -1,5 +1,5 @@
/* ----------------------------------------------------------------------------
- * $Id: ClosureTypes.h,v 1.13 2000/04/05 14:26:31 panne Exp $
+ * $Id: ClosureTypes.h,v 1.14 2001/01/29 17:23:41 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
@@ -47,19 +47,17 @@
#define IND_PERM 31
#define IND_OLDGEN_PERM 32
#define IND_STATIC 33
-#define CAF_UNENTERED 34
-#define CAF_ENTERED 35
-#define CAF_BLACKHOLE 36
-#define RET_BCO 37
-#define RET_SMALL 38
-#define RET_VEC_SMALL 39
-#define RET_BIG 40
-#define RET_VEC_BIG 41
-#define RET_DYN 42
-#define UPDATE_FRAME 43
-#define CATCH_FRAME 44
-#define STOP_FRAME 45
-#define SEQ_FRAME 46
+#define RET_BCO 36
+#define RET_SMALL 37
+#define RET_VEC_SMALL 38
+#define RET_BIG 39
+#define RET_VEC_BIG 40
+#define RET_DYN 41
+#define UPDATE_FRAME 42
+#define CATCH_FRAME 43
+#define STOP_FRAME 44
+#define SEQ_FRAME 45
+#define CAF_BLACKHOLE 46
#define BLACKHOLE 47
#define BLACKHOLE_BQ 48
#define SE_BLACKHOLE 49
diff --git a/ghc/includes/Closures.h b/ghc/includes/Closures.h
index 2c38541d6b..c4fcce92da 100644
--- a/ghc/includes/Closures.h
+++ b/ghc/includes/Closures.h
@@ -1,5 +1,5 @@
/* ----------------------------------------------------------------------------
- * $Id: Closures.h,v 1.24 2000/12/19 16:48:58 sewardj Exp $
+ * $Id: Closures.h,v 1.25 2001/01/29 17:23:41 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
@@ -186,18 +186,13 @@ typedef struct {
} StgIndOldGen;
typedef struct {
- StgHeader header;
- StgClosure *indirectee;
- StgClosure *static_link;
-} StgIndStatic;
-
-typedef struct StgCAF_ {
StgHeader header;
- StgClosure *body;
- StgMutClosure *mut_link;
- StgClosure *value;
- struct StgCAF_ *link;
-} StgCAF;
+ StgClosure *indirectee;
+ StgClosure *static_link;
+#ifdef GHCI
+ struct _StgInfoTable *saved_info;
+#endif
+} StgIndStatic;
typedef struct {
StgHeader header;
diff --git a/ghc/includes/StgMiscClosures.h b/ghc/includes/StgMiscClosures.h
index e92f4fe99f..385d1117b9 100644
--- a/ghc/includes/StgMiscClosures.h
+++ b/ghc/includes/StgMiscClosures.h
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------------
- * $Id: StgMiscClosures.h,v 1.32 2001/01/15 16:55:25 sewardj Exp $
+ * $Id: StgMiscClosures.h,v 1.33 2001/01/29 17:23:41 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
@@ -21,8 +21,8 @@ STGFUN(stg_IND_OLDGEN_entry);
STGFUN(stg_IND_OLDGEN_PERM_entry);
STGFUN(stg_CAF_UNENTERED_entry);
STGFUN(stg_CAF_ENTERED_entry);
-STGFUN(stg_CAF_BLACKHOLE_entry);
STGFUN(stg_BLACKHOLE_entry);
+STGFUN(stg_CAF_BLACKHOLE_entry);
STGFUN(stg_BLACKHOLE_BQ_entry);
#ifdef SMP
STGFUN(stg_WHITEHOLE_entry);
@@ -97,8 +97,8 @@ extern DLL_IMPORT_RTS const StgInfoTable stg_IND_OLDGEN_info;
extern DLL_IMPORT_RTS const StgInfoTable stg_IND_OLDGEN_PERM_info;
extern DLL_IMPORT_RTS const StgInfoTable stg_CAF_UNENTERED_info;
extern DLL_IMPORT_RTS const StgInfoTable stg_CAF_ENTERED_info;
-extern DLL_IMPORT_RTS const StgInfoTable stg_CAF_BLACKHOLE_info;
extern DLL_IMPORT_RTS const StgInfoTable stg_BLACKHOLE_info;
+extern DLL_IMPORT_RTS const StgInfoTable stg_CAF_BLACKHOLE_info;
extern DLL_IMPORT_RTS const StgInfoTable stg_BLACKHOLE_BQ_info;
#ifdef SMP
extern DLL_IMPORT_RTS const StgInfoTable stg_WHITEHOLE_info;
diff --git a/ghc/includes/Updates.h b/ghc/includes/Updates.h
index 77a18d1573..9c174660ed 100644
--- a/ghc/includes/Updates.h
+++ b/ghc/includes/Updates.h
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------------
- * $Id: Updates.h,v 1.21 2000/12/04 12:31:20 simonmar Exp $
+ * $Id: Updates.h,v 1.22 2001/01/29 17:23:41 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
@@ -61,6 +61,16 @@
}
#endif
+#define UPD_STATIC_IND(updclosure, heapptr) \
+ { \
+ const StgInfoTable *info; \
+ info = ((StgClosure *)updclosure)->header.info; \
+ AWAKEN_STATIC_BQ(info,updclosure); \
+ updateWithStaticIndirection(info, \
+ (StgClosure *)updclosure, \
+ (StgClosure *)heapptr); \
+ }
+
#if defined(PROFILING) || defined(TICKY_TICKY)
#define UPD_PERM_IND(updclosure, heapptr) \
{ \
@@ -160,6 +170,11 @@ extern void awakenBlockedQueue(StgTSO *q);
DO_AWAKEN_BQ(closure); \
}
+#define AWAKEN_STATIC_BQ(info,closure) \
+ if (info == &stg_BLACKHOLE_BQ_STATIC_info) { \
+ DO_AWAKEN_BQ(closure); \
+ }
+
#endif /* GRAN || PAR */
/* -------------------------------------------------------------------------