* output.h (make_function_rtl): Remove prototype.
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Jan 2001 23:06:30 +0000 (23:06 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Jan 2001 23:06:30 +0000 (23:06 +0000)
(make_decl_rtl): Likewise.
* varasm.c (make_function_rtl): Remove.
(make_decl_rtl): Determine top-levelness from DECL_CONTEXT, rather
than from a third parameter.
* tree.h (make_decl_rtl): Remove last parameter.
* c-decl.c (builtin_function): Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
(start_function): Likewise.
* except.c (call_get_eh_context): Likewise.
* expr.c (emit_block_move): Likewise.
(clear_storage): Likewise.
* profile.c (output_func_start_profiler): Likewise.
* toplev.c (rest_of_decl_compilation): Likewise.
* objc/objc-act.c (create_builtin_decl): Likewise.
(synth_module_prologue): Likewise.
(generate_static_reference): Likewise.
(build_selector_reference_decl): Likewise.
(build_class_reference_decl): Likewise.
(build_objc_string_decl): Likewise.
(build_protocol_reference): Likewise.

* class.c (finish_struct_1):  Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
* decl.c (builtin_function): Likewise.
(build_cp_library_fn): Likewise.
(check_initializer): Likewise.
(make_rtl_for_nonlocal_decl): Likewise.
(cp_finish_decl): Likewise.
(start_function): Likewise.
* decl2.c (finish_anon_union): Likewise.
* friend.c (do_friend): Likewise.
* init.c (build_java_class_ref): Likewise.
* method.c (make_thunk): Likewise.
* pt.c (tsubst_friend_function): Likewise.
* semantics.c (expand_body): Likewise.

* com.c (ffecom_init_zero_):  Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
(ffecom_lookup_label_): Likewise.
(builtin_function): Likewise.
(start_function): Likewise.

* class.c (build_utf8_ref): Remove last argument in call to
make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
(build_class_ref): Likewise.
(build_static_field_ref): Likewise.
(get_dispatch_table): Likewise.
(layout_class_method): Likewise.
(emit_register_classes): Likewise.
* constants.c (build_constant_data_ref): Likewise.
* decl.c (builtin_function): Likewise.
(create_primitive_vtable): Likewise.
* expr.c (build_known_method_def): Likewise.
(build_jni_stub): Likewise.
(java_lang_expand_expr): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38884 138bc75d-0d04-0410-961f-82ee72b054a4

27 files changed:
fastjar/Makefile.in
gcc/ChangeLog
gcc/c-decl.c
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/friend.c
gcc/cp/init.c
gcc/cp/method.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/except.c
gcc/expr.c
gcc/f/ChangeLog
gcc/f/com.c
gcc/java/ChangeLog
gcc/java/class.c
gcc/java/constants.c
gcc/java/decl.c
gcc/java/expr.c
gcc/objc/objc-act.c
gcc/output.h
gcc/profile.c
gcc/toplev.c
gcc/tree.h
gcc/varasm.c

index f30c93a..94b3a1a 100644 (file)
@@ -324,7 +324,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index 88cd93b..3723899 100644 (file)
@@ -1,3 +1,27 @@
+2001-01-10  Mark Mitchell  <mark@codesourcery.com>
+
+       * output.h (make_function_rtl): Remove prototype.
+       (make_decl_rtl): Likewise.
+       * varasm.c (make_function_rtl): Remove.
+       (make_decl_rtl): Determine top-levelness from DECL_CONTEXT, rather
+       than from a third parameter.
+       * tree.h (make_decl_rtl): Remove last parameter.
+       * c-decl.c (builtin_function): Remove last argument in call to
+       make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
+       (start_function): Likewise.
+       * except.c (call_get_eh_context): Likewise.
+       * expr.c (emit_block_move): Likewise.
+       (clear_storage): Likewise.
+       * profile.c (output_func_start_profiler): Likewise.
+       * toplev.c (rest_of_decl_compilation): Likewise.
+       * objc/objc-act.c (create_builtin_decl): Likewise.
+       (synth_module_prologue): Likewise.
+       (generate_static_reference): Likewise.
+       (build_selector_reference_decl): Likewise.
+       (build_class_reference_decl): Likewise.
+       (build_objc_string_decl): Likewise.
+       (build_protocol_reference): Likewise.
+
 2001-01-10  Richard Henderson  <rth@redhat.com>
 
        * hwint.h: Revert yesterday's change.
index 95272f9..bcd414e 100644 (file)
@@ -3152,7 +3152,7 @@ builtin_function (name, type, function_code, class, library_name)
     DECL_BUILT_IN_NONANSI (decl) = 1;
   if (library_name)
     DECL_ASSEMBLER_NAME (decl) = get_identifier (library_name);
-  make_decl_rtl (decl, NULL_PTR, 1);
+  make_decl_rtl (decl, NULL_PTR);
   pushdecl (decl);
   DECL_BUILT_IN_CLASS (decl) = class;
   DECL_FUNCTION_CODE (decl) = function_code;
@@ -5951,7 +5951,7 @@ start_function (declspecs, declarator, prefix_attributes, attributes)
   declare_parm_level (1);
   current_binding_level->subblocks_tag_transparent = 1;
 
-  make_function_rtl (current_function_decl);
+  make_decl_rtl (current_function_decl, NULL);
 
   restype = TREE_TYPE (TREE_TYPE (current_function_decl));
   /* Promote the value to int before returning it.  */
index 676a211..fa3b5ed 100644 (file)
@@ -1,5 +1,22 @@
 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
 
+       * class.c (finish_struct_1):  Remove last argument in call to
+       make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
+       * decl.c (builtin_function): Likewise.
+       (build_cp_library_fn): Likewise.
+       (check_initializer): Likewise.
+       (make_rtl_for_nonlocal_decl): Likewise.
+       (cp_finish_decl): Likewise.
+       (start_function): Likewise.
+       * decl2.c (finish_anon_union): Likewise.
+       * friend.c (do_friend): Likewise.
+       * init.c (build_java_class_ref): Likewise.
+       * method.c (make_thunk): Likewise.
+       * pt.c (tsubst_friend_function): Likewise.
+       * semantics.c (expand_body): Likewise.
+
+2001-01-10  Mark Mitchell  <mark@codesourcery.com>
+
        * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
        looking at DECL_CLONED_FUNCTION for non-functions.
 
index 9079f97..888e8ae 100644 (file)
@@ -5244,7 +5244,7 @@ finish_struct_1 (t)
          && TREE_TYPE (x) == t)
        {
          DECL_MODE (x) = TYPE_MODE (t);
-         make_decl_rtl (x, NULL, 0);
+         make_decl_rtl (x, NULL);
        }
     }
 
