diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-17 17:31:13 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-17 17:31:13 +0000 |
commit | ec6cb94af9fcfa7d281b5234ad5e1c31000c10f3 (patch) | |
tree | 28ab3f3c8eaffc74f74093a91fbefd178d3d02b5 /gcc/c-lex.c | |
parent | d21ec08dec45555d58f207a3776121c8e0870282 (diff) | |
download | gcc-ec6cb94af9fcfa7d281b5234ad5e1c31000c10f3.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37522 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r-- | gcc/c-lex.c | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c index 61ff1553cdb..faa8e5957db 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -35,7 +35,6 @@ Boston, MA 02111-1307, USA. */ #include "c-pragma.h" #include "toplev.h" #include "intl.h" -#include "ggc.h" #include "tm_p.h" #include "splay-tree.h" @@ -149,8 +148,6 @@ static tree lex_string PARAMS ((const char *, unsigned int, int)); static tree lex_charconst PARAMS ((const char *, unsigned int, int)); static void update_header_times PARAMS ((const char *)); static int dump_one_header PARAMS ((splay_tree_node, void *)); -static int mark_splay_tree_node PARAMS ((splay_tree_node, void *)); -static void mark_splay_tree PARAMS ((void *)); #if !USE_CPPLIB static int skip_white_space PARAMS ((int)); @@ -177,10 +174,7 @@ init_c_lex (filename) file_info_tree = splay_tree_new ((splay_tree_compare_fn)strcmp, 0, (splay_tree_delete_value_fn)free); - /* Make sure to mark the filenames in the tree for GC. */ - ggc_add_root (&file_info_tree, 1, sizeof (file_info_tree), - mark_splay_tree); - toplevel = get_fileinfo (ggc_strdup ("<top level>")); + toplevel = get_fileinfo ("<top level>"); if (flag_detailed_statistics) { header_time = 0; @@ -698,7 +692,7 @@ cb_enter_file (pfile) if (ip->prev) { lex_lineno = lineno = ip->prev->lineno - 1; - push_srcloc (ggc_alloc_string (ip->nominal_fname, -1), 1); + push_srcloc (ip->nominal_fname, 1); input_file_stack->indent_level = indent_level; debug_start_source_file (ip->nominal_fname); } @@ -769,7 +763,7 @@ cb_rename_file (pfile) cpp_buffer *ip = CPP_BUFFER (pfile); /* Bleah, need a better interface to this. */ const char *flags = cpp_syshdr_flags (pfile, ip); - input_filename = ggc_alloc_string (ip->nominal_fname, -1); + input_filename = ip->nominal_fname; lex_lineno = ip->lineno; in_system_header = (flags[0] != 0); @@ -2550,25 +2544,3 @@ lex_charconst (str, len, wide) return value; } - -/* Mark for GC a node in a splay tree whose keys are strings. */ - -static int -mark_splay_tree_node (n, data) - splay_tree_node n; - void *data ATTRIBUTE_UNUSED; -{ - ggc_mark_string ((char *) n->key); - return 0; -} - -/* Mark for GC a splay tree whose keys are strings. */ - -static void -mark_splay_tree (p) - void *p; -{ - splay_tree st = *(splay_tree *) p; - - splay_tree_foreach (st, mark_splay_tree_node, NULL); -} |