diff options
author | Geoff Keating <geoffk@cygnus.com> | 1999-12-30 19:44:13 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 1999-12-30 19:44:13 +0000 |
commit | 7189a4b01436b1d131ed1e968e6c3b89a4b5d8c4 (patch) | |
tree | 3de821afebf1959eed52df3f8f08652a0b875942 /gcc/f/ste.c | |
parent | 0deeec4e126bac98d710441418fb925406f1dfe6 (diff) | |
download | gcc-7189a4b01436b1d131ed1e968e6c3b89a4b5d8c4.zip gcc-7189a4b01436b1d131ed1e968e6c3b89a4b5d8c4.tar.gz gcc-7189a4b01436b1d131ed1e968e6c3b89a4b5d8c4.tar.bz2 |
Make the Fortran front-end use garbage collection:
* com.c (ffecom_init_0): Make double_ftype_double,
float_ftype_float, ldouble_ftype_ldouble,
ffecom_tree_ptr_to_fun_type_void local.
(tracker_head): New static variable.
(mark_tracker_head): New, marker procedure for tracker_head.
(ffecom_save_tree_forever): New procedure.
(ffecom_init_zero_): Remove obstack use.
(ffecom_make_gfrt_): Remove obstack use.
(ffecom_sym_transform_): Remove obstack use, save appropriate trees.
(ffecom_transform_common_): Remove obstack use, save appropriate
trees.
(ffecom_type_namelist_): Remove obstack use, save appropriate
trees.
(ffecom_type_vardesc_): Remove obstack use, save appropriate trees.
(ffecom_lookup_label): Remove obstack use, save appropriate trees.
(duplicate_decls): Remove obstack use.
(finish_function): push & pop ggc context around
rest_of_compilation when building nested function.
(mark_binding_level): New function.
(init_decl_processing): Mark all the GC roots.
(ggc_p): Set to 1.
(lang_mark_tree): New function.
(lang_mark_false_label_stack): New trivial function.
* com.h (ffecom_save_tree_forever): Declare as external.
* lex.c (ffelex_hash_): Use GC to allocate the filename string
even when ffelex_kludge_flag_.
* ste.c (ffeste_io_ialist_): Register a static root.
(ffeste_io_inlist_): Likewise.
(ffeste_io_icilist_): Likewise.
(ffeste_io_cllist_): Likewise.
(ffeste_io_cilist_): Likewise.
(ffeste_io_olist_): Likewise.
* Makefile.in (OBJS): Don't use ggc-callbacks.o.
(OBJDEPS): Likewise.
(GGC_H): New variable.
Update dependencies.
* where.c (ffewhere_head): New global.
(mark_ffewhere_head): New marker procedure for ffewhere_head.
(ffewhere_file_kill): Use GC to do memory management.
(ffewhere_file_new): Use GC to do memory management.
* ggc.j: New file.
From-SVN: r31142
Diffstat (limited to 'gcc/f/ste.c')
-rw-r--r-- | gcc/f/ste.c | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/gcc/f/ste.c b/gcc/f/ste.c index 0446daa..6db4d48 100644 --- a/gcc/f/ste.c +++ b/gcc/f/ste.c @@ -35,6 +35,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #if FFECOM_targetCURRENT == FFECOM_targetGCC #include "rtl.j" #include "toplev.j" +#include "ggc.j" #endif #include "ste.h" @@ -1218,9 +1219,6 @@ ffeste_io_ialist_ (bool have_err, { tree ref; - push_obstacks_nochange (); - end_temporary_allocation (); - ref = make_node (RECORD_TYPE); errfield = ffecom_decl_field (ref, NULL_TREE, "err", @@ -1231,8 +1229,7 @@ ffeste_io_ialist_ (bool have_err, TYPE_FIELDS (ref) = errfield; layout_type (ref); - resume_temporary_allocation (); - pop_obstacks (); + ggc_add_tree_root (&f2c_alist_struct, 1); f2c_alist_struct = ref; } @@ -1355,9 +1352,6 @@ ffeste_io_cilist_ (bool have_err, { tree ref; - push_obstacks_nochange (); - end_temporary_allocation (); - ref = make_node (RECORD_TYPE); errfield = ffecom_decl_field (ref, NULL_TREE, "err", @@ -1374,8 +1368,7 @@ ffeste_io_cilist_ (bool have_err, TYPE_FIELDS (ref) = errfield; layout_type (ref); - resume_temporary_allocation (); - pop_obstacks (); + ggc_add_tree_root (&f2c_cilist_struct, 1); f2c_cilist_struct = ref; } @@ -1586,9 +1579,6 @@ ffeste_io_cllist_ (bool have_err, { tree ref; - push_obstacks_nochange (); - end_temporary_allocation (); - ref = make_node (RECORD_TYPE); errfield = ffecom_decl_field (ref, NULL_TREE, "err", @@ -1601,8 +1591,7 @@ ffeste_io_cllist_ (bool have_err, TYPE_FIELDS (ref) = errfield; layout_type (ref); - resume_temporary_allocation (); - pop_obstacks (); + ggc_add_tree_root (&f2c_close_struct, 1); f2c_close_struct = ref; } @@ -1713,9 +1702,6 @@ ffeste_io_icilist_ (bool have_err, { tree ref; - push_obstacks_nochange (); - end_temporary_allocation (); - ref = make_node (RECORD_TYPE); errfield = ffecom_decl_field (ref, NULL_TREE, "err", @@ -1734,8 +1720,7 @@ ffeste_io_icilist_ (bool have_err, TYPE_FIELDS (ref) = errfield; layout_type (ref); - resume_temporary_allocation (); - pop_obstacks (); + ggc_add_tree_root (&f2c_icilist_struct, 1); f2c_icilist_struct = ref; } @@ -1976,9 +1961,6 @@ ffeste_io_inlist_ (bool have_err, { tree ref; - push_obstacks_nochange (); - end_temporary_allocation (); - ref = make_node (RECORD_TYPE); errfield = ffecom_decl_field (ref, NULL_TREE, "err", @@ -2041,8 +2023,7 @@ ffeste_io_inlist_ (bool have_err, TYPE_FIELDS (ref) = errfield; layout_type (ref); - resume_temporary_allocation (); - pop_obstacks (); + ggc_add_tree_root (&f2c_inquire_struct, 1); f2c_inquire_struct = ref; } @@ -2229,9 +2210,6 @@ ffeste_io_olist_ (bool have_err, { tree ref; - push_obstacks_nochange (); - end_temporary_allocation (); - ref = make_node (RECORD_TYPE); errfield = ffecom_decl_field (ref, NULL_TREE, "err", @@ -2256,8 +2234,7 @@ ffeste_io_olist_ (bool have_err, TYPE_FIELDS (ref) = errfield; layout_type (ref); - resume_temporary_allocation (); - pop_obstacks (); + ggc_add_tree_root (&f2c_open_struct, 1); f2c_open_struct = ref; } |