aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2000-11-17 17:31:13 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-11-17 17:31:13 +0000
commita8a05998deca5cf6fac99e9a9b6e8343ea3c1b3f (patch)
tree28ab3f3c8eaffc74f74093a91fbefd178d3d02b5 /gcc/cp
parent9e7d5ee8095d41ef744b875de504a22b46f33fb8 (diff)
downloadgcc-a8a05998deca5cf6fac99e9a9b6e8343ea3c1b3f.zip
gcc-a8a05998deca5cf6fac99e9a9b6e8343ea3c1b3f.tar.gz
gcc-a8a05998deca5cf6fac99e9a9b6e8343ea3c1b3f.tar.bz2
ggc.h: Delete ggc_add_string_root and ggc_mark_string.
* ggc.h: Delete ggc_add_string_root and ggc_mark_string. Add digit_vector and digit_string. * stringpool.c (digit_vector): New. (ggc_alloc_string): Use digit_string. * stmt.c (digit_strings): Delete. (init_stmt): Do not initialize digit_strings. (expand_asm_operands): Use ggc.h's digit_string macro. * toplev.c (mark_file_stack): Delete. (compile_file): Don't call init_tree_codes. (main): No need to make the file stack a GC root. * tree.c (init_tree_codes): Delete. * tree.h (init_tree_codes): Delete. * c-lex.c: Don't include ggc.h. (mark_splay_tree_node, mark_splay_tree): Delete. (init_c_lex): No need to ggc_strdup string constant. Don't add file_info_tree to GGC roots. (cb_enter_file, cb_rename_file): No need to ggc_strdup ip->nominal_fname. * Makefile.in (c-lex.o): No longer depends on $(GGC_H). * dbxout.c (dbxout_init), dwarf2out.c (dwarf2out_line), ggc-common.c (ggc_mark_rtx_children, ggc_mark_trees), varasm.c (mark_const_hash_entry, mark_pool_constant, init_varasm_once), xcoffout.c (xcoffout_source_file), i386.c (load_pic_register): Delete call(s) to ggc_add_string_root and/or ggc_mark_string. * except.c (create_rethrow_ref), profile.c (init_edge_profiler), toplev.c (compile_file), varasm.c (named_section, assemble_static_space, assemble_trampoline_template, output_constant_def, force_const_mem), i386.c (load_pic_register), ia64.c (ia64_encode_section_info), rs6000.c (rs6000_emit_load_toc_table, create_TOC_reference, rs6000_emit_prologue, rs6000_emit_epilogue), rs6000.md (load_toc_aix_si, load_toc_aix_di): Change ggc_alloc_string (var, -1) to ggc_strdup (var). * profile.c (output_func_start_profiler), tree.c (make_node), i386.c (load_pic_register): No need to ggc_strdup string constant. cp: * lex.c (mark_impl_file_chain): Delete. (init_parse): Remove call to ggc_add_string_root. No need to ggc_strdup a string constant. Do not add impl_file_chain to GC roots. (handle_pragma_implementation): No need to ggc_strdup main_filename. f: * lex.c (ffelex_hash_): Change ggc_alloc_string (var, -1) to ggc_strdup (var). java: * parse.y (goal): Remove call to ggc_add_string_root. From-SVN: r37522
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog12
-rw-r--r--gcc/cp/lex.c33
2 files changed, 12 insertions, 33 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 63f97f4..54d4237 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
+
+ * lex.c (mark_impl_file_chain): Delete.
+ (init_parse): Remove call to ggc_add_string_root. No need to
+ ggc_strdup a string constant. Do not add impl_file_chain to GC
+ roots.
+ (handle_pragma_implementation): No need to ggc_strdup main_filename.
+
2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
@@ -101,7 +109,7 @@
(cp_dump_tree): New function.
* pt.c (add_maybe_template): Remove.
* typeck.c (strip_array_types): Likewise.
-
+
2000-11-07 Eric Christopher <echristo@redhat.com>
* decl.c (init_decl_processing): Change definition of
@@ -631,7 +639,7 @@ Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
- * ir.texi: Add more documentation.
+ * ir.texi: Add more documentation.
2000-09-11 Mark Mitchell <mark@codesourcery.com>
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index d1511f6..df5dc94 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -55,7 +55,6 @@ static int interface_strcmp PARAMS ((const char *));
static int *init_cpp_parse PARAMS ((void));
static void init_reswords PARAMS ((void));
static void init_cp_pragma PARAMS ((void));
-static void mark_impl_file_chain PARAMS ((PTR));
static tree parse_strconst_pragma PARAMS ((const char *, int));
static void handle_pragma_vtable PARAMS ((cpp_reader *));
@@ -137,11 +136,6 @@ struct impl_files
static struct impl_files *impl_file_chain;
-/* The string used to represent the filename of internally generated
- tree nodes. The variable, which is dynamically allocated, should
- be used; the macro is only used to initialize it. */
-static const char *internal_filename;
-#define INTERNAL_FILENAME ("<internal>")
/* Return something to represent absolute declarators containing a *.
TARGET is the absolute declarator that the * contains.
@@ -708,9 +702,7 @@ init_parse (filename)
set_identifier_size (sizeof (struct lang_identifier));
decl_printable_name = lang_printable_name;
- internal_filename = ggc_alloc_string (INTERNAL_FILENAME,
- sizeof (INTERNAL_FILENAME));
- input_filename = internal_filename;
+ input_filename = "<internal>";
init_reswords ();
init_pragma ();
@@ -764,10 +756,6 @@ init_parse (filename)
token_count = init_cpp_parse ();
interface_unknown = 1;
- ggc_add_string_root (&internal_filename, 1);
- ggc_add_root (&impl_file_chain, 1, sizeof (impl_file_chain),
- mark_impl_file_chain);
-
return init_c_lex (filename);
}
@@ -953,23 +941,6 @@ set_yydebug (value)
#endif
}
-
-/* Mark ARG (which is really a struct impl_files **) for GC. */
-
-static void
-mark_impl_file_chain (arg)
- void *arg;
-{
- struct impl_files *ifs;
-
- ifs = *(struct impl_files **) arg;
- while (ifs)
- {
- ggc_mark_string (ifs->filename);
- ifs = ifs->next;
- }
-}
-
/* Helper function to load global variables with interface
information. */
@@ -1219,7 +1190,7 @@ handle_pragma_implementation (dfile)
if (ifiles == 0)
{
ifiles = (struct impl_files*) xmalloc (sizeof (struct impl_files));
- ifiles->filename = ggc_alloc_string (main_filename, -1);
+ ifiles->filename = main_filename;
ifiles->next = impl_file_chain;
impl_file_chain = ifiles;
}