index 33c0f80..dfe69ac 100644 (file)
@@ -6671,7 +6671,7 @@ builtin_function (name, type, code, class, libname)
      function in the namespace.  */
   if (libname)
     DECL_ASSEMBLER_NAME (decl) = get_identifier (libname);
-  make_function_rtl (decl);
+  make_decl_rtl (decl, NULL);
 
   /* Warn if a function in the namespace for users
      is used without an occasion to consider it declared.  */
@@ -6709,7 +6709,7 @@ build_library_fn (name, type)
      tree type;
 {
   tree fn = build_library_fn_1 (name, ERROR_MARK, type);
-  make_function_rtl (fn);
+  make_decl_rtl (fn, NULL);
   return fn;
 }
 
@@ -6725,7 +6725,7 @@ build_cp_library_fn (name, operator_code, type)
   TREE_NOTHROW (fn) = TYPE_NOTHROW_P (type);
   DECL_CONTEXT (fn) = FROB_CONTEXT (current_namespace);
   set_mangled_name_for_decl (fn);
-  make_function_rtl (fn);
+  make_decl_rtl (fn, NULL);
   return fn;
 }
 
@@ -7612,7 +7612,7 @@ check_initializer (decl, init)
   else if (!DECL_EXTERNAL (decl) && TREE_CODE (type) == REFERENCE_TYPE)
     {
       if (TREE_STATIC (decl))
-       make_decl_rtl (decl, NULL_PTR, toplevel_bindings_p ());
+       make_decl_rtl (decl, NULL_PTR);
       grok_reference_init (decl, type, init);
       init = NULL_TREE;
     }
@@ -7739,7 +7739,7 @@ make_rtl_for_nonlocal_decl (decl, init, asmspec)
   /* If we're deferring the variable, just make RTL.  Do not actually
      emit the variable.  */
   if (defer_p)
-    make_decl_rtl (decl, asmspec, toplev);
+    make_decl_rtl (decl, asmspec);
   /* If we're not deferring, go ahead and assemble the variable.  */
   else
     rest_of_decl_compilation (decl, asmspec, toplev, at_eof);
