]>
Commit | Line | Data |
---|---|---|
0a25f1f5 RH |
1 | /* Garbage collection for the GNU compiler. |
2 | Copyright (C) 1998 Free Software Foundation, Inc. | |
3 | ||
4 | This file is part of GNU CC. | |
5 | ||
6 | GNU CC is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2, or (at your option) | |
9 | any later version. | |
10 | ||
11 | GNU CC is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with GNU CC; see the file COPYING. If not, write to | |
18 | the Free Software Foundation, 59 Temple Place - Suite 330, | |
19 | Boston, MA 02111-1307, USA. */ | |
20 | ||
21 | #include "gansidecl.h" | |
22 | ||
23 | /* Symbols are marked with `ggc' for `gcc gc' so as not to interfere with | |
24 | an external gc library that might be linked in. */ | |
25 | ||
26 | /* Startup */ | |
27 | ||
28 | extern void init_ggc PROTO ((void)); | |
29 | ||
30 | /* Allocation. */ | |
31 | ||
32 | struct rtx_def *ggc_alloc_rtx PROTO ((int nslots)); | |
33 | struct rtvec_def *ggc_alloc_rtvec PROTO ((int nelt)); | |
34 | union tree_node *ggc_alloc_tree PROTO ((int length)); | |
35 | char *ggc_alloc_string PROTO ((const char *contents, int length)); | |
36 | ||
37 | /* Invoke the collector. This is really just a hint, but in the case of | |
38 | the simple collector, the only time it will happen. */ | |
39 | ||
40 | void ggc_collect PROTO ((void)); | |
41 | ||
42 | /* Manipulate global roots that are needed between calls to gc. */ | |
43 | void ggc_add_root PROTO ((void *base, int nelt, int size, | |
44 | void (*)(void *))); | |
45 | void ggc_add_rtx_root PROTO ((struct rtx_def **, int nelt)); | |
46 | void ggc_add_tree_root PROTO ((union tree_node **, int nelt)); | |
47 | void ggc_del_root PROTO ((void *base)); | |
48 | ||
49 | /* Mark nodes from the gc_add_root callback. */ | |
50 | void ggc_mark_rtx PROTO ((struct rtx_def *)); | |
51 | void ggc_mark_rtvec PROTO ((struct rtvec_def *)); | |
52 | void ggc_mark_tree PROTO ((union tree_node *)); | |
53 | void ggc_mark_string PROTO ((char *)); | |
54 | ||
55 | /* Callbacks to the languages. */ | |
56 | ||
57 | /* This is the language's opportunity to mark nodes held through | |
58 | the lang_specific hooks in the tree. */ | |
59 | void lang_mark_tree PROTO ((union tree_node *)); | |
60 | ||
61 | /* And similarly to free that data when the tree node is released. */ | |
62 | void lang_cleanup_tree PROTO ((union tree_node *)); | |
63 | ||
64 | /* Mark functions for various structs scattered about. */ | |
65 | ||
66 | void mark_temp_slot PROTO ((void *)); | |
67 | void mark_function_chain PROTO ((void *)); | |
68 | void mark_eh_state PROTO ((void *)); | |
69 | void mark_stmt_state PROTO ((void *)); | |
70 | void mark_emit_state PROTO ((void *)); | |
71 | void mark_varasm_state PROTO ((void *)); | |
72 | void mark_optab PROTO ((void *)); |