StgMiscClosures.h 6.9 KB
Newer Older
1
/* -----------------------------------------------------------------------------
rrt's avatar
rrt committed
2
 * $Id: StgMiscClosures.h,v 1.18 2000/08/02 14:13:27 rrt Exp $
3 4
 *
 * (c) The GHC Team, 1998-1999
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
 *
 * Entry code for various built-in closure types.
 *
 * ---------------------------------------------------------------------------*/

/* The naming scheme here follows the naming scheme for closure types
 * defined in InfoTables.h.  The actual info tables and entry code for
 * these objects can be found in StgMiscClosures.hc.
 */

/* entry code */

STGFUN(IND_entry);
STGFUN(IND_STATIC_entry);
STGFUN(IND_PERM_entry);
STGFUN(IND_OLDGEN_entry);
STGFUN(IND_OLDGEN_PERM_entry);
STGFUN(CAF_UNENTERED_entry);
STGFUN(CAF_ENTERED_entry);
STGFUN(CAF_BLACKHOLE_entry);
STGFUN(BLACKHOLE_entry);
26
STGFUN(BLACKHOLE_BQ_entry);
27 28 29
#ifdef SMP
STGFUN(WHITEHOLE_entry);
#endif
30 31 32 33
#ifdef TICKY_TICKY
STGFUN(SE_BLACKHOLE_entry);
STGFUN(SE_CAF_BLACKHOLE_entry);
#endif
34 35 36
#if defined(PAR) || defined(GRAN)
STGFUN(RBH_entry);
#endif
37 38 39 40
STGFUN(BCO_entry);
STGFUN(EVACUATED_entry);
STGFUN(FOREIGN_entry);
STGFUN(WEAK_entry);
41
STGFUN(NO_FINALIZER_entry);
42
STGFUN(DEAD_WEAK_entry);
43
STGFUN(STABLE_NAME_entry);
44 45 46 47 48 49 50 51
STGFUN(TSO_entry);
STGFUN(FULL_MVAR_entry);
STGFUN(EMPTY_MVAR_entry);
STGFUN(ARR_WORDS_entry);
STGFUN(MUT_ARR_PTRS_entry);
STGFUN(MUT_ARR_PTRS_FROZEN_entry);
STGFUN(MUT_VAR_entry);
STGFUN(END_TSO_QUEUE_entry);
52 53
STGFUN(MUT_CONS_entry);
STGFUN(END_MUT_LIST_entry);
54 55
STGFUN(dummy_ret_entry);

56 57 58 59 60 61 62 63 64
/* this is the NIL ptr for a TSO queue (e.g. runnable queue) */
#define END_TSO_QUEUE  ((StgTSO *)(void*)&END_TSO_QUEUE_closure)
#if defined(PAR) || defined(GRAN)
/* this is the NIL ptr for a blocking queue */
# define END_BQ_QUEUE  ((StgBlockingQueueElement *)(void*)&END_TSO_QUEUE_closure)
/* this is the NIL ptr for a blocked fetch queue (as in PendingFetches in GUM) */
# define END_BF_QUEUE  ((StgBlockedFetch *)(void*)&END_TSO_QUEUE_closure)
#endif

65 66
/* info tables */