@@ -8020,7 +8020,7 @@ cp_finish_decl (decl, init, asmspec_tree, flags)
         grokclassfn.  Lay this out fresh.  */
       DECL_RTL (TREE_TYPE (decl)) = NULL_RTX;
       DECL_ASSEMBLER_NAME (decl) = get_identifier (asmspec);
-      make_decl_rtl (decl, asmspec, 0);
+      make_decl_rtl (decl, asmspec);
     }
 
   /* Deduce size of array from initialization, if not already known.  */
@@ -13598,7 +13598,7 @@ start_function (declspecs, declarator, attrs, flags)
 
   /* We need to do this even if we aren't expanding yet so that
      assemble_external works.  */
-  make_function_rtl (decl1);
+  make_decl_rtl (decl1, NULL);
 
   /* Promote the value to int before returning it.  */
   if (C_PROMOTING_INTEGER_TYPE_P (restype))
index c41126a..e099056 100644 (file)
@@ -2227,7 +2227,7 @@ finish_anon_union (anon_union_decl)
 
   if (static_p)
     {
-      make_decl_rtl (main_decl, 0, toplevel_bindings_p ());
+      make_decl_rtl (main_decl, 0);
       DECL_RTL (anon_union_decl) = DECL_RTL (main_decl);
       expand_anon_union_decl (anon_union_decl, 
                              NULL_TREE,
index 1cc9905..df3281e 100644 (file)
@@ -1,5 +1,5 @@
 /* Help friends in C++.
-   Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -409,7 +409,7 @@ do_friend (ctype, declarator, decl, parmdecls, attrlist,
            }
        }
 
-      make_decl_rtl (decl, NULL_PTR, 1);
+      make_decl_rtl (decl, NULL_PTR);
       add_friend (current_class_type, 
                  is_friend_template ? DECL_TI_TEMPLATE (decl) : decl);
       DECL_FRIEND_P (decl) = 1;
index e9eddf9..98f4bbd 100644 (file)
@@ -2233,7 +2233,7 @@ build_java_class_ref (type)
       DECL_ARTIFICIAL (class_decl) = 1;
       DECL_IGNORED_P (class_decl) = 1;
       pushdecl_top_level (class_decl);
-      make_decl_rtl (class_decl, NULL_PTR, 1);
+      make_decl_rtl (class_decl, NULL_PTR);
     }
   return class_decl;
 }
index 574d6ec..3e6b3cc 100644 (file)
@@ -2177,7 +2177,7 @@ make_thunk (function, delta, vcall_index, generate_with_vtable_p)
       /* So that finish_file can write out any thunks that need to be: */
       pushdecl_top_level (thunk);
       /* Create RTL for this thunk so that its address can be taken.  */
-      make_function_rtl (thunk);
+      make_decl_rtl (thunk, NULL);
     }
   return thunk;
 }
index 5d4a1bf..a6a9381 100644 (file)
@@ -4525,7 +4525,7 @@ tsubst_friend_function (decl, args)
     {
       set_mangled_name_for_decl (new_friend);
       DECL_RTL (new_friend) = 0;
-      make_decl_rtl (new_friend, NULL_PTR, 1);
+      make_decl_rtl (new_friend, NULL_PTR);
     }
       
   if (DECL_NAMESPACE_SCOPE_P (new_friend))
@@ -5789,7 +5789,7 @@ tsubst_decl (t, args, type, in_decl)
              }
            
            DECL_RTL (r) = 0;
-           make_decl_rtl (r, NULL_PTR, 1);
+           make_decl_rtl (r, NULL_PTR);
            
            /* Like grokfndecl.  If we don't do this, pushdecl will
               mess up our TREE_CHAIN because it doesn't find a
index d2ec8f5..cf88279 100644 (file)
@@ -3,7 +3,7 @@
    building RTL.  These routines are used both during actual parsing
    and during the instantiation of template functions. 
 
-   Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
    Written by Mark Mitchell (mmitchell@usa.net) based on code found
    formerly in parse.y and pt.c.  
 
@@ -2367,7 +2367,7 @@ expand_body (fn)
     {
       /* Give the function RTL now so that we can assign it to a
         function pointer, etc.  */
-      make_function_rtl (fn);
+      make_decl_rtl (fn, NULL);
       /* Set DECL_EXTERNAL so that assemble_external will be called as
         necessary.  We'll clear it again in finish_file.  */
       if (!DECL_EXTERNAL (fn))
index c1dd0cb..5c666d4 100644 (file)
@@ -1156,7 +1156,7 @@ call_get_eh_context ()
       TREE_PUBLIC (fn) = 1;
       DECL_ARTIFICIAL (fn) = 1;
       TREE_READONLY (fn) = 1;
