[project @ 2000-12-14 16:33:18 by sewardj]
[ghc-hetmet.git] / ghc / includes / StgMiscClosures.h
1 /* -----------------------------------------------------------------------------
2  * $Id: StgMiscClosures.h,v 1.25 2000/12/14 16:33:18 sewardj 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_CAF_BLACKHOLE_entry);
25 STGFUN(stg_BLACKHOLE_entry);
26 STGFUN(stg_BLACKHOLE_BQ_entry);
27 #ifdef SMP
28 STGFUN(stg_WHITEHOLE_entry);
29 #endif
30 #ifdef TICKY_TICKY
31 STGFUN(stg_SE_BLACKHOLE_entry);
32 STGFUN(stg_SE_CAF_BLACKHOLE_entry);
33 #endif
34 #if defined(PAR) || defined(GRAN)
35 STGFUN(stg_RBH_entry);
36 #endif
37 STGFUN(stg_BCO_entry);
38 STGFUN(stg_EVACUATED_entry);
39 STGFUN(stg_FOREIGN_entry);
40 STGFUN(stg_WEAK_entry);
41 STGFUN(stg_NO_FINALIZER_entry);
42 STGFUN(stg_DEAD_WEAK_entry);
43 STGFUN(stg_STABLE_NAME_entry);
44 STGFUN(stg_TSO_entry);
45 STGFUN(stg_FULL_MVAR_entry);
46 STGFUN(stg_EMPTY_MVAR_entry);
47 STGFUN(stg_ARR_WORDS_entry);
48 STGFUN(stg_MUT_ARR_PTRS_entry);
49 STGFUN(stg_MUT_ARR_PTRS_FROZEN_entry);
50 STGFUN(stg_MUT_VAR_entry);
51 STGFUN(stg_END_TSO_QUEUE_entry);
52 STGFUN(stg_MUT_CONS_entry);
53 STGFUN(stg_END_MUT_LIST_entry);
54 STGFUN(stg_dummy_ret_entry);
55
56 #ifdef GHCI
57 /* entry code for constructors created by the metacircular interpreter */
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_CAF_BLACKHOLE_info;
86 extern DLL_IMPORT_RTS const StgInfoTable stg_BLACKHOLE_info;
87 extern DLL_IMPORT_RTS const StgInfoTable stg_BLACKHOLE_BQ_info;
88 #ifdef SMP
89 extern DLL_IMPORT_RTS const StgInfoTable stg_WHITEHOLE_info;
90 #endif
91 #ifdef TICKY_TICKY
92 extern DLL_IMPORT_RTS const StgInfoTable stg_SE_BLACKHOLE_info;
93 extern DLL_IMPORT_RTS const StgInfoTable stg_SE_CAF_BLACKHOLE_info;
94 #endif
95 #if defined(PAR) || defined(GRAN)
96 extern DLL_IMPORT_RTS const StgInfoTable stg_RBH_info;
97 #endif
98 extern DLL_IMPORT_RTS const StgInfoTable stg_BCO_info;
99 extern DLL_IMPORT_RTS const StgInfoTable stg_EVACUATED_info;
100 extern DLL_IMPORT_RTS const StgInfoTable stg_FOREIGN_info;
101 extern DLL_IMPORT_RTS const StgInfoTable stg_WEAK_info;
102 extern DLL_IMPORT_RTS const StgInfoTable stg_DEAD_WEAK_info;
103 extern DLL_IMPORT_RTS const StgInfoTable stg_STABLE_NAME_info;
104 extern DLL_IMPORT_RTS const StgInfoTable stg_FULL_MVAR_info;
105 extern DLL_IMPORT_RTS const StgInfoTable stg_EMPTY_MVAR_info;
106 extern DLL_IMPORT_RTS const StgInfoTable stg_TSO_info;
107 extern DLL_IMPORT_RTS const StgInfoTable stg_ARR_WORDS_info;
108 extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_ARR_WORDS_info;
109 extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_ARR_PTRS_info;
110 extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_ARR_PTRS_FROZEN_info;
111 extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_VAR_info;
112 extern DLL_IMPORT_RTS const StgInfoTable stg_END_TSO_QUEUE_info;
113 extern DLL_IMPORT_RTS const StgInfoTable stg_MUT_CONS_info;
114 extern DLL_IMPORT_RTS const StgInfoTable stg_END_MUT_LIST_info;
115 extern DLL_IMPORT_RTS const StgInfoTable stg_catch_info;
116 extern DLL_IMPORT_RTS const StgInfoTable stg_seq_info;
117 extern DLL_IMPORT_RTS const StgInfoTable stg_dummy_ret_info;
118
119 #ifdef INTERPRETER
120
121 EXTFUN(Hugs_CONSTR_entry);
122
123 extern const vec_info_8 stg_ret_bco_info;
124
125 #endif /* INTERPRETER */
126
127 /* closures */
128
129 extern DLL_IMPORT_RTS StgClosure stg_END_TSO_QUEUE_closure;
130 extern DLL_IMPORT_RTS StgClosure stg_END_MUT_LIST_closure;
131 extern DLL_IMPORT_RTS StgClosure stg_NO_FINALIZER_closure;
132 extern DLL_IMPORT_RTS StgClosure stg_dummy_ret_closure;
133 extern DLL_IMPORT_RTS StgClosure stg_forceIO_closure;
134
135 extern DLL_IMPORT_RTS StgIntCharlikeClosure stg_CHARLIKE_closure[];
136 extern DLL_IMPORT_RTS StgIntCharlikeClosure stg_INTLIKE_closure[];
137
138 /* standard entry points */
139
140 /* EXTFUN_RTS(stg_error_entry); No longer used */
141
142   /* (see also below  -- KSW 1998-12) */
143
144 /* standard selector thunks */
145
146 EXTINFO_RTS stg_sel_0_upd_info;
147 EXTINFO_RTS stg_sel_1_upd_info;
148 EXTINFO_RTS stg_sel_2_upd_info;
149 EXTINFO_RTS stg_sel_3_upd_info;
150 EXTINFO_RTS stg_sel_4_upd_info;
151 EXTINFO_RTS stg_sel_5_upd_info;
152 EXTINFO_RTS stg_sel_6_upd_info;
153 EXTINFO_RTS stg_sel_7_upd_info;
154 EXTINFO_RTS stg_sel_8_upd_info;
155 EXTINFO_RTS stg_sel_8_upd_info;
156 EXTINFO_RTS stg_sel_9_upd_info;
157 EXTINFO_RTS stg_sel_10_upd_info;
158 EXTINFO_RTS stg_sel_11_upd_info;
159 EXTINFO_RTS stg_sel_12_upd_info;
160 EXTINFO_RTS stg_sel_13_upd_info;
161 EXTINFO_RTS stg_sel_14_upd_info;
162 EXTINFO_RTS stg_sel_15_upd_info;
163
164 EXTINFO_RTS stg_sel_0_noupd_info;
165 EXTINFO_RTS stg_sel_1_noupd_info;
166 EXTINFO_RTS stg_sel_2_noupd_info;
167 EXTINFO_RTS stg_sel_3_noupd_info;
168 EXTINFO_RTS stg_sel_4_noupd_info;
169 EXTINFO_RTS stg_sel_5_noupd_info;
170 EXTINFO_RTS stg_sel_6_noupd_info;
171 EXTINFO_RTS stg_sel_7_noupd_info;
172 EXTINFO_RTS stg_sel_8_noupd_info;
173 EXTINFO_RTS stg_sel_9_noupd_info;
174 EXTINFO_RTS stg_sel_10_noupd_info;
175 EXTINFO_RTS stg_sel_11_noupd_info;
176 EXTINFO_RTS stg_sel_12_noupd_info;
177 EXTINFO_RTS stg_sel_13_noupd_info;
178 EXTINFO_RTS stg_sel_14_noupd_info;
179 EXTINFO_RTS stg_sel_15_noupd_info;
180
181   /* and their standard entry points  -- KSW 1998-12 */
182
183 EXTFUN_RTS(stg_sel_0_upd_entry);
184 EXTFUN_RTS(stg_sel_1_upd_entry);
185 EXTFUN_RTS(stg_sel_2_upd_entry);
186 EXTFUN_RTS(stg_sel_3_upd_entry);
187 EXTFUN_RTS(stg_sel_4_upd_entry);
188 EXTFUN_RTS(stg_sel_5_upd_entry);
189 EXTFUN_RTS(stg_sel_6_upd_entry);
190 EXTFUN_RTS(stg_sel_7_upd_entry);
191 EXTFUN_RTS(stg_sel_8_upd_entry);
192 EXTFUN_RTS(stg_sel_8_upd_entry);
193 EXTFUN_RTS(stg_sel_9_upd_entry);
194 EXTFUN_RTS(stg_sel_10_upd_entry);
195 EXTFUN_RTS(stg_sel_11_upd_entry);
196 EXTFUN_RTS(stg_sel_12_upd_entry);
197 EXTFUN_RTS(stg_sel_13_upd_entry);
198 EXTFUN_RTS(stg_sel_14_upd_entry);
199 EXTFUN_RTS(stg_sel_15_upd_entry);
200
201 EXTFUN_RTS(stg_sel_0_noupd_entry);
202 EXTFUN_RTS(stg_sel_1_noupd_entry);
203 EXTFUN_RTS(stg_sel_2_noupd_entry);
204 EXTFUN_RTS(stg_sel_3_noupd_entry);
205 EXTFUN_RTS(stg_sel_4_noupd_entry);
206 EXTFUN_RTS(stg_sel_5_noupd_entry);
207 EXTFUN_RTS(stg_sel_6_noupd_entry);
208 EXTFUN_RTS(stg_sel_7_noupd_entry);
209 EXTFUN_RTS(stg_sel_8_noupd_entry);
210 EXTFUN_RTS(stg_sel_9_noupd_entry);
211 EXTFUN_RTS(stg_sel_10_noupd_entry);
212 EXTFUN_RTS(stg_sel_11_noupd_entry);
213 EXTFUN_RTS(stg_sel_12_noupd_entry);
214 EXTFUN_RTS(stg_sel_13_noupd_entry);
215 EXTFUN_RTS(stg_sel_14_noupd_entry);
216 EXTFUN_RTS(stg_sel_15_noupd_entry);
217
218 /* standard ap thunks */
219
220 EXTINFO_RTS stg_ap_1_upd_info;
221 EXTINFO_RTS stg_ap_2_upd_info;
222 EXTINFO_RTS stg_ap_3_upd_info;
223 EXTINFO_RTS stg_ap_4_upd_info;
224 EXTINFO_RTS stg_ap_5_upd_info;
225 EXTINFO_RTS stg_ap_6_upd_info;
226 EXTINFO_RTS stg_ap_7_upd_info;
227 EXTINFO_RTS stg_ap_8_upd_info;
228