sof's avatar
sof committed
67 68 69 70 71 72 73 74 75 76
extern DLL_IMPORT_RTS const StgInfoTable IND_info;
extern DLL_IMPORT_RTS const StgInfoTable IND_STATIC_info;
extern DLL_IMPORT_RTS const StgInfoTable IND_PERM_info;
extern DLL_IMPORT_RTS const StgInfoTable IND_OLDGEN_info;
extern DLL_IMPORT_RTS const StgInfoTable IND_OLDGEN_PERM_info;
extern DLL_IMPORT_RTS const StgInfoTable CAF_UNENTERED_info;
extern DLL_IMPORT_RTS const StgInfoTable CAF_ENTERED_info;
extern DLL_IMPORT_RTS const StgInfoTable CAF_BLACKHOLE_info;
extern DLL_IMPORT_RTS const StgInfoTable BLACKHOLE_info;
extern DLL_IMPORT_RTS const StgInfoTable BLACKHOLE_BQ_info;
77 78 79
#ifdef SMP
extern DLL_IMPORT_RTS const StgInfoTable WHITEHOLE_info;
#endif
80 81 82 83
#ifdef TICKY_TICKY
extern DLL_IMPORT_RTS const StgInfoTable SE_BLACKHOLE_info;
extern DLL_IMPORT_RTS const StgInfoTable SE_CAF_BLACKHOLE_info;
#endif
84 85 86
#if defined(PAR) || defined(GRAN)
extern DLL_IMPORT_RTS const StgInfoTable RBH_info;
#endif
sof's avatar
sof committed
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
extern DLL_IMPORT_RTS const StgInfoTable BCO_info;
extern DLL_IMPORT_RTS const StgInfoTable EVACUATED_info;
extern DLL_IMPORT_RTS const StgInfoTable FOREIGN_info;
extern DLL_IMPORT_RTS const StgInfoTable WEAK_info;
extern DLL_IMPORT_RTS const StgInfoTable DEAD_WEAK_info;
extern DLL_IMPORT_RTS const StgInfoTable STABLE_NAME_info;
extern DLL_IMPORT_RTS const StgInfoTable FULL_MVAR_info;
extern DLL_IMPORT_RTS const StgInfoTable EMPTY_MVAR_info;
extern DLL_IMPORT_RTS const StgInfoTable TSO_info;
extern DLL_IMPORT_RTS const StgInfoTable ARR_WORDS_info;
extern DLL_IMPORT_RTS const StgInfoTable MUT_ARR_WORDS_info;
extern DLL_IMPORT_RTS const StgInfoTable MUT_ARR_PTRS_info;
extern DLL_IMPORT_RTS const StgInfoTable MUT_ARR_PTRS_FROZEN_info;
extern DLL_IMPORT_RTS const StgInfoTable MUT_VAR_info;
extern DLL_IMPORT_RTS const StgInfoTable END_TSO_QUEUE_info;
extern DLL_IMPORT_RTS const StgInfoTable MUT_CONS_info;
extern DLL_IMPORT_RTS const StgInfoTable END_MUT_LIST_info;
extern DLL_IMPORT_RTS const StgInfoTable catch_info;
extern DLL_IMPORT_RTS const StgInfoTable seq_info;
extern DLL_IMPORT_RTS const StgInfoTable dummy_ret_info;
107 108 109 110

#ifdef INTERPRETER

EXTFUN(Hugs_CONSTR_entry);
111 112

extern const vec_info_8 ret_bco_info;
113 114 115 116 117

#endif /* INTERPRETER */

/* closures */

sof's avatar
sof committed
118 119 120 121
extern DLL_IMPORT_DATA StgClosure END_TSO_QUEUE_closure;
extern DLL_IMPORT_DATA StgClosure END_MUT_LIST_closure;
extern DLL_IMPORT_DATA StgClosure NO_FINALIZER_closure;
extern DLL_IMPORT_DATA StgClosure dummy_ret_closure;
sof's avatar
sof committed
122
extern DLL_IMPORT_DATA StgClosure forceIO_closure;
123

sof's avatar
sof committed
124 125
extern DLL_IMPORT_DATA StgIntCharlikeClosure CHARLIKE_closure[];
extern DLL_IMPORT_DATA StgIntCharlikeClosure INTLIKE_closure[];
126 127 128

/* standard entry points */

rrt's avatar
rrt committed
129
/* EXTFUN_RTS(stg_error_entry); No longer used */
130

131 132
  /* (see also below  -- KSW 1998-12) */

133 134
/* standard selector thunks */

rrt's avatar
rrt committed
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
EXTINFO_RTS __sel_0_upd_info;
EXTINFO_RTS __sel_1_upd_info;
EXTINFO_RTS __sel_2_upd_info;
EXTINFO_RTS __sel_3_upd_info;
EXTINFO_RTS __sel_4_upd_info;
EXTINFO_RTS __sel_5_upd_info;
EXTINFO_RTS __sel_6_upd_info;
EXTINFO_RTS __sel_7_upd_info;
EXTINFO_RTS __sel_8_upd_info;
EXTINFO_RTS __sel_8_upd_info;
EXTINFO_RTS __sel_9_upd_info;
EXTINFO_RTS __sel_10_upd_info;
EXTINFO_RTS __sel_11_upd_info;
EXTINFO_RTS __sel_12_upd_info;
EXTINFO_RTS __sel_13_upd_info;
EXTINFO_RTS __sel_14_upd_info;
EXTINFO_RTS __sel_15_upd_info;