-      make_decl_rtl (fn, NULL_PTR, 1);
+      make_decl_rtl (fn, NULL_PTR);
       assemble_external (fn);
 
       ggc_add_tree_root (&fn, 1);
index 837c9de..5a396f1 100644 (file)
@@ -1758,7 +1758,7 @@ emit_block_move (x, y, size, align)
          DECL_EXTERNAL (fn) = 1;
          TREE_PUBLIC (fn) = 1;
          DECL_ARTIFICIAL (fn) = 1;
-         make_decl_rtl (fn, NULL_PTR, 1);
+         make_decl_rtl (fn, NULL_PTR);
          assemble_external (fn);
        }
 
@@ -2655,7 +2655,7 @@ clear_storage (object, size, align)
              DECL_EXTERNAL (fn) = 1;
              TREE_PUBLIC (fn) = 1;
              DECL_ARTIFICIAL (fn) = 1;
-             make_decl_rtl (fn, NULL_PTR, 1);
+             make_decl_rtl (fn, NULL_PTR);
              assemble_external (fn);
            }
 
index 22bc357..7389843 100644 (file)
@@ -1,3 +1,11 @@
+Wed Jan 10 14:39:45 2001  Mark Mitchell  <mark@codesourcery.com>
+
+       * com.c (ffecom_init_zero_):  Remove last argument in call to
+       make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
+       (ffecom_lookup_label_): Likewise.
+       (builtin_function): Likewise.
+       (start_function): Likewise.
+
 Thu Dec 21 21:19:42 2000  Joseph S. Myers  <jsm28@cam.ac.uk>
 
        * g77install.texi, g77.texi: Update last-updated dates for
index 3e66467..719df1f 100644 (file)
@@ -6460,7 +6460,7 @@ ffecom_init_zero_ (tree decl)
 
   if (incremental)
     {
-      make_decl_rtl (decl, NULL, TREE_PUBLIC (decl) ? 1 : 0);
+      make_decl_rtl (decl, NULL);
       assemble_variable (decl, TREE_PUBLIC (decl) ? 1 : 0, 0, 1);
     }
 
@@ -12266,7 +12266,7 @@ ffecom_lookup_label (ffelab label)
          TREE_STATIC (glabel) = 1;
          DECL_CONTEXT (glabel) = 0;
          DECL_INITIAL (glabel) = NULL;
-         make_decl_rtl (glabel, NULL, 0);
+         make_decl_rtl (glabel, NULL);
          expand_decl (glabel);
 
          ffecom_save_tree_forever (glabel);
