StgMiscClosures.h 7.27 KB
Newer Older
1
/* -----------------------------------------------------------------------------
2
 * $Id: StgMiscClosures.h,v 1.19 2000/09/11 11:17:09 sewardj 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 65 66 67 68 69
#ifdef GHCI
/* entry code for constructors created by the metacircular interpreter */
STGFUN(mci_constr_entry);
STGFUN(mci_constr1_entry);
STGFUN(mci_constr2_entry);
STGFUN(mci_constr3_entry);
STGFUN(mci_constr4_entry);
STGFUN(mci_constr5_entry);
STGFUN(mci_constr6_entry);
STGFUN(mci_constr7_entry);
STGFUN(mci_constr8_entry);
EI_(PrelBase_Izh_con_info); /* Kludge! */
#endif

70 71 72 73 74 75 76 77 78
/* 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

79 80
/* info tables */

sof's avatar
sof committed
81 82 83 84 85 86 87 88 89 90
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;
91 92 93
#ifdef SMP
extern DLL_IMPORT_RTS const StgInfoTable WHITEHOLE_info;
#endif
94 95 96 97
#ifdef TICKY_TICKY
extern DLL_IMPORT_RTS const StgInfoTable SE_BLACKHOLE_info;
extern DLL_IMPORT_RTS const StgInfoTable SE_CAF_BLACKHOLE_info;
#endif
98 99 100
#if defined(PAR) || defined(GRAN)
extern DLL_IMPORT_RTS const StgInfoTable RBH_info;
#endif
sof's avatar
sof committed
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
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;
121 122 123 124

#ifdef INTERPRETER

EXTFUN(Hugs_CONSTR_entry);
125 126

extern const vec_info_8 ret_bco_info;
127 128 129 130 131

#endif /* INTERPRETER */

/* closures */

sof's avatar
sof committed
132 133 134 135
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
136
extern DLL_IMPORT_DATA StgClosure forceIO_closure;
137

sof's avatar
sof committed
138 139
extern DLL_IMPORT_DATA StgIntCharlikeClosure CHARLIKE_closure[];
extern DLL_IMPORT_DATA StgIntCharlikeClosure INTLIKE_closure[];
140 141 142

/* standard entry points */

rrt's avatar
rrt committed
143
/* EXTFUN_RTS(stg_error_entry); No longer used */
144

145 146
  /* (see also below  -- KSW 1998-12) */

147 148
/* standard selector thunks */

rrt's avatar
rrt committed
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
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;
183

184 185
  /* and their standard entry points  -- KSW 1998-12 */

rrt's avatar
rrt committed
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
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);
220

221 222
/* standard ap thunks */

rrt's avatar
rrt committed
223 224 225 226 227 228 229 230
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;
231