EXTINFO_RTS __sel_0_noupd_info;
EXTINFO_RTS __sel_1_noupd_info;
EXTINFO_RTS __sel_2_noupd_info;
EXTINFO_RTS __sel_3_noupd_info;
EXTINFO_RTS __sel_4_noupd_info;
EXTINFO_RTS __sel_5_noupd_info;
EXTINFO_RTS __sel_6_noupd_info;
EXTINFO_RTS __sel_7_noupd_info;
EXTINFO_RTS __sel_8_noupd_info;
EXTINFO_RTS __sel_9_noupd_info;
EXTINFO_RTS __sel_10_noupd_info;
EXTINFO_RTS __sel_11_noupd_info;
EXTINFO_RTS __sel_12_noupd_info;
EXTINFO_RTS __sel_13_noupd_info;
EXTINFO_RTS __sel_14_noupd_info;
EXTINFO_RTS __sel_15_noupd_info;
169

170 171
  /* and their standard entry points  -- KSW 1998-12 */

rrt's avatar
rrt committed
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
EXTFUN_RTS(__sel_0_upd_entry);
EXTFUN_RTS(__sel_1_upd_entry);
EXTFUN_RTS(__sel_2_upd_entry);
EXTFUN_RTS(__sel_3_upd_entry);
EXTFUN_RTS(__sel_4_upd_entry);
EXTFUN_RTS(__sel_5_upd_entry);
EXTFUN_RTS(__sel_6_upd_entry);
EXTFUN_RTS(__sel_7_upd_entry);
EXTFUN_RTS(__sel_8_upd_entry);
EXTFUN_RTS(__sel_8_upd_entry);
EXTFUN_RTS(__sel_9_upd_entry);
EXTFUN_RTS(__sel_10_upd_entry);
EXTFUN_RTS(__sel_11_upd_entry);
EXTFUN_RTS(__sel_12_upd_entry);
EXTFUN_RTS(__sel_13_upd_entry);
EXTFUN_RTS(__sel_14_upd_entry);
EXTFUN_RTS(__sel_15_upd_entry);

EXTFUN_RTS(__sel_0_noupd_entry);
EXTFUN_RTS(__sel_1_noupd_entry);
EXTFUN_RTS(__sel_2_noupd_entry);
EXTFUN_RTS(__sel_3_noupd_entry);
EXTFUN_RTS(__sel_4_noupd_entry);
EXTFUN_RTS(__sel_5_noupd_entry);
EXTFUN_RTS(__sel_6_noupd_entry);
EXTFUN_RTS(__sel_7_noupd_entry);
EXTFUN_RTS(__sel_8_noupd_entry);
EXTFUN_RTS(__sel_9_noupd_entry);
EXTFUN_RTS(__sel_10_noupd_entry);
EXTFUN_RTS(__sel_11_noupd_entry);
EXTFUN_RTS(__sel_12_noupd_entry);
EXTFUN_RTS(__sel_13_noupd_entry);
EXTFUN_RTS(__sel_14_noupd_entry);
EXTFUN_RTS(__sel_15_noupd_entry);
206

207 208
/* standard ap thunks */

rrt's avatar
rrt committed
209 210 211 212 213 214 215 216
EXTINFO_RTS __ap_1_upd_info;
EXTINFO_RTS __ap_2_upd_info;
EXTINFO_RTS __ap_3_upd_info;
EXTINFO_RTS __ap_4_upd_info;
EXTINFO_RTS __ap_5_upd_info;
EXTINFO_RTS __ap_6_upd_info;
EXTINFO_RTS __ap_7_upd_info;
EXTINFO_RTS __ap_8_upd_info;
217