@@ -13568,7 +13568,7 @@ builtin_function (const char *name, tree type, int function_code,
   TREE_PUBLIC (decl) = 1;
   if (library_name)
     DECL_ASSEMBLER_NAME (decl) = get_identifier (library_name);
-  make_decl_rtl (decl, NULL_PTR, 1);
+  make_decl_rtl (decl, NULL_PTR);
   pushdecl (decl);
   DECL_BUILT_IN_CLASS (decl) = class;
   DECL_FUNCTION_CODE (decl) = function_code;
@@ -14426,7 +14426,7 @@ start_function (tree name, tree type, int nested, int public)
 
   if (TREE_CODE (current_function_decl) != ERROR_MARK)
     {
-      make_function_rtl (current_function_decl);
+      make_decl_rtl (current_function_decl, NULL);
 
       restype = TREE_TYPE (TREE_TYPE (current_function_decl));
       DECL_RESULT (current_function_decl)
index 1688aa6..bf0b323 100644 (file)
@@ -1,3 +1,19 @@
+2001-01-10  Mark Mitchell  <mark@codesourcery.com>
+
+       * class.c (build_utf8_ref): Remove last argument in call to
+       make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
+       (build_class_ref): Likewise.
+       (build_static_field_ref): Likewise.
+       (get_dispatch_table): Likewise.
+       (layout_class_method): Likewise.
+       (emit_register_classes): Likewise.
+       * constants.c (build_constant_data_ref): Likewise.
+       * decl.c (builtin_function): Likewise.
+       (create_primitive_vtable): Likewise.
+       * expr.c (build_known_method_def): Likewise.
+       (build_jni_stub): Likewise.
+       (java_lang_expand_expr): Likewise.
+       
 2001-01-10  Tom Tromey  <tromey@redhat.com>
 
        * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
index ae715f1..dbf3f4e 100644 (file)
@@ -1,5 +1,5 @@
 /* Functions related to building classes and their related objects.
-   Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -855,7 +855,7 @@ build_utf8_ref (name)
   pushdecl (decl);
   rest_of_decl_compilation (decl, (char*) 0, global_bindings_p (), 0);
   utf8_decl_list = decl;
-  make_decl_rtl (decl, (char*) 0, 1);
+  make_decl_rtl (decl, (char*) 0);
   ref = build1 (ADDR_EXPR, utf8const_ptr_type, decl);
   IDENTIFIER_UTF8_REF (name) = ref;
   return ref;
@@ -891,7 +891,7 @@ build_class_ref (type)
              DECL_IGNORED_P (decl) = 1;
              DECL_ARTIFICIAL (decl) = 1;
              DECL_ASSEMBLER_NAME (decl) = mangle_class_field (type);
-             make_decl_rtl (decl, NULL, 1);
+             make_decl_rtl (decl, NULL);
              pushdecl_top_level (decl);
              if (is_compiled == 1)
                DECL_EXTERNAL (decl) = 1;
@@ -943,7 +943,7 @@ build_class_ref (type)
              decl = build_decl (VAR_DECL, decl_name, class_type_node);
              TREE_STATIC (decl) = 1;
              TREE_PUBLIC (decl) = 1;
-             make_decl_rtl (decl, NULL, 1);
+             make_decl_rtl (decl, NULL);
              pushdecl_top_level (decl);
              if (is_compiled == 1)
                DECL_EXTERNAL (decl) = 1;
@@ -974,7 +974,7 @@ build_static_field_ref (fdecl)
     {
       if (DECL_RTL (fdecl) == 0)
        {
-         make_decl_rtl (fdecl, NULL, 1);
+         make_decl_rtl (fdecl, NULL);
          if (is_compiled == 1)
            DECL_EXTERNAL (fdecl) = 1;
        }
@@ -1222,7 +1222,7 @@ get_dispatch_table (type, this_class_addr)
       else
        {
          if (DECL_RTL (method) == 0)
-           make_decl_rtl (method, NULL, 1);
+           make_decl_rtl (method, NULL);
          method = build1 (ADDR_EXPR, nativecode_ptr_type_node, method);
        }
       list = tree_cons (NULL_TREE /*DECL_VINDEX (method) + 2*/,
@@ -2122,7 +2122,7 @@ layout_class_method (this_class, super_class, method_decl, dtable_count)
   if (! METHOD_ABSTRACT (method_decl) 
       || (CLASS_INTERFACE (TYPE_NAME (this_class)) 
          && (DECL_CLINIT_P (method_decl))))
-    make_function_rtl (method_decl);
+    make_decl_rtl (method_decl, NULL);
   obstack_free (&temporary_obstack, asm_name);
 
   if (ID_INIT_P (method_name))
@@ -2219,7 +2219,7 @@ emit_register_classes ()
   /*  DECL_EXTERNAL (init_decl) = 1;*/
   TREE_PUBLIC (init_decl) = 1;
   pushlevel (0);
-  make_function_rtl (init_decl);
+  make_decl_rtl (init_decl, NULL);
   init_function_start (init_decl, input_filename, 0);
   expand_function_start (init_decl, 0);
 
index ad2ed21..aff5bed 100644 (file)
@@ -1,5 +1,5 @@
 /* Handle the constant pool of the Java(TM) Virtual Machine.
-   Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -402,7 +402,7 @@ build_constant_data_ref ()
                         build_array_type (ptr_type_node,
                                           one_elt_array_domain_type));
       TREE_STATIC (decl) = 1;
-      make_decl_rtl (decl, NULL, 1);
+      make_decl_rtl (decl, NULL);
       TYPE_CPOOL_DATA_REF (current_class) = current_constant_pool_data_ref
        = build1 (ADDR_EXPR, ptr_type_node, decl);
     }
index 8d78878..3c5a6cc 100644 (file)
@@ -1,6 +1,6 @@
 /* Process declarations and variables for the GNU compiler for the
    Java(TM) language.
-   Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -399,7 +399,7 @@ builtin_function (name, type, function_code, class, library_name)
   TREE_PUBLIC (decl) = 1;
   if (library_name)
     DECL_ASSEMBLER_NAME (decl) = get_identifier (library_name);
-  make_decl_rtl (decl, NULL_PTR, 1);
+  make_decl_rtl (decl, NULL_PTR);
   pushdecl (decl);
   DECL_BUILT_IN_CLASS (decl) = class;
   DECL_FUNCTION_CODE (decl) = function_code;
@@ -417,7 +417,7 @@ create_primitive_vtable (name)
   sprintf (buf, "_Jv_%sVTable", name);
   r = build_decl (VAR_DECL, get_identifier (buf), ptr_type_node);
   DECL_EXTERNAL (r) = 1;
-  make_decl_rtl (r, buf, 1);
+  make_decl_rtl (r, buf);
   return r;
 }
 
index 95a27fd..4ad903e 100644 (file)
@@ -1,5 +1,5 @@
 /* Process expressions for the GNU compiler for the Java(TM) language.
-   Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -1680,7 +1680,7 @@ build_known_method_ref (method, method_type, self_type, method_signature, arg_li
   tree func;
   if (is_compiled_class (self_type))
     {
-      make_decl_rtl (method, NULL, 1);
+      make_decl_rtl (method, NULL);
       func = build1 (ADDR_EXPR, method_ptr_type_node, method);
     }
   else
@@ -2000,7 +2000,7 @@ build_jni_stub (method)
   TREE_STATIC (meth_var) = 1;
   TREE_PUBLIC (meth_var) = 0;
   DECL_EXTERNAL (meth_var) = 0;
-  make_decl_rtl (meth_var, NULL, 0);
+  make_decl_rtl (meth_var, NULL);
   meth_var = pushdecl_top_level (meth_var);
 
   /* One strange way that the front ends are different is that they
@@ -2364,7 +2364,7 @@ java_lang_expand_expr (exp, target, tmode, modifier)
            DECL_IGNORED_P (init_decl) = 1;
            TREE_READONLY (init_decl) = 1;
            TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (init_decl)) = 1;
-           make_decl_rtl (init_decl, NULL, 1);
+           make_decl_rtl (init_decl, NULL);
            init = build1 (ADDR_EXPR, TREE_TYPE (exp), init_decl);
            r = expand_expr (init, target, tmode, modifier);
            return r;
@@ -2387,7 +2387,7 @@ java_lang_expand_expr (exp, target, tmode, modifier)
            DECL_IGNORED_P (init_decl) = 1;
            TREE_READONLY (init_decl) = 1;
            TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (init_decl)) = 1;
-           make_decl_rtl (init_decl, NULL, 1);
+           make_decl_rtl (init_decl, NULL);
            init = init_decl;
          }
        expand_assignment (build (COMPONENT_REF, TREE_TYPE (data_fld),
index 12af8f9..7c0941a 100644 (file)
@@ -1230,7 +1230,7 @@ create_builtin_decl (code, type, name)
   if (code == VAR_DECL)
     {
       TREE_STATIC (decl) = 1;
-      make_decl_rtl (decl, 0, 1);
+      make_decl_rtl (decl, 0);
       pushdecl (decl);
     }
 
@@ -1308,7 +1308,7 @@ synth_module_prologue ()
       if (flag_traditional && TAG_MSGSEND[0] != '_')
        DECL_BUILT_IN_NONANSI (umsg_decl) = 1;
 
-      make_decl_rtl (umsg_decl, NULL_PTR, 1);
+      make_decl_rtl (umsg_decl, NULL_PTR);
       pushdecl (umsg_decl);
     }
   else
@@ -1981,7 +1981,7 @@ generate_static_references ()
 
       type = build_array_type (build_pointer_type (void_type_node), 0);
       decl = build_decl (VAR_DECL, ident, type);
-      make_decl_rtl (decl, 0, 1);
+      make_decl_rtl (decl, 0);
       TREE_USED (decl) = 1;
       decls
        = tree_cons (NULL_TREE, build_unary_op (ADDR_EXPR, decl, 1), decls);
@@ -2074,7 +2074,7 @@ build_selector_reference_decl ()
   DECL_ARTIFICIAL (decl) = 1;
   DECL_CONTEXT (decl) = 0;
 
-  make_decl_rtl (decl, 0, 1);
+  make_decl_rtl (decl, 0);
   pushdecl_top_level (decl);
 
   return decl;
@@ -2296,7 +2296,7 @@ build_class_reference_decl ()
   DECL_CONTEXT (decl) = 0;
   DECL_ARTIFICIAL (decl) = 1;
 
-  make_decl_rtl (decl, 0, 1);
+  make_decl_rtl (decl, 0);
   pushdecl_top_level (decl);
 
   return decl;
@@ -2439,7 +2439,7 @@ build_objc_string_decl (section)
   DECL_CONTEXT (decl) = 0;
   DECL_ARTIFICIAL (decl) = 1;
  
-  make_decl_rtl (decl, 0, 1);
+  make_decl_rtl (decl, 0);
   pushdecl_top_level (decl);
 
   return decl;
@@ -5333,7 +5333,7 @@ build_protocol_reference (p)
       TREE_USED (decl) = 1;
       DECL_ARTIFICIAL (decl) = 1;
 
-      make_decl_rtl (decl, 0, 1);
+      make_decl_rtl (decl, 0);
       pushdecl_top_level (decl);
    }
 
index e5d2ae6..ae0034f 100644 (file)
@@ -202,11 +202,6 @@ extern void function_section               PARAMS ((tree));
 /* Tell assembler to switch to the section for the exception table.  */
 extern void exception_section          PARAMS ((void));
 
-/* Create the rtl to represent a function, for a function definition.
-   DECL is a FUNCTION_DECL node which describes which function.
-   The rtl is stored into DECL.  */
-extern void make_function_rtl          PARAMS ((tree));
-
 /* Declare DECL to be a weak symbol.  */
 extern void declare_weak               PARAMS ((tree));
 #endif /* TREE_CODE */
@@ -224,15 +219,6 @@ extern void weak_finish                    PARAMS ((void));
 extern int decode_reg_name             PARAMS ((const char *));
 
 #ifdef TREE_CODE
-/* Create the DECL_RTL for a declaration for a static or external variable
-   or static or external function.
-   ASMSPEC, if not 0, is the string which the user specified
-   as the assembler symbol name.
-   TOP_LEVEL is nonzero if this is a file-scope variable.
-
-   This is never called for PARM_DECL nodes.  */
-extern void make_decl_rtl              PARAMS ((tree, const char *, int));
-
 /* Make the rtl for variable VAR be volatile.
    Use this only for static variables.  */
 extern void make_var_volatile          PARAMS ((tree));
index 17f1f74..6c12e69 100644 (file)
@@ -1117,7 +1117,7 @@ output_func_start_profiler ()
   announce_function (fndecl);
   current_function_decl = fndecl;
   DECL_INITIAL (fndecl) = error_mark_node;
-  make_function_rtl (fndecl);
+  make_decl_rtl (fndecl, NULL);
   init_function_start (fndecl, input_filename, lineno);
   pushlevel (0);
   expand_function_start (fndecl, 0);
index e9ca071..408f04a 100644 (file)
@@ -2579,7 +2579,7 @@ rest_of_decl_compilation (decl, asmspec, top_level, at_end)
       || TREE_CODE (decl) == FUNCTION_DECL)
     {
       timevar_push (TV_VARCONST);
-      make_decl_rtl (decl, asmspec, top_level);
+      make_decl_rtl (decl, asmspec);
       /* Initialized extern variable exists to be replaced
         with its value, or represents something that will be
         output in another file.  */
@@ -2606,13 +2606,13 @@ rest_of_decl_compilation (decl, asmspec, top_level, at_end)
       if (decode_reg_name (asmspec) >= 0)
        {
          DECL_RTL (decl) = 0;
-         make_decl_rtl (decl, asmspec, top_level);
+         make_decl_rtl (decl, asmspec);
        }
       else
        {
          error ("invalid register name `%s' for register variable", asmspec);
          DECL_REGISTER (decl) = 0;
-         make_decl_rtl (decl, NULL, top_level);
+         make_decl_rtl (decl, NULL);
        }
     }
 #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
index d77336f..5e8a1a1 100644 (file)
@@ -2758,7 +2758,7 @@ extern void set_yydebug                   PARAMS ((int));
 extern void fixup_signed_type          PARAMS ((tree));
 
 /* varasm.c */
-extern void make_decl_rtl              PARAMS ((tree, const char *, int));
+extern void make_decl_rtl              PARAMS ((tree, const char *));
 extern void make_decl_one_only         PARAMS ((tree));
 extern int supports_one_only           PARAMS ((void));
 extern void variable_section           PARAMS ((tree, int));
index a6fa232..8841fcf 100644 (file)
@@ -515,83 +515,6 @@ exception_section ()
 #endif
 }
 \f
