]> gcc.gnu.org Git - gcc.git/blame - gcc/ggc.h
Makefile.in (GGC, GGC_LIB): New.
[gcc.git] / gcc / ggc.h
CommitLineData
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
28extern void init_ggc PROTO ((void));
29
30/* Allocation. */
31
32struct rtx_def *ggc_alloc_rtx PROTO ((int nslots));
33struct rtvec_def *ggc_alloc_rtvec PROTO ((int nelt));
34union tree_node *ggc_alloc_tree PROTO ((int length));
35char *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
40void ggc_collect PROTO ((void));
41
42/* Manipulate global roots that are needed between calls to gc. */
43void ggc_add_root PROTO ((void *base, int nelt, int size,
44 void (*)(void *)));
45void ggc_add_rtx_root PROTO ((struct rtx_def **, int nelt));
46void ggc_add_tree_root PROTO ((union tree_node **, int nelt));
47void ggc_del_root PROTO ((void *base));
48
49/* Mark nodes from the gc_add_root callback. */
50void ggc_mark_rtx PROTO ((struct rtx_def *));
51void ggc_mark_rtvec PROTO ((struct rtvec_def *));
52void ggc_mark_tree PROTO ((union tree_node *));
53void 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. */
59void lang_mark_tree PROTO ((union tree_node *));
60
61/* And similarly to free that data when the tree node is released. */
62void lang_cleanup_tree PROTO ((union tree_node *));
63
64/* Mark functions for various structs scattered about. */
65
66void mark_temp_slot PROTO ((void *));
67void mark_function_chain PROTO ((void *));
68void mark_eh_state PROTO ((void *));
69void mark_stmt_state PROTO ((void *));
70void mark_emit_state PROTO ((void *));
71void mark_varasm_state PROTO ((void *));
72void mark_optab PROTO ((void *));
This page took 0.030009 seconds and 5 git commands to generate.