[project @ 2000-10-11 16:26:04 by simonmar]
[ghc-hetmet.git] / ghc / rts / ClosureFlags.c
1 /* -----------------------------------------------------------------------------
2  * $Id: ClosureFlags.c,v 1.6 2000/01/13 14:34:02 hwloidl Exp $
3  *
4  * (c) The GHC Team 1998-1999
5  *
6  * Closure type flags
7  *
8  * ---------------------------------------------------------------------------*/
9
10 #include "Rts.h"
11
12 StgWord16 closure_flags[] = {
13
14 /* 
15  * These *must* be in the same order as the closure types in
16  * ClosureTypes.h.
17  */
18
19 /* ToDo: some of these flags seem to be duplicated.
20  *       - NS is the same as HNF, and the negation of THU
21  * (however, we set NS for indirections, which is probably the
22  *  right thing to do, since we never get indirections pointing
23  *  to thunks.)
24  */
25
26 /*                             0    1    2    3    4   5   6   7 */
27 /*                           HNF  BTM   NS  STA  THU MUT UPT SRT */
28                                                                     
29 /* INVALID_OBJECT       */ ( 0                                   ),
30 /* CONSTR               */ (_HNF|     _NS                        ),
31 /* CONSTR_1_0           */ (_HNF|     _NS                        ),
32 /* CONSTR_0_1           */ (_HNF|     _NS                        ),
33 /* CONSTR_2_0           */ (_HNF|     _NS                        ),
34 /* CONSTR_1_1           */ (_HNF|     _NS                        ),
35 /* CONSTR_0_2           */ (_HNF|     _NS                        ),
36 /* CONSTR_INTLIKE       */ (_HNF|     _NS|_STA                   ),
37 /* CONSTR_CHARLIKE      */ (_HNF|     _NS|_STA                   ),
38 /* CONSTR_STATIC        */ (_HNF|     _NS|_STA                   ),
39 /* CONSTR_NOCAF_STATIC  */ (_HNF|     _NS|_STA                   ),
40 /* FUN                  */ (_HNF|     _NS|                  _SRT ),
41 /* FUN_1_0              */ (_HNF|     _NS                        ),
42 /* FUN_0_1              */ (_HNF|     _NS                        ),
43 /* FUN_2_0              */ (_HNF|     _NS                        ),
44 /* FUN_1_1              */ (_HNF|     _NS                        ),
45 /* FUN_0_2              */ (_HNF|     _NS                        ),
46 /* FUN_STATIC           */ (_HNF|     _NS|_STA|             _SRT ),
47 /* THUNK                */ (     _BTM|         _THU|        _SRT ),
48 /* THUNK_1_0            */ (     _BTM|         _THU|        _SRT ),
49 /* THUNK_0_1            */ (     _BTM|         _THU|        _SRT ),
50 /* THUNK_2_0            */ (     _BTM|         _THU|        _SRT ),
51 /* THUNK_1_1            */ (     _BTM|         _THU|        _SRT ),
52 /* THUNK_0_2            */ (     _BTM|         _THU|        _SRT ),
53 /* THUNK_STATIC         */ (     _BTM|    _STA|_THU|        _SRT ),
54 /* THUNK_SELECTOR       */ (     _BTM|         _THU|        _SRT ),
55 /* BCO                  */ (_HNF|     _NS                        ),
56 /* AP_UPD               */ (     _BTM|         _THU              ),
57 /* PAP                  */ (_HNF|     _NS                        ),
58 /* IND                  */ (          _NS                        ),
59 /* IND_OLDGEN           */ (          _NS                        ),
60 /* IND_PERM             */ (          _NS                        ),
61 /* IND_OLDGEN_PERM      */ (          _NS                        ),
62 /* IND_STATIC           */ (          _NS|_STA                   ),
63 /* CAF_UNENTERED        */ ( 0                                   ),
64 /* CAF_ENTERED          */ ( 0                                   ),
65 /* CAF_BLACKHOLE        */ (     _BTM|_NS|         _MUT|_UPT     ),
66 /* RET_BCO              */ (     _BTM                            ),
67 /* RET_SMALL            */ (     _BTM|                       _SRT),
68 /* RET_VEC_SMALL        */ (     _BTM|                       _SRT),
69 /* RET_BIG              */ (                                 _SRT),
70 /* RET_VEC_BIG          */ (                                 _SRT),
71 /* RET_DYN              */ (                                 _SRT),
72 /* UPDATE_FRAME         */ (     _BTM                            ),
73 /* CATCH_FRAME          */ (     _BTM                            ),
74 /* STOP_FRAME           */ (     _BTM                            ),
75 /* SEQ_FRAME            */ (     _BTM                            ),
76 /* BLACKHOLE            */ (          _NS|         _MUT|_UPT     ),
77 /* BLACKHOLE_BQ         */ (          _NS|         _MUT|_UPT     ),
78 /* SE_BLACKHOLE         */ (          _NS|              _UPT     ),
79 /* SE_CAF_BLACKHOLE     */ (          _NS|              _UPT     ),
80 /* MVAR                 */ (_HNF|     _NS|         _MUT|_UPT     ),
81 /* ARR_WORDS            */ (_HNF|     _NS|              _UPT     ),
82 /* MUT_ARR_PTRS         */ (_HNF|     _NS|         _MUT|_UPT     ),
83 /* MUT_ARR_PTRS_FROZEN  */ (_HNF|     _NS|         _MUT|_UPT     ),
84 /* MUT_VAR              */ (_HNF|     _NS|         _MUT|_UPT     ),
85 /* WEAK                 */ (_HNF|     _NS|              _UPT     ),
86 /* FOREIGN              */ (_HNF|     _NS|              _UPT     ),
87 /* STABLE_NAME          */ (_HNF|     _NS|              _UPT     ),
88
89 /* TSO                  */ (_HNF|     _NS|         _MUT|_UPT     ),
90 /* BLOCKED_FETCH        */ (_HNF|     _NS|         _MUT|_UPT     ),
91 /* FETCH_ME             */ (_HNF|     _NS|         _MUT|_UPT     ),
92 /* FETCH_ME_BQ          */ (          _NS|         _MUT|_UPT     ),
93 /* RBH                  */ (          _NS|         _MUT|_UPT     ),
94
95 /* EVACUATED            */ ( 0                                   ),
96
97 /* N_CLOSURE_TYPES      */ ( 0                                   )
98 };