-/* Create the rtl to represent a function, for a function definition.
-   DECL is a FUNCTION_DECL node which describes which function.
-   The rtl is stored into DECL.  */
-
-void
-make_function_rtl (decl)
-     tree decl;
-{
-  const char *name;
-  const char *new_name;
-
-  if (DECL_RTL (decl) != 0)
-    {
-      /* ??? Another way to do this would be to do what halfpic.c does
-        and maintain a hashed table of such critters.  */
-      /* ??? Another way to do this would be to pass a flag bit to
-        ENCODE_SECTION_INFO saying whether this is a new decl or not.  */
-      /* Let the target reassign the RTL if it wants.
-        This is necessary, for example, when one machine specific
-        decl attribute overrides another.  */
-#ifdef REDO_SECTION_INFO_P
-      if (REDO_SECTION_INFO_P (decl))
-       ENCODE_SECTION_INFO (decl);
-#endif
-      return;
-    }
-
-  name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
-  new_name = name;
-
-  /* Rename a nested function to avoid conflicts, unless it's a member of
-     a local class, in which case the class name is already unique.  */
-  if (decl_function_context (decl) != 0
-      && ! TYPE_P (DECL_CONTEXT (decl))
-      && DECL_INITIAL (decl) != 0
-      && DECL_RTL (decl) == 0)
-    {
-      char *label;
-      ASM_FORMAT_PRIVATE_NAME (label, name, var_labelno);
-      var_labelno++;
-      new_name = label;
-    }
-  /* When -fprefix-function-name is used, every function name is
-     prefixed.  Even static functions are prefixed because they
-     could be declared latter.  Note that a nested function name
-     is not prefixed.  */
-  else if (flag_prefix_function_name)
-    {
-      size_t name_len = IDENTIFIER_LENGTH (DECL_ASSEMBLER_NAME (decl));
-      char *pname;
-
-      pname = alloca (name_len + CHKR_PREFIX_SIZE + 1);
-      memcpy (pname, CHKR_PREFIX, CHKR_PREFIX_SIZE);
-      memcpy (pname + CHKR_PREFIX_SIZE, name, name_len + 1);
-      new_name = pname;
-    }
-
-  if (name != new_name)
-    {
-      DECL_ASSEMBLER_NAME (decl) = get_identifier (new_name);
-      name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
-    }
-
-  DECL_RTL (decl)
-    = gen_rtx_MEM (DECL_MODE (decl),
-                  gen_rtx_SYMBOL_REF (Pmode, name));
-
-  /* Optionally set flags or add text to the name to record
-     information such as that it is a function name.  If the name
-     is changed, the macro ASM_OUTPUT_LABELREF will have to know
-     how to strip this information.  */
-#ifdef ENCODE_SECTION_INFO
-  ENCODE_SECTION_INFO (decl);
-#endif
-}
-
-
 /* Given NAME, a putative register name, discard any customary prefixes.  */
 
 static const char *
