[project @ 2000-01-13 14:33:57 by hwloidl]
[ghc-hetmet.git] / ghc / includes / InfoMacros.h
1 /* ----------------------------------------------------------------------------
2  * $Id: InfoMacros.h,v 1.9 2000/01/13 14:34:00 hwloidl Exp $
3  * 
4  * (c) The GHC Team, 1998-1999
5  *
6  * Macros for building and deconstructing info tables.
7  *
8  * -------------------------------------------------------------------------- */
9
10 #ifndef INFOMACROS_H
11 #define INFOMACROS_H
12
13 #define STD_INFO(type_)                         \
14                 srt : 0,                        \
15                 srt_len : 0,                    \
16                 type : type_
17
18 #define SRT_INFO(type_,srt_,srt_off_,srt_len_)                  \
19                 srt : (StgSRT *)((StgClosure **)srt_+srt_off_), \
20                 srt_len : srt_len_,                             \
21                 type : type_
22
23 #define CONSTR_INFO(type_,tag_)                 \
24                 srt : 0,                        \
25                 srt_len : tag_,                 \
26                 type : type_
27
28 #ifdef USE_MINIINTERPRETER
29 #define INIT_VECTOR {}
30 #else
31 #define INIT_VECTOR
32 #endif
33
34 /*
35   On the GRAN/PAR specific parts of the InfoTables:
36
37   In both GranSim and GUM we use revertible black holes (RBH) when putting
38   an updatable closure into a packet for communication. The entry code for
39   an RBH performs standard blocking (as with any kind of BH). The info
40   table for the RBH resides just before the one for the std info
41   table. (NB: there is one RBH ITBL for every ITBL of an updatable
42   closure.) The @rbh_infoptr@ field in the ITBL points from the std ITBL to
43   the RBH ITBL and vice versa. This is used by the RBH_INFOPTR and
44   REVERT_INFOPTR macros to turn an updatable node into an RBH and vice
45   versa. Note, that the only case where we have to revert the RBH in its
46   original form is when a packet is sent back because of garbage collection
47   on another PE. In the RTS for GdH we will use this reversion mechanism in 
48   order to deal with faults in the system. 
49   ToDo: Check that RBHs are needed for all the info tables below. From a quick
50   check of the macros generated in the libs it seems that all of them are used
51   for generating THUNKs.
52   Possible optimisation: Note that any RBH ITBL is a fixed distance away from 
53   the actual ITBL. We could inline this offset as a constant into the RTS and
54   avoid the rbh_infoptr fields altogether (Jim did that in the old RTS).
55   -- HWL
56 */
57
58
59 /* function/thunk info tables --------------------------------------------- */
60
61 #if defined(GRAN) || defined(PAR)
62
63 #define \
64 INFO_TABLE_SRT(info,                            /* info-table label */  \
65                entry,                           /* entry code label */  \
66                ptrs, nptrs,                     /* closure layout info */\
67                srt_, srt_off_, srt_len_,        /* SRT info */          \
68                type,                            /* closure type */      \
69                info_class, entry_class,         /* C storage classes */ \
70                prof_descr, prof_type)           /* profiling info */    \
71         entry_class(RBH_##entry);                                      \
72         entry_class(entry);                                             \
73         info_class INFO_TBL_CONST StgInfoTable info; \
74         info_class INFO_TBL_CONST StgInfoTable RBH_##info = {           \
75                 layout : { payload : {ptrs,nptrs} },                    \
76                 SRT_INFO(RBH,srt_,srt_off_,srt_len_),                  \
77                 INCLUDE_RBH_INFO(info),                                 \
78                 INIT_ENTRY(RBH_##entry),                           \
79                 INIT_VECTOR                                             \
80         } ; \
81         StgFunPtr  RBH_##entry (void) { JMP_(RBH_entry); } ;            \
82         info_class INFO_TBL_CONST StgInfoTable info = {                 \
83                 layout : { payload : {ptrs,nptrs} },                    \
84                 SRT_INFO(type,srt_,srt_off_,srt_len_),                  \
85                 INCLUDE_RBH_INFO(RBH_##info),                   \
86                 INIT_ENTRY(entry),                                      \
87                 INIT_VECTOR                                             \
88         }
89
90 #else
91
92 #define \
93 INFO_TABLE_SRT(info,                            /* info-table label */  \
94                entry,                           /* entry code label */  \
95                ptrs, nptrs,                     /* closure layout info */\
96                srt_, srt_off_, srt_len_,        /* SRT info */          \
97                type,                            /* closure type */      \
98                info_class, entry_class,         /* C storage classes */ \
99                prof_descr, prof_type)           /* profiling info */    \
100         entry_class(entry);                                             \
101         info_class INFO_TBL_CONST StgInfoTable info = {                 \
102                 layout : { payload : {ptrs,nptrs} },                    \
103                 SRT_INFO(type,srt_,srt_off_,srt_len_),                  \
104                 INIT_ENTRY(entry),                                      \
105                 INIT_VECTOR                                             \
106         }
107
108 #endif
109
110 /* direct-return address info tables  --------------------------------------*/
111
112 #if defined(GRAN) || defined(PAR)
113
114 #define                                                                 \
115 INFO_TABLE_SRT_BITMAP(info, entry, bitmap_, srt_, srt_off_, srt_len_,   \
116                       type, info_class, entry_class,                    \
117                       prof_descr, prof_type)                            \
118         entry_class(RBH_##entry);                                      \
119         entry_class(entry);                                             \
120         info_class INFO_TBL_CONST StgInfoTable info; \
121         info_class INFO_TBL_CONST StgInfoTable RBH_##info = {           \
122                 layout : { bitmap : (StgWord32)bitmap_ },               \
123                 SRT_INFO(RBH,srt_,srt_off_,srt_len_),                   \
124                 INCLUDE_RBH_INFO(info),                                 \
125                 INIT_ENTRY(RBH_##entry),                                \
126                 INIT_VECTOR                                             \
127         };                                                              \
128         StgFunPtr  RBH_##entry (void) { JMP_(RBH_entry); } ;            \
129         info_class INFO_TBL_CONST StgInfoTable info = {                 \
130                 layout : { bitmap : (StgWord32)bitmap_ },               \
131                 SRT_INFO(type,srt_,srt_off_,srt_len_),                  \
132                 INCLUDE_RBH_INFO(RBH_##info),                           \
133                 INIT_ENTRY(entry),                                      \
134                 INIT_VECTOR                                             \
135         }
136 #else
137
138 #define                                                                 \
139 INFO_TABLE_SRT_BITMAP(info, entry, bitmap_, srt_, srt_off_, srt_len_,   \
140                       type, info_class, entry_class,                    \
141                       prof_descr, prof_type)                            \
142         entry_class(entry);                                             \
143         info_class INFO_TBL_CONST StgInfoTable info = {                 \
144                 layout : { bitmap : (StgWord32)bitmap_ },               \
145                 SRT_INFO(type,srt_,srt_off_,srt_len_),                  \
146                 INIT_ENTRY(entry),                                      \
147                 INIT_VECTOR                                             \
148         }
149 #endif
150
151 /* info-table without an SRT -----------------------------------------------*/
152
153 #if defined(GRAN) || defined(PAR)
154
155 #define                                                 \
156 INFO_TABLE(info, entry, ptrs, nptrs, type, info_class,  \
157            entry_class, prof_descr, prof_type)          \
158         entry_class(RBH_##entry);                                      \
159         entry_class(entry);                                             \
160         info_class INFO_TBL_CONST StgInfoTable info; \
161         info_class INFO_TBL_CONST StgInfoTable RBH_##info = {   \
162                 layout : { payload : {ptrs,nptrs} },    \
163                 STD_INFO(RBH),                          \
164                 INCLUDE_RBH_INFO(info),                 \
165                 INIT_ENTRY(RBH_##entry),                \
166                 INIT_VECTOR                             \
167         };                                              \
168         StgFunPtr  RBH_##entry (void) { JMP_(RBH_entry); } ;            \
169         info_class INFO_TBL_CONST StgInfoTable info = { \
170                 layout : { payload : {ptrs,nptrs} },    \
171                 STD_INFO(type),                         \
172                 INCLUDE_RBH_INFO(RBH_##info),                           \
173                 INIT_ENTRY(entry),                      \
174                 INIT_VECTOR                             \
175         }
176
177 #else
178
179 #define                                                 \
180 INFO_TABLE(info, entry, ptrs, nptrs, type, info_class,  \
181            entry_class, prof_descr, prof_type)          \
182         entry_class(entry);                             \
183         info_class INFO_TBL_CONST StgInfoTable info = { \
184                 layout : { payload : {ptrs,nptrs} },    \
185                 STD_INFO(type),                         \
186                 INIT_ENTRY(entry),                      \
187                 INIT_VECTOR                             \
188         }
189
190 #endif
191
192 /* special selector-thunk info table ---------------------------------------*/
193
194 #if defined(GRAN) || defined(PAR)
195
196 #define                                                 \
197 INFO_TABLE_SELECTOR(info, entry, offset, info_class,    \
198                     entry_class, prof_descr, prof_type) \
199         entry_class(RBH_##entry);                                      \
200         entry_class(entry);                                             \
201         info_class INFO_TBL_CONST StgInfoTable info; \
202         info_class INFO_TBL_CONST StgInfoTable RBH_##info = {   \
203                 layout : { selector_offset : offset },  \
204                 STD_INFO(RBH),                          \
205                 INCLUDE_RBH_INFO(info),                 \
206                 INIT_ENTRY(RBH_##entry),                \
207                 INIT_VECTOR                             \
208         };                                              \
209         StgFunPtr  RBH_##entry (void) { JMP_(RBH_entry); } ;            \
210         info_class INFO_TBL_CONST StgInfoTable info = { \
211                 layout : { selector_offset : offset },  \
212                 STD_INFO(THUNK_SELECTOR),               \
213                 INCLUDE_RBH_INFO(RBH_##info),           \
214                 INIT_ENTRY(entry),                      \
215                 INIT_VECTOR                             \
216         }
217
218 #else
219
220 #define                                                 \
221 INFO_TABLE_SELECTOR(info, entry, offset, info_class,    \
222                     entry_class, prof_descr, prof_type) \
223         entry_class(entry);                             \
224         info_class INFO_TBL_CONST StgInfoTable info = { \
225                 layout : { selector_offset : offset },  \
226                 STD_INFO(THUNK_SELECTOR),               \
227                 INIT_ENTRY(entry),                      \
228                 INIT_VECTOR                             \
229         }
230
231 #endif
232
233 /* constructor info table --------------------------------------------------*/
234
235 #define \
236 INFO_TABLE_CONSTR(info, entry, ptrs, nptrs, tag_,type_,info_class,      \
237                   entry_class, prof_descr, prof_type)                   \
238         entry_class(entry);                                             \
239         info_class INFO_TBL_CONST StgInfoTable info = {                 \
240                 layout : { payload : {ptrs,nptrs} },                    \
241                 CONSTR_INFO(type_,tag_),                                \
242                 INIT_ENTRY(entry),                                      \
243                 INIT_VECTOR                                             \
244         }
245
246 #define constrTag(con) (get_itbl(con)->srt_len)
247
248 /* return-vectors ----------------------------------------------------------*/
249
250 /* vectored-return info tables have the vector slammed up against the
251  * start of the info table.
252  *
253  * A vectored-return address always has an SRT and a bitmap-style
254  * layout field, so we only need one macro for these.
255  */
256
257 #ifdef TABLES_NEXT_TO_CODE
258
259 typedef struct {
260   StgFunPtr vec[2];
261   StgInfoTable i;
262 } vec_info_2;
263
264 typedef struct {
265   StgFunPtr vec[3];
266   StgInfoTable i;
267 } vec_info_3;
268
269 typedef struct {
270   StgFunPtr vec[4];
271   StgInfoTable i;
272 } vec_info_4;
273
274 typedef struct {
275   StgFunPtr vec[5];
276   StgInfoTable i;
277 } vec_info_5;
278
279 typedef struct {
280   StgFunPtr vec[6];
281   StgInfoTable i;
282 } vec_info_6;
283
284 typedef struct {
285   StgFunPtr vec[7];
286   StgInfoTable i;
287 } vec_info_7;
288
289 typedef struct {
290   StgFunPtr vec[8];
291   StgInfoTable i;
292 } vec_info_8;
293
294 #define VEC_INFO_2(info,bitmap_,srt_,srt_off_,srt_len_,         \
295                    type, info_class,                            \
296                    alt_1, alt_2)                                \
297         info_class INFO_TBL_CONST vec_info_2 info = {           \
298                 { alt_2, alt_1 },                               \
299                 i : {                                           \
300                    layout : { bitmap : (StgWord32)bitmap_ },    \
301                    SRT_INFO(type,srt_,srt_off_,srt_len_)        \
302                 }                                               \
303         }
304
305 #define VEC_INFO_3(info,bitmap_,srt_,srt_off_,srt_len_,         \
306                    type, info_class,                            \
307                    alt_1, alt_2, alt_3                          \
308                   )                                             \
309         info_class INFO_TBL_CONST vec_info_3 info = {           \
310                 { alt_3, alt_2, alt_1 },                        \
311                 i : {                                           \
312                    layout : { bitmap : (StgWord32)bitmap_ },    \
313                    SRT_INFO(type,srt_,srt_off_,srt_len_)        \
314                 }                                               \
315         }
316
317 #define VEC_INFO_4(info,bitmap_,srt_,srt_off_,srt_len_,         \
318                    type, info_class,                            \
319                    alt_1, alt_2, alt_3, alt_4                   \
320                   )                                             \
321         info_class INFO_TBL_CONST vec_info_4 info = {           \
322                 { alt_4, alt_3, alt_2, alt_1 },                 \
323                 i : {                                           \
324                    layout : { bitmap : (StgWord32)bitmap_ },    \
325                    SRT_INFO(type,srt_,srt_off_,srt_len_)        \
326                 }                                               \
327         }
328
329 #define VEC_INFO_5(info,bitmap_,srt_,srt_off_,srt_len_,         \
330                    type, info_class,                            \
331                    alt_1, alt_2, alt_3, alt_4,                  \
332                    alt_5                                        \
333                   )                                             \
334         info_class INFO_TBL_CONST vec_info_5 info = {           \
335                 { alt_5, alt_4, alt_3, alt_2,                   \
336                   alt_1 },                                      \
337                 i : {                                           \
338                    layout : { bitmap : (StgWord32)bitmap_ },    \
339                    SRT_INFO(type,srt_,srt_off_,srt_len_)        \
340                 }                                               \
341         }
342
343 #define VEC_INFO_6(info,bitmap_,srt_,srt_off_,srt_len_,         \
344                    type, info_class,                            \
345                    alt_1, alt_2, alt_3, alt_4,                  \
346                    alt_5, alt_6                                 \
347                   )                                             \
348         info_class INFO_TBL_CONST vec_info_6 info = {           \
349                 { alt_6, alt_5, alt_4, alt_3,                   \
350                   alt_2, alt_1 },                               \
351                 i : {                                           \
352                    layout : { bitmap : (StgWord32)bitmap_ },    \
353                    SRT_INFO(type,srt_,srt_off_,srt_len_)        \
354                 }                                               \
355         }
356
357 #define VEC_INFO_7(info,bitmap_,srt_,srt_off_,srt_len_,         \
358                    type, info_class,                            \
359                    alt_1, alt_2, alt_3, alt_4,                  \
360                    alt_5, alt_6, alt_7                          \
361                   )                                             \
362         info_class INFO_TBL_CONST vec_info_7 info = {           \
363                 { alt_7, alt_6, alt_5, alt_4,                   \
364                   alt_3, alt_2, alt_1 },                        \
365                 i : {                                           \
366                    layout : { bitmap : (StgWord32)bitmap_ },    \
367                    SRT_INFO(type,srt_,srt_off_,srt_len_)        \
368                 }                                               \
369         }
370
371 #define VEC_INFO_8(info,bitmap_,srt_,srt_off_,srt_len_,         \
372                    type, info_class,                            \
373                    alt_1, alt_2, alt_3, alt_4,                  \
374                    alt_5, alt_6, alt_7, alt_8                   \
375                   )                                             \
376         info_class INFO_TBL_CONST vec_info_8 info = {           \
377                 { alt_8, alt_7, alt_6, alt_5,                   \
378                   alt_4, alt_3, alt_2, alt_1 },                 \
379                 i : {                                           \
380                    layout : { bitmap : (StgWord32)bitmap_ },    \
381                    SRT_INFO(type,srt_,srt_off_,srt_len_)        \
382                 }                                               \
383         }
384
385
386 #else
387
388 /* We have to define these structure to work around a bug in gcc: if we
389  * try to initialise the vector directly (it's defined as a zero-length
390  * array tacked on the end of the info table structor), then gcc silently
391  * throws away our vector table sometimes.
392  */
393
394 typedef struct {
395   StgInfoTable i;
396   StgFunPtr vec[2];
397 } vec_info_2;
398
399 typedef struct {
400   StgInfoTable i;
401   StgFunPtr vec[3];
402 } vec_info_3;
403
404 typedef struct {
405   StgInfoTable i;
406   StgFunPtr vec[4];
407 } vec_info_4;
408
409 typedef struct {
410   StgInfoTable i;
411   StgFunPtr vec[5];
412 } vec_info_5;
413
414 typedef struct {
415   StgInfoTable i;
416   StgFunPtr vec[6];
417 } vec_info_6;
418
419 typedef struct {
420   StgInfoTable i;
421   StgFunPtr vec[7];
422 } vec_info_7;
423
424 typedef struct {
425   StgInfoTable i;
426   StgFunPtr vec[8];
427 } vec_info_8;
428
429 #define VEC_INFO_2(info,bitmap_,srt_,srt_off_,srt_len_,         \
430                    type, info_class,                            \
431                    alt_1, alt_2)                                \
432         info_class INFO_TBL_CONST vec_info_2 info = {           \
433                 i : { layout : { bitmap : (StgWord32)bitmap_ }, \
434                       SRT_INFO(type,srt_,srt_off_,srt_len_),    \
435                       INIT_ENTRY(NULL),                         \
436                 },                                              \
437                 vec : { alt_1, alt_2 }                          \
438         }
439
440 #define VEC_INFO_3(info,bitmap_,srt_,srt_off_,srt_len_,         \
441                    type, info_class,                            \
442                    alt_1, alt_2, alt_3                          \
443                   )                                             \
444         info_class INFO_TBL_CONST vec_info_3 info = {           \
445                 i : { layout : { bitmap : (StgWord32)bitmap_ }, \
446                       SRT_INFO(type,srt_,srt_off_,srt_len_),    \
447                       INIT_ENTRY(NULL),                         \
448                 },                                              \
449                 vec : { alt_1, alt_2, alt_3 }                   \
450         }
451
452 #define VEC_INFO_4(info,bitmap_,srt_,srt_off_,srt_len_,         \
453                    type, info_class,                            \
454                    alt_1, alt_2, alt_3, alt_4                   \
455                   )                                             \
456         info_class INFO_TBL_CONST vec_info_4 info = {           \
457                 i : { layout : { bitmap : (StgWord32)bitmap_ }, \
458                       SRT_INFO(type,srt_,srt_off_,srt_len_),    \
459                       INIT_ENTRY(NULL),                         \
460                 },                                              \
461                 vec : { alt_1, alt_2, alt_3, alt_4 }            \
462         }
463
464 #define VEC_INFO_5(info,bitmap_,srt_,srt_off_,srt_len_,         \
465                    type, info_class,                            \
466                    alt_1, alt_2, alt_3, alt_4,                  \
467                    alt_5                                        \
468                   )                                             \
469         info_class INFO_TBL_CONST vec_info_5 info = {           \
470                 i : { layout : { bitmap : (StgWord32)bitmap_ }, \
471                       SRT_INFO(type,srt_,srt_off_,srt_len_),    \
472                       INIT_ENTRY(NULL),                         \
473                 },                                              \
474                 vec : { alt_1, alt_2, alt_3, alt_4,             \
475                         alt_5 }                                 \
476         }
477
478 #define VEC_INFO_6(info,bitmap_,srt_,srt_off_,srt_len_,         \
479                    type, info_class,                            \
480                    alt_1, alt_2, alt_3, alt_4,                  \
481                    alt_5, alt_6                                 \
482                   )                                             \
483         info_class INFO_TBL_CONST vec_info_6 info = {           \
484                 i : { layout : { bitmap : (StgWord32)bitmap_ }, \
485                       SRT_INFO(type,srt_,srt_off_,srt_len_),    \
486                       INIT_ENTRY(NULL),                         \
487                 },                                              \
488                 vec : { alt_1, alt_2, alt_3, alt_4,             \
489                         alt_5, alt_6 }                          \
490         }
491
492 #define VEC_INFO_7(info,bitmap_,srt_,srt_off_,srt_len_,         \
493                    type, info_class,                            \
494                    alt_1, alt_2, alt_3, alt_4,                  \
495                    alt_5, alt_6, alt_7                          \
496                   )                                             \
497         info_class INFO_TBL_CONST vec_info_7 info = {           \
498                 i : { layout : { bitmap : (StgWord32)bitmap_ }, \
499                       SRT_INFO(type,srt_,srt_off_,srt_len_),    \
500                       INIT_ENTRY(NULL),                         \
501                 },                                              \
502                 vec : { alt_1, alt_2, alt_3, alt_4,             \
503                         alt_5, alt_6, alt_7 }                   \
504         }
505
506 #define VEC_INFO_8(info,bitmap_,srt_,srt_off_,srt_len_,         \
507                    type, info_class,                            \
508                    alt_1, alt_2, alt_3, alt_4,                  \
509                    alt_5, alt_6, alt_7, alt_8                   \
510                   )                                             \
511         info_class INFO_TBL_CONST vec_info_8 info = {           \
512                 i : { layout : { bitmap : (StgWord32)bitmap_ }, \
513                       SRT_INFO(type,srt_,srt_off_,srt_len_),    \
514                       INIT_ENTRY(NULL),                         \
515                 },                                              \
516                 vec : { alt_1, alt_2, alt_3, alt_4,             \
517                         alt_5, alt_6, alt_7, alt_8 }            \
518         }
519
520 #endif /* TABLES_NEXT_TO_CODE */
521
522 /* For polymorphic activation records, we need both a direct return
523  * address and a return vector:
524  */
525
526 typedef vec_info_8 StgPolyInfoTable;
527
528 #ifndef TABLES_NEXT_TO_CODE
529
530 #define VEC_POLY_INFO_TABLE(nm, bitmap_,                        \
531                            srt_, srt_off_, srt_len_,            \
532                            type, info_class, entry_class        \
533                            )                                    \
534   info_class INFO_TBL_CONST vec_info_8 nm##_info = {            \
535                 i : { layout : { bitmap : (StgWord32)bitmap_ }, \
536                       SRT_INFO(type,srt_,srt_off_,srt_len_),    \
537                       INIT_ENTRY(nm##_entry),                   \
538                       INIT_VECTOR                               \
539                 },                                              \
540                 vec : {                                         \
541                         (F_) nm##_0_entry,                      \
542                         (F_) nm##_1_entry,                      \
543                         (F_) nm##_2_entry,                      \
544                         (F_) nm##_3_entry,                      \
545                         (F_) nm##_4_entry,                      \
546                         (F_) nm##_5_entry,                      \
547                         (F_) nm##_6_entry,                      \
548                         (F_) nm##_7_entry                       \
549                 }                                               \
550             }
551 #else
552
553 #define VEC_POLY_INFO_TABLE(nm, bitmap_,                        \
554                            srt_, srt_off_, srt_len_,            \
555                            type, info_class, entry_class        \
556                            )                                    \
557         info_class INFO_TBL_CONST vec_info_8 nm##_info = {      \
558                 {                                               \
559                         (F_) nm##_7_entry,                      \
560                         (F_) nm##_6_entry,                      \
561                         (F_) nm##_5_entry,                      \
562                         (F_) nm##_4_entry,                      \
563                         (F_) nm##_3_entry,                      \
564                         (F_) nm##_2_entry,                      \
565                         (F_) nm##_1_entry,                      \
566                         (F_) nm##_0_entry                       \
567                 },                                              \
568                 i : {                                           \
569                    layout : { bitmap : (StgWord32)bitmap_ },    \
570                    SRT_INFO(type,srt_,srt_off_,srt_len_),       \
571                    INIT_ENTRY(nm##_entry)                       \
572                 }                                               \
573         }
574
575 #endif
576
577 #define SRT(lbl) \
578   static const StgSRT lbl = {
579
580 #define BITMAP(lbl,size) \
581   static const StgLargeBitmap lbl = { size, {
582
583 /* DLL_SRT_ENTRY is used on the Win32 side when filling initialising
584    an entry in an SRT table with a reference to a closure that's
585    living in a DLL. See elsewhere for reasons as to why we need
586    to distinguish these kinds of references.
587    (ToDo: fill in a more precise href.)
588 */
589 #ifdef HAVE_WIN32_DLL_SUPPORT
590 #define DLL_SRT_ENTRY(x) ((StgClosure*)(((char*)&DLL_IMPORT_DATA_VAR(x)) + 1))
591 #else
592 #define DLL_SRT_ENTRY(x) no-can-do
593 #endif
594
595 #endif /* INFOMACROS_H */