summaryrefslogtreecommitdiff
path: root/rts/ClosureFlags.c
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-04-07 02:05:11 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-04-07 02:05:11 +0000
commit0065d5ab628975892cea1ec7303f968c3338cbe1 (patch)
tree8e2afe0ab48ee33cf95009809d67c9649573ef92 /rts/ClosureFlags.c
parent28a464a75e14cece5db40f2765a29348273ff2d2 (diff)
downloadhaskell-0065d5ab628975892cea1ec7303f968c3338cbe1.tar.gz
Reorganisation of the source tree
Most of the other users of the fptools build system have migrated to Cabal, and with the move to darcs we can now flatten the source tree without losing history, so here goes. The main change is that the ghc/ subdir is gone, and most of what it contained is now at the top level. The build system now makes no pretense at being multi-project, it is just the GHC build system. No doubt this will break many things, and there will be a period of instability while we fix the dependencies. A straightforward build should work, but I haven't yet fixed binary/source distributions. Changes to the Building Guide will follow, too.
Diffstat (limited to 'rts/ClosureFlags.c')
-rw-r--r--rts/ClosureFlags.c107
1 files changed, 107 insertions, 0 deletions
diff --git a/rts/ClosureFlags.c b/rts/ClosureFlags.c
new file mode 100644
index 0000000000..5545693362
--- /dev/null
+++ b/rts/ClosureFlags.c
@@ -0,0 +1,107 @@
+/* -----------------------------------------------------------------------------
+ *
+ * (c) The GHC Team 1998-1999
+ *
+ * Closure type flags
+ *
+ * ---------------------------------------------------------------------------*/
+
+#include "PosixSource.h"
+#include "Rts.h"
+
+StgWord16 closure_flags[] = {
+
+/*
+ * These *must* be in the same order as the closure types in
+ * ClosureTypes.h.
+ */
+
+/* ToDo: some of these flags seem to be duplicated.
+ * - NS is the same as HNF, and the negation of THU
+ * (however, we set NS for indirections, which is probably the
+ * right thing to do, since we never get indirections pointing
+ * to thunks.)
+ */
+
+/* 0 1 2 3 4 5 6 7 */
+/* HNF BTM NS STA THU MUT UPT SRT */
+
+/* INVALID_OBJECT = */ ( 0 ),
+/* CONSTR = */ (_HNF| _NS ),
+/* CONSTR_1_0 = */ (_HNF| _NS ),
+/* CONSTR_0_1 = */ (_HNF| _NS ),
+/* CONSTR_2_0 = */ (_HNF| _NS ),
+/* CONSTR_1_1 = */ (_HNF| _NS ),
+/* CONSTR_0_2 = */ (_HNF| _NS ),
+/* CONSTR_INTLIKE = */ (_HNF| _NS|_STA ),
+/* CONSTR_CHARLIKE = */ (_HNF| _NS|_STA ),
+/* CONSTR_STATIC = */ (_HNF| _NS|_STA ),
+/* CONSTR_NOCAF_STATIC = */ (_HNF| _NS|_STA ),
+/* FUN = */ (_HNF| _NS| _SRT ),
+/* FUN_1_0 = */ (_HNF| _NS| _SRT ),
+/* FUN_0_1 = */ (_HNF| _NS| _SRT ),
+/* FUN_2_0 = */ (_HNF| _NS| _SRT ),
+/* FUN_1_1 = */ (_HNF| _NS| _SRT ),
+/* FUN_0_2 = */ (_HNF| _NS| _SRT ),
+/* FUN_STATIC = */ (_HNF| _NS|_STA| _SRT ),
+/* THUNK = */ ( _BTM| _THU| _SRT ),
+/* THUNK_1_0 = */ ( _BTM| _THU| _SRT ),
+/* THUNK_0_1 = */ ( _BTM| _THU| _SRT ),
+/* THUNK_2_0 = */ ( _BTM| _THU| _SRT ),
+/* THUNK_1_1 = */ ( _BTM| _THU| _SRT ),
+/* THUNK_0_2 = */ ( _BTM| _THU| _SRT ),
+/* THUNK_STATIC = */ ( _BTM| _STA|_THU| _SRT ),
+/* THUNK_SELECTOR = */ ( _BTM| _THU| _SRT ),
+/* BCO = */ (_HNF| _NS ),
+/* AP = */ ( _THU ),
+/* PAP = */ (_HNF| _NS ),
+/* AP_STACK = */ ( _THU ),
+/* IND = */ ( _NS| _IND ),
+/* IND_OLDGEN = */ ( _NS| _IND ),
+/* IND_PERM = */ ( _NS| _IND ),
+/* IND_OLDGEN_PERM = */ ( _NS| _IND ),
+/* IND_STATIC = */ ( _NS|_STA| _IND ),
+/* RET_BCO = */ ( _BTM ),
+/* RET_SMALL = */ ( _BTM| _SRT ),
+/* RET_VEC_SMALL = */ ( _BTM| _SRT ),
+/* RET_BIG = */ ( _SRT ),
+/* RET_VEC_BIG = */ ( _SRT ),
+/* RET_DYN = */ ( _SRT ),
+/* RET_FUN = */ ( 0 ),
+/* UPDATE_FRAME = */ ( _BTM ),
+/* CATCH_FRAME = */ ( _BTM ),
+/* STOP_FRAME = */ ( _BTM ),
+/* CAF_BLACKHOLE = */ ( _BTM|_NS| _UPT ),
+/* BLACKHOLE = */ ( _NS| _UPT ),
+/* SE_BLACKHOLE = */ ( _NS| _UPT ),
+/* SE_CAF_BLACKHOLE = */ ( _NS| _UPT ),
+/* MVAR = */ (_HNF| _NS| _MUT|_UPT ),
+/* ARR_WORDS = */ (_HNF| _NS| _UPT ),
+/* MUT_ARR_PTRS_CLEAN = */ (_HNF| _NS| _MUT|_UPT ),
+/* MUT_ARR_PTRS_DIRTY = */ (_HNF| _NS| _MUT|_UPT ),
+/* MUT_ARR_PTRS_FROZEN0 = */ (_HNF| _NS| _MUT|_UPT ),
+/* MUT_ARR_PTRS_FROZEN = */ (_HNF| _NS| _UPT ),
+/* MUT_VAR_CLEAN = */ (_HNF| _NS| _MUT|_UPT ),
+/* MUT_VAR_DIRTY = */ (_HNF| _NS| _MUT|_UPT ),
+/* WEAK = */ (_HNF| _NS| _UPT ),
+/* STABLE_NAME = */ (_HNF| _NS| _UPT ),
+/* TSO = */ (_HNF| _NS| _MUT|_UPT ),
+/* BLOCKED_FETCH = */ (_HNF| _NS| _MUT|_UPT ),
+/* FETCH_ME = */ (_HNF| _NS| _MUT|_UPT ),
+/* FETCH_ME_BQ = */ ( _NS| _MUT|_UPT ),
+/* RBH = */ ( _NS| _MUT|_UPT ),
+/* EVACUATED = */ ( 0 ),
+/* REMOTE_REF = */ (_HNF| _NS| _UPT ),
+/* TVAR_WAIT_QUEUE = */ ( _NS| _MUT|_UPT ),
+/* TVAR = */ (_HNF| _NS| _MUT|_UPT ),
+/* TREC_CHUNK = */ ( _NS| _MUT|_UPT ),
+/* TREC_HEADER = */ ( _NS| _MUT|_UPT ),
+/* ATOMICALLY_FRAME = */ ( _BTM ),
+/* CATCH_RETRY_FRAME = */ ( _BTM ),
+/* CATCH_STM_FRAME = */ ( _BTM )
+};
+
+#if N_CLOSURE_TYPES != 73
+#error Closure types changed: update ClosureFlags.c!
+#endif
+