077927c7943cc80e6f47760e0dabb4841d47dbb1
[ghc-hetmet.git] / ghc / includes / StgMiscClosures.h
1 /* -----------------------------------------------------------------------------
2  * $Id: StgMiscClosures.h,v 1.26 2000/12/19 12:58:50 simonmar Exp $
3  *
4  * (c) The GHC Team, 1998-1999
5  *
6  * Entry code for various built-in closure types.
7  *
8  * ---------------------------------------------------------------------------*/
9
10 /* The naming scheme here follows the naming scheme for closure types
11  * defined in InfoTables.h.  The actual info tables and entry code for
12  * these objects can be found in StgMiscClosures.hc.
13  */
14
15 /* entry code */
16
17 STGFUN(stg_IND_entry);
18 STGFUN(stg_IND_STATIC_entry);
19 STGFUN(stg_IND_PERM_entry);
20 STGFUN(stg_IND_OLDGEN_entry);
21 STGFUN(stg_IND_OLDGEN_PERM_entry);
22 STGFUN(stg_CAF_UNENTERED_entry);
23 STGFUN(stg_CAF_ENTERED_entry);
24 STGFUN(stg_BLACKHOLE_entry);
25 STGFUN(stg_BLACKHOLE_STATIC_entry);
26 STGFUN(stg_BLACKHOLE_BQ_entry);
27 STGFUN(stg_BLACKHOLE_BQ_STATIC_entry);
28 #ifdef SMP
29 STGFUN(stg_WHITEHOLE_entry);
30 #endif
31 #ifdef TICKY_TICKY
32 STGFUN(stg_SE_BLACKHOLE_entry);
33 STGFUN(stg_SE_BLACKHOLE_STATIC_entry);
34 #endif
35 #if defined(PAR) || defined(GRAN)
36 STGFUN(stg_RBH_entry);
37 #endif
38 STGFUN(stg_BCO_entry);
39 STGFUN(stg_EVACUATED_entry);
40 STGFUN(stg_FOREIGN_entry);
41 STGFUN(stg_WEAK_entry);
42 STGFUN(stg_NO_FINALIZER_entry);
43 STGFUN(stg_DEAD_WEAK_entry);
44 STGFUN(stg_STABLE_NAME_entry);
45 STGFUN(stg_TSO_entry);
46 STGFUN(stg_FULL_MVAR_entry);
47 STGFUN(stg_EMPTY_MVAR_entry);
48 STGFUN(stg_ARR_WORDS_entry);
49 STGFUN(stg_MUT_ARR_PTRS_entry);
50 STGFUN(stg_MUT_ARR_PTRS_FROZEN_entry);
51 STGFUN(stg_MUT_VAR_entry);
52 STGFUN(stg_END_TSO_QUEUE_entry);
53 STGFUN(stg_MUT_CONS_entry);
54 STGFUN(stg_END_MUT_LIST_entry);
55 STGFUN(stg_dummy_ret_entry);
56
57 #ifdef GHCI
58 STGFUN(stg_interp_constr_entry);
59 STGFUN(stg_interp_constr1_entry);
60 STGFUN(stg_interp_constr2_entry);
61 STGFUN(stg_interp_constr3_entry);
62 STGFUN(stg_interp_constr4_entry);
63 STGFUN(stg_interp_constr5_entry);
64 STGFUN(stg_interp_constr6_entry);
65 STGFUN(stg_interp_constr7_entry);
66 STGFUN(stg_interp_constr8_entry);
67 #endif
68
69 #if defined(PAR) || defined(GRAN)
70 /* this is the NIL ptr for a blocking queue */
71 # define END_BQ_QUEUE  ((StgBlockingQueueElement *)(void*)&END_TSO_QUEUE_closure)
72 /* this is the NIL ptr for a blocked fetch queue (as in PendingFetches in GUM) */
73 # define END_BF_QUEUE  ((StgBlockedFetch *)(void*)&END_TSO_QUEUE_closure)
74 #endif
75
76 /* info tables */
77
78 extern DLL_IMPORT_RTS const StgInfoTable stg_IND_info;
79 extern DLL_IMPORT_RTS const StgInfoTable stg_IND_STATIC_info;
80 extern DLL_IMPORT_RTS const StgInfoTable stg_IND_PERM_info;
81 extern DLL_IMPORT_RTS const StgInfoTable stg_IND_OLDGEN_info;
82 extern DLL_IMPORT_RTS const StgInfoTable stg_IND_OLDGEN_PERM_info;
83 extern DLL_IMPORT_RTS const StgInfoTable stg_CAF_UNENTERED_info;
84 extern DLL_IMPORT_RTS const StgInfoTable stg_CAF_ENTERED_info;
85 extern DLL_IMPORT_RTS const StgInfoTable stg_BLACKHOLE_info;
86 extern DLL_IMPORT_RTS const StgInfoTable stg_BLACKHOLE_STATIC_info;
87 extern DLL_IMPORT_RTS const StgInfoTable stg_BLACKHOLE_BQ_info;
88 extern DLL_IMPORT_RTS const StgInfoTable stg_BLACKHOLE_BQ_STATIC_info;
89 #ifdef SMP
90 extern DLL_IMPORT_RTS const StgInfoTable stg_WHITEHOLE_info;
91 #endif
92 #ifdef TICKY_TICKY
93 extern DLL_IMPORT_RTS const StgInfoTable stg_SE_BLACKHOLE_info;
94 extern DLL_IMPORT_RTS const StgInfoTable stg_SE_BLACKHOLE_STATIC_info;
95 #endif
96 #if defined(PAR) || defined(GRAN)
97 extern DLL_IMPORT_RTS const StgInfoTable stg_RBH_info;
98 #endif
99 extern DLL_IMPORT_RTS const StgInfoTable stg_BCO_info;
100 extern DLL_IMPORT_RTS const StgInfoTable stg_EVACUATED_info;
101 extern DLL_IMPORT_RTS const StgInfoTable stg_FOREIGN_info;
102 extern DLL_IMPORT_RTS const StgInfoTable stg_WEAK_info;
103 extern DLL_IMPORT_RTS const StgInfoTable stg_DEAD_WEAK_info;
104 extern DLL_IMPORT_RTS const StgInfoTable stg_STABLE_NAME_info;
105 extern DLL_IMPORT_RTS const StgInfoTable stg_FULL_MVAR_info;
106 extern DLL_IMPORT_RTS const StgInfoTable stg_EMPTY_MVAR_info;
107 extern DLL_IMPORT_RTS const StgInfoTable stg_TSO_info;
108 extern DLL_IMPORT_RTS const StgInfoTable stg_ARR_WORDS_info;
109 extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_ARR_WORDS_info;
110 extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_ARR_PTRS_info;
111 extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_ARR_PTRS_FROZEN_info;
112 extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_VAR_info;
113 extern DLL_IMPORT_RTS const StgInfoTable stg_END_TSO_QUEUE_info;
114 extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_CONS_info;
115 extern DLL_IMPORT_RTS const StgInfoTable stg_END_MUT_LIST_info;
116 extern DLL_IMPORT_RTS const StgInfoTable stg_catch_info;
117 extern DLL_IMPORT_RTS const StgInfoTable stg_seq_info;
118 extern DLL_IMPORT_RTS const StgInfoTable stg_dummy_ret_info;
119
120 #ifdef INTERPRETER
121
122 EXTFUN(Hugs_CONSTR_entry);
123
124 extern const vec_info_8 stg_ret_bco_info;
125
126 #endif /* INTERPRETER */
127
128 /* closures */
129
130 extern DLL_IMPORT_RTS StgClosure stg_END_TSO_QUEUE_closure;
131 extern DLL_IMPORT_RTS StgClosure stg_END_MUT_LIST_closure;
132 extern DLL_IMPORT_RTS StgClosure stg_NO_FINALIZER_closure;
133 extern DLL_IMPORT_RTS StgClosure stg_dummy_ret_closure;
134 extern DLL_IMPORT_RTS StgClosure stg_forceIO_closure;
135
136 extern DLL_IMPORT_RTS StgIntCharlikeClosure stg_CHARLIKE_closure[];
137 extern DLL_IMPORT_RTS StgIntCharlikeClosure stg_INTLIKE_closure[];
138
139 /* standard entry points */
140
141 /* EXTFUN_RTS(stg_error_entry); No longer used */
142
143   /* (see also below  -- KSW 1998-12) */
144
145 /* standard selector thunks */
146
147 EXTINFO_RTS stg_sel_0_upd_info;
148 EXTINFO_RTS stg_sel_1_upd_info;
149 EXTINFO_RTS stg_sel_2_upd_info;
150 EXTINFO_RTS stg_sel_3_upd_info;
151 EXTINFO_RTS stg_sel_4_upd_info;
152 EXTINFO_RTS stg_sel_5_upd_info;
153 EXTINFO_RTS stg_sel_6_upd_info;
154 EXTINFO_RTS stg_sel_7_upd_info;
155 EXTINFO_RTS stg_sel_8_upd_info;
156 EXTINFO_RTS stg_sel_8_upd_info;
157 EXTINFO_RTS stg_sel_9_upd_info;
158 EXTINFO_RTS stg_sel_10_upd_info;
159 EXTINFO_RTS stg_sel_11_upd_info;
160 EXTINFO_RTS stg_sel_12_upd_info;
161 EXTINFO_RTS stg_sel_13_upd_info;
162 EXTINFO_RTS stg_sel_14_upd_info;
163 EXTINFO_RTS stg_sel_15_upd_info;
164
165 EXTINFO_RTS stg_sel_0_noupd_info;
166 EXTINFO_RTS stg_sel_1_noupd_info;
167 EXTINFO_RTS stg_sel_2_noupd_info;
168 EXTINFO_RTS stg_sel_3_noupd_info;
169 EXTINFO_RTS stg_sel_4_noupd_info;
170 EXTINFO_RTS stg_sel_5_noupd_info;
171 EXTINFO_RTS stg_sel_6_noupd_info;
172 EXTINFO_RTS stg_sel_7_noupd_info;
173 EXTINFO_RTS stg_sel_8_noupd_info;
174 EXTINFO_RTS stg_sel_9_noupd_info;
175 EXTINFO_RTS stg_sel_10_noupd_info;
176 EXTINFO_RTS stg_sel_11_noupd_info;
177 EXTINFO_RTS stg_sel_12_noupd_info;
178 EXTINFO_RTS stg_sel_13_noupd_info;
179 EXTINFO_RTS stg_sel_14_noupd_info;
180 EXTINFO_RTS stg_sel_15_noupd_info;
181
182   /* and their standard entry points  -- KSW 1998-12 */
183
184 EXTFUN_RTS(stg_sel_0_upd_entry);
185 EXTFUN_RTS(stg_sel_1_upd_entry);
186 EXTFUN_RTS(stg_sel_2_upd_entry);
187 EXTFUN_RTS(stg_sel_3_upd_entry);
188 EXTFUN_RTS(stg_sel_4_upd_entry);
189 EXTFUN_RTS(stg_sel_5_upd_entry);
190 EXTFUN_RTS(stg_sel_6_upd_entry);
191 EXTFUN_RTS(stg_sel_7_upd_entry);
192 EXTFUN_RTS(stg_sel_8_upd_entry);
193 EXTFUN_RTS(stg_sel_8_upd_entry);
194 EXTFUN_RTS(stg_sel_9_upd_entry);
195 EXTFUN_RTS(stg_sel_10_upd_entry);
196 EXTFUN_RTS(stg_sel_11_upd_entry);
197 EXTFUN_RTS(stg_sel_12_upd_entry);
198 EXTFUN_RTS(stg_sel_13_upd_entry);
199 EXTFUN_RTS(stg_sel_14_upd_entry);
200 EXTFUN_RTS(stg_sel_15_upd_entry);
201
202 EXTFUN_RTS(stg_sel_0_noupd_entry);
203 EXTFUN_RTS(stg_sel_1_noupd_entry);
204 EXTFUN_RTS(stg_sel_2_noupd_entry);
205 EXTFUN_RTS(stg_sel_3_noupd_entry);
206 EXTFUN_RTS(stg_sel_4_noupd_entry);
207 EXTFUN_RTS(stg_sel_5_noupd_entry);
208 EXTFUN_RTS(stg_sel_6_noupd_entry);
209 EXTFUN_RTS(stg_sel_7_noupd_entry);
210 EXTFUN_RTS(stg_sel_8_noupd_entry);
211 EXTFUN_RTS(stg_sel_9_noupd_entry);
212 EXTFUN_RTS(stg_sel_10_noupd_entry);
213 EXTFUN_RTS(stg_sel_11_noupd_entry);
214 EXTFUN_RTS(stg_sel_12_noupd_entry);
215 EXTFUN_RTS(stg_sel_13_noupd_entry);
216 EXTFUN_RTS(stg_sel_14_noupd_entry);
217 EXTFUN_RTS(stg_sel_15_noupd_entry);
218
219 /* standard ap thunks */
220
221 EXTINFO_RTS stg_ap_1_upd_info;
222 EXTINFO_RTS stg_ap_2_upd_info;
223 EXTINFO_RTS stg_ap_3_upd_info;
224 EXTINFO_RTS stg_ap_4_upd_info;
225 EXTINFO_RTS stg_ap_5_upd_info;
226 EXTINFO_RTS stg_ap_6_upd_info;
227 EXTINFO_RTS stg_ap_7_upd_info;
228 EXTINFO_RTS stg_ap_8_upd_info;
229