StgMiscClosures.h 5.85 KB
Newer Older
1
/* -----------------------------------------------------------------------------
2
 * $Id: StgMiscClosures.h,v 1.15 1999/11/02 15:05:53 simonmar 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 37
STGFUN(BCO_entry);
STGFUN(EVACUATED_entry);
STGFUN(FOREIGN_entry);
STGFUN(WEAK_entry);
38
STGFUN(NO_FINALIZER_entry);
39
STGFUN(DEAD_WEAK_entry);
40
STGFUN(STABLE_NAME_entry);
41 42 43 44 45 46 47 48
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);
49 50
STGFUN(MUT_CONS_entry);
STGFUN(END_MUT_LIST_entry);
51 52 53 54
STGFUN(dummy_ret_entry);

/* info tables */

sof's avatar
sof committed
55 56 57 58 59 60 61 62 63 64
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;
65 66 67
#ifdef SMP
extern DLL_IMPORT_RTS const StgInfoTable WHITEHOLE_info;
#endif
68 69 70 71
#ifdef TICKY_TICKY
extern DLL_IMPORT_RTS const StgInfoTable SE_BLACKHOLE_info;
extern DLL_IMPORT_RTS const StgInfoTable SE_CAF_BLACKHOLE_info;
#endif
sof's avatar
sof committed
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
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;
92 93 94 95

#ifdef INTERPRETER

EXTFUN(Hugs_CONSTR_entry);
96 97

extern const vec_info_8 ret_bco_info;
98 99 100 101 102

#endif /* INTERPRETER */

/* closures */

sof's avatar
sof committed
103 104 105 106
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
107
extern DLL_IMPORT_DATA StgClosure forceIO_closure;
108

sof's avatar
sof committed
109 110
extern DLL_IMPORT_DATA StgIntCharlikeClosure CHARLIKE_closure[];
extern DLL_IMPORT_DATA StgIntCharlikeClosure INTLIKE_closure[];
111 112 113 114 115

/* standard entry points */

extern StgFun stg_error_entry;

116 117
  /* (see also below  -- KSW 1998-12) */

118 119
/* standard selector thunks */

sof's avatar
sof committed
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 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
#ifdef COMPILING_RTS
#define EI__ EI_
#else
#define EI__ EDI_
#endif

EI__ __sel_0_upd_info;
EI__ __sel_1_upd_info;
EI__ __sel_2_upd_info;
EI__ __sel_3_upd_info;
EI__ __sel_4_upd_info;
EI__ __sel_5_upd_info;
EI__ __sel_6_upd_info;
EI__ __sel_7_upd_info;
EI__ __sel_8_upd_info;
EI__ __sel_8_upd_info;
EI__ __sel_9_upd_info;
EI__ __sel_10_upd_info;
EI__ __sel_11_upd_info;
EI__ __sel_12_upd_info;
EI__ __sel_13_upd_info;
EI__ __sel_14_upd_info;
EI__ __sel_15_upd_info;

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

161 162 163 164 165 166 167 168 169 170 171 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
  /* and their standard entry points  -- KSW 1998-12 */

EF_(__sel_0_upd_entry);
EF_(__sel_1_upd_entry);
EF_(__sel_2_upd_entry);
EF_(__sel_3_upd_entry);
EF_(__sel_4_upd_entry);
EF_(__sel_5_upd_entry);
EF_(__sel_6_upd_entry);
EF_(__sel_7_upd_entry);
EF_(__sel_8_upd_entry);
EF_(__sel_8_upd_entry);
EF_(__sel_9_upd_entry);
EF_(__sel_10_upd_entry);
EF_(__sel_11_upd_entry);
EF_(__sel_12_upd_entry);
EF_(__sel_13_upd_entry);
EF_(__sel_14_upd_entry);
EF_(__sel_15_upd_entry);

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

198 199
/* standard ap thunks */

sof's avatar
sof committed
200 201 202 203 204 205 206 207
EI__ __ap_1_upd_info;
EI__ __ap_2_upd_info;
EI__ __ap_3_upd_info;
EI__ __ap_4_upd_info;
EI__ __ap_5_upd_info;
EI__ __ap_6_upd_info;
EI__ __ap_7_upd_info;
EI__ __ap_8_upd_info;
208