Makefile.in (tree.o): Depend on ggc.h.
authorMark Mitchell <mark@codesourcery.com>
Tue, 7 Sep 1999 18:01:53 +0000 (18:01 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 7 Sep 1999 18:01:53 +0000 (18:01 +0000)
* Makefile.in (tree.o): Depend on ggc.h.
* class.c (make_method_vec): Remove.
(free_method_vec): Likewise.
(free_method_vecs): Remove.
(add_method): Don't use them.
* cp-tree.def (PTRMEM_CST): Make it longer.
(TEMPLATE_PARM_INDEX): Make it shorter.
* cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
(template_parm_index): Remove RTL field.
(ptrmem_cst): Add RTL field.
(finish_function): Removed parameter.
(process_next_inline): Change prototype.
(init_cplus_unsave): Rename to init_tree.
(binding_init): Remove.
* decl.c (free_binding_nodes): Remove.
(push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
(pop_binding): Don't use free_binding_nodes.
(free_binding_vecs): Remove.
(store_bindings): Don't use them.
(pop_from_top_level): Likewise.
(lookup_namespace_name): Simplify.
(build_typename_type): Don't use obstack_free.
(unqualified_namespace_lookup): Simplify.
(lookup_name_real): Simplify.
(start_function): Remove comment about leaks.
(finish_function): Removed nested parameter.  Call
expand_end_bindings even when building_stmt_tree.
Call ggc_push_context and ggc_pop_context around
rest_of_compilation, if necessary.
(mark_cp_function_context): Handle a NULL language-context.
(lang_mark_false_label_stack): Fix typo.
(lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
pointer to method types.
(lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
* decl2.c (finish_objects): Adjust call to finish_function.
(finish_static_store_duration_function): Likewise.
(do_nonmember_using_decl): Remove call to binding_init.
* except.c (end_anon_func): Adjust call to finish_function.
* lex.c (mark_impl_file_chain): New function.
(init_parse): Call init_tree, not init_cplus_unsave.
Add GC roots.
(cp_pramga_interface): Use xmalloc, not permalloc.
(cp_pragma_implementation): Likewise.
(begin_definition_of_inclass_inline): Simplify.
(process_next_inline): Adjust prototype.
(do_scoped_id): Don't call binding_init.
(make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
* method.c (emit_thunk): Adjust call to finish_function.
(synthesize_method): Likewise.
* parse.y (%union): Add a new `pi' variant.
(PRE_PARSED_FUNCTION_DECL): Use it.
(fn.defpen): Likewise.
(fndef): Adjust call to finish_function.
* pt.c (instantiate_decl): Likewise.
* rtti.c (syntheisze_tinfo_fn): Likewise.
* semantics.c (expand_body): Likewise.
* tree.c: Include ggc.h.
(mark_list_hash): New function.
(binding_init): Remove.
(init_cplus_unsave): Rename to ...
(init_tree): This.  Add GC roots.

From-SVN: r29173

gcc/cp/ChangeLog
gcc/cp/method.c
gcc/cp/pt.c
gcc/cp/rtti.c
gcc/cp/semantics.c

index 996ee3e4c9fa7d410a6c4e911fcd1e4f519af329..6e0fc826eebee91f32df3cc16b6000b451070487 100644 (file)
        (process_next_inline): Adjust prototype.
        (do_scoped_id): Don't call binding_init.
        (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
-       (emit_thunk): Adjust call to finish_function.
+       * method.c (emit_thunk): Adjust call to finish_function.
        (synthesize_method): Likewise.
        * parse.y (%union): Add a new `pi' variant.
        (PRE_PARSED_FUNCTION_DECL): Use it.
        (fn.defpen): Likewise.
        (fndef): Adjust call to finish_function.
-       (instantiate_decl): Likewise.
-       (rtti.c): Likewise.
-       (semantics.c): Likewise.
+       * pt.c (instantiate_decl): Likewise.
+       * rtti.c (syntheisze_tinfo_fn): Likewise.
+       * semantics.c (expand_body): Likewise.
        * tree.c: Include ggc.h.
        (mark_list_hash): New function.
        (binding_init): Remove.
index cf681e1deca218a7b4c953d609994fb87d04132e..7b74443b05b32af4f512d97e89e94ab464d74a1f 100644 (file)
@@ -2147,7 +2147,7 @@ emit_thunk (thunk_fndecl)
     t = build_call (function, TREE_TYPE (TREE_TYPE (function)), t);
     c_expand_return (t);
 
-    finish_function (lineno, 0, 0);
+    finish_function (lineno, 0);
 
     /* Don't let the backend defer this function.  */
     if (DECL_DEFER_OUTPUT (thunk_fndecl))
@@ -2388,7 +2388,7 @@ synthesize_method (fndecl)
        }
     }
 
-  finish_function (lineno, 0, nested);
+  finish_function (lineno, 0);
 
   extract_interface_info ();
   if (! context)
index 01d4f1f078d4cd43ed503ec2bb25572e71545829..f2487522ca6d1102c5569fe3c3d1e09c79820b86 100644 (file)
@@ -9730,7 +9730,7 @@ instantiate_decl (d)
 
       /* Clean up.  */
       pop_obstacks ();
-      finish_function (lineno, 0, nested);
+      finish_function (lineno, 0);
       expanding_p = saved_expanding_p;
 
       /* Now, generate RTL for the function.  */
index 93947d288c1d84dd71066eff9952c5c3518c0abc..c3ce3305e4b7b4b0d83e8305d56ec435cfcb352d 100644 (file)
@@ -1173,5 +1173,5 @@ synthesize_tinfo_fn (fndecl)
   tmp = build_indirect_ref (tmp, 0);
   c_expand_return (tmp);
   pop_momentary ();
-  finish_function (lineno, 0, 0);
+  finish_function (lineno, 0);
 }
index 5502df344e57b57ea07594d0a53f8e2b4c8a9abd..d6099f38b8e5cbaae23f27ecbc94cecc51f54f66 100644 (file)
@@ -2185,14 +2185,9 @@ expand_body (fn)
      tree fn;
 {
   int saved_expanding_p;
-  int nested; 
   tree t;
   tree try_block;
 
-  /* Remember whether we're already processing a function definition
-     so that we can tell finish_function.  */
-  nested = in_function_p ();
-
   /* Let the compiler know that now is the time to really generate
      actualy RTL.  */
   saved_expanding_p = expanding_p;
@@ -2248,7 +2243,7 @@ expand_body (fn)
       finish_function_handler_sequence (NULL_TREE);
     }
 
-  finish_function (lineno, 0, nested);
+  finish_function (lineno, 0);
 
   /* Restore EXPANDING_P.  */
   expanding_p = saved_expanding_p;