@@ -671,16 +594,15 @@ decode_reg_name (asmspec)
    or static or external function.
    ASMSPEC, if not 0, is the string which the user specified
    as the assembler symbol name.
-   TOP_LEVEL is nonzero if this is a file-scope variable.
 
    This is never called for PARM_DECL nodes.  */
 
 void
-make_decl_rtl (decl, asmspec, top_level)
+make_decl_rtl (decl, asmspec)
      tree decl;
      const char *asmspec;
-     int top_level;
 {
+  int top_level = (DECL_CONTEXT (decl) == NULL_TREE);
   const char *name = 0;
   const char *new_name = 0;
   int reg_number;
@@ -741,7 +663,7 @@ make_decl_rtl (decl, asmspec, top_level)
        {
          int nregs;
 
-         if (DECL_INITIAL (decl) != 0 && top_level)
+         if (DECL_INITIAL (decl) != 0 && !TREE_STATIC (decl))
            {
              DECL_INITIAL (decl) = 0;
              error ("global register variable has initial value");
@@ -760,7 +682,7 @@ make_decl_rtl (decl, asmspec, top_level)
          REGNO (DECL_RTL (decl)) = reg_number;
          REG_USERVAR_P (DECL_RTL (decl)) = 1;
 
-         if (top_level)
+         if (TREE_STATIC (decl))
            {
              /* Make this register global, so not usable for anything
                 else.  */
@@ -4890,7 +4812,7 @@ assemble_alias (decl, target)
 {
   const char *name;
 
-  make_decl_rtl (decl, (char *) 0, 1);
+  make_decl_rtl (decl, (char *) 0);
   name = XSTR (XEXP (DECL_RTL (decl), 0), 0);
 
 #ifdef ASM_OUTPUT_DEF