Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/runtime/gc/blast-out.h
ViewVC logotype

Annotation of /sml/trunk/src/runtime/gc/blast-out.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 249 - (view) (download) (as text)
Original Path: sml/branches/SMLNJ/src/runtime/gc/blast-out.h

1 : monnier 249 /* blast-out.h
2 :     *
3 :     * COPYRIGHT (c) 1993 by AT&T Bell Laboratories.
4 :     *
5 :     */
6 :    
7 :     #ifndef _BLAST_OUT_
8 :     #define _BLAST_OUT_
9 :    
10 :     #ifndef _ADDR_HASH_
11 :     #include "addr-hash.h"
12 :     #endif
13 :    
14 :     #ifndef _C_GLOBALS_TBL_
15 :     #include "c-globals-tbl.h"
16 :     #endif
17 :    
18 :     #ifndef _WRITER_
19 :     #include "writer.h"
20 :     #endif
21 :    
22 :     /* the table of referenced code objects, and embedded literals */
23 :    
24 :     typedef enum {
25 :     EMB_STRING, /* embedded string */
26 :     EMB_REALD, /* embedded real */
27 :     UNUSED_CODE, /* code object with only embedded references */
28 :     USED_CODE /* code object with code references */
29 :     } embobj_kind_t;
30 :    
31 :     typedef struct embobj_info { /* info about an embedded object */
32 :     embobj_kind_t kind;
33 :     struct embobj_info *codeObj; /* points to entry for the code */
34 :     /* object that this literal is */
35 :     /* embedded in. */
36 :     ml_val_t relAddr; /* the relocated address of the literal */
37 :     /* in the blasted heap image. */
38 :     } embobj_info_t;
39 :    
40 :     /* find an embedded object */
41 :     #define FindEmbObj(tbl, addr) \
42 :     ((embobj_info_t *)AddrTblLookup((tbl), (Addr_t)(addr)))
43 :    
44 :    
45 :     typedef struct { /* the result of blasting out an object */
46 :     bool_t error; /* true, if there was an error during the */
47 :     /* blast GC (e.g., unrecognized external obj) */
48 :     bool_t needsRepair; /* true, if the heap needs repair; otherwise */
49 :     /* the collection must be completed. */
50 :     int maxGen; /* the oldest generation included in the blast. */
51 :     export_table_t *exportTbl; /* the table of external objects */
52 :     addr_tbl_t *embobjTbl; /* the table of embedded objects */
53 :     } blast_res_t;
54 :    
55 :     extern blast_res_t BlastGC (ml_state_t *msp, ml_val_t *root, int gen);
56 :     Addr_t BlastGC_AssignLitAddrs (blast_res_t *res, int id, Addr_t offset);
57 :     void BlastGC_BlastLits (writer_t *wr);
58 :     extern void BlastGC_FinishUp (ml_state_t *msp, blast_res_t *res);
59 :    
60 :     #endif /* _BLAST_OUT_ */

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0