]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Makefile.in (integrate.o): Update.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Thu, 28 Feb 2002 07:39:44 +0000 (07:39 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Thu, 28 Feb 2002 07:39:44 +0000 (07:39 +0000)
* Makefile.in (integrate.o): Update.
* c-decl.c (copy_lang_decl): Rename.
* c-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
* integrate.c: Include langhooks.h.
(copy_decl_for_inlining): Update to use langhook.
* langhooks-def.h (lhd_do_nothing_t,
LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): New.
(LANG_HOOKS_INITIALIZER): Update.
* langhooks.c (lhd_do_nothing_t): New.
* langhooks.h (struct lang_hooks): Add dup_lang_specific_decl.
* tree.h (copy_lang_decl): Remove.
ada:
* misc.c (copy_lang_decl): Remove.
cp:
* class.c (build_clone): Update.
* cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
* cp-tree.h (cxx_dup_lang_specific_decl): New.
* lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
(copy_decl): Update.
* method.c (make_thunk): Update.
f:
* com.c (copy_lang_decl): Delete.
java:
* decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
* java-tree.h (java_dup_lang_specific_decl): New.
* lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
objc:
* objc-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.

From-SVN: r50122

25 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/ada/ChangeLog
gcc/ada/misc.c
gcc/c-decl.c
gcc/c-lang.c
gcc/c-tree.h
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-lang.c
gcc/cp/cp-tree.h
gcc/cp/lex.c
gcc/cp/method.c
gcc/f/ChangeLog
gcc/f/com.c
gcc/integrate.c
gcc/java/ChangeLog
gcc/java/decl.c
gcc/java/java-tree.h
gcc/java/lang.c
gcc/langhooks-def.h
gcc/langhooks.c
gcc/langhooks.h
gcc/objc/objc-lang.c
gcc/tree.h

index 1f9dd893f0353fdb8a2d4a1e4919551c7b58ce0e..3074e4b47af7d431c6837e7b467823845a563cb2 100644 (file)
@@ -1,3 +1,19 @@
+2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * Makefile.in (integrate.o): Update.
+       * c-decl.c (copy_lang_decl): Rename.
+       * c-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
+       * integrate.c: Include langhooks.h.
+       (copy_decl_for_inlining): Update to use langhook.
+       * langhooks-def.h (lhd_do_nothing_t,
+       LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): New.
+       (LANG_HOOKS_INITIALIZER): Update.
+       * langhooks.c (lhd_do_nothing_t): New.
+       * langhooks.h (struct lang_hooks): Add dup_lang_specific_decl.
+       * tree.h (copy_lang_decl): Remove.
+objc:
+       * objc-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
+
 2002-02-27  Andrew MacLeod  <amacleod@redhat.com>
 
        * dwarf2out.c (stack_adjust_offset): Add support for POST_INC, 
index a7f05d4cd9b4671fe41643b74c8de4f97c818ac8..604dd7dd8ff00707601b5469ec25df02bd6e1066 100644 (file)
@@ -1431,7 +1431,7 @@ real.o : real.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) toplev.h $(TM_P_H)
 integrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
    debug.h $(INTEGRATE_H) insn-config.h $(EXPR_H) real.h $(REGS_H) \
    intl.h function.h output.h $(RECOG_H) except.h toplev.h $(LOOP_H) \
-   $(PARAMS_H) $(TM_P_H) $(TARGET_H)
+   $(PARAMS_H) $(TM_P_H) $(TARGET_H) langhooks.h
 jump.o : jump.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h hard-reg-set.h $(REGS_H) \
    insn-config.h $(RECOG_H) $(EXPR_H) real.h except.h function.h \
    toplev.h $(INSN_ATTR_H) $(TM_P_H) reload.h $(PREDICT_H)
index 1443a9052cd45f5463d2497dcc1550570d4ae927..875b3d5bc184620ad5891de315cb052340ab02ff 100644 (file)
@@ -1,3 +1,7 @@
+2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * misc.c (copy_lang_decl): Remove.
+
 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
 
        * misc.c: Delete traditional-mode-related code copied from the
index c4da9226dd8bb7a5739d920800c21b107919c980..78b04c8da2d2744eb55fe3facfcd98e4333964d1 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                           C Implementation File                          *
  *                                                                          *
- *                             $Revision: 1.17 $
+ *                             $Revision: 1.18 $
  *                                                                          *
  *          Copyright (C) 1992-2001 Free Software Foundation, Inc.          *
  *                                                                          *
@@ -406,15 +406,6 @@ maybe_build_cleanup (decl)
   return NULL_TREE;
 }
 
-/* integrate_decl_tree calls this function, but since we don't use the
-   DECL_LANG_SPECIFIC field, this is a no-op.  */
-
-void
-copy_lang_decl (node)
-     tree node ATTRIBUTE_UNUSED;
-{
-}
-
 /* Hooks for print-tree.c:  */
 
 static void
index 177bcea5744c302f7b2b2e5113e40ab6ad0e9bc0..21ff5eeacd19ed33a6ed4feef6f6e4029e98bb32 100644 (file)
@@ -7200,10 +7200,10 @@ mark_c_function_context (f)
   mark_binding_level (&p->binding_level);
 }
 
-/* Copy the DECL_LANG_SPECIFIC data associated with NODE.  */
+/* Copy the DECL_LANG_SPECIFIC data associated with DECL.  */
 
 void
-copy_lang_decl (decl)
+c_dup_lang_specific_decl (decl)
      tree decl;
 {
   struct lang_decl *ld;
index 497d32af1223e492b270eb5b1a3eba13c66a09e7..174f9dc8106fbf5133c430c4b0db47fecfe3bd97 100644 (file)
@@ -55,6 +55,8 @@ static void c_post_options PARAMS ((void));
 #define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier
 #undef LANG_HOOKS_SET_YYDEBUG
 #define LANG_HOOKS_SET_YYDEBUG c_set_yydebug
+#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
+#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl
 
 #undef LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN
 #define LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN \
index 064ee0889a9e26018a3bc27ea03563ce6ac3cbca..d6f622e0ff5834d3e5b34056644d47c15e4b4ae8 100644 (file)
@@ -168,6 +168,7 @@ extern void gen_aux_info_record                 PARAMS ((tree, int, int, int));
 
 /* in c-decl.c */
 extern void c_init_decl_processing             PARAMS ((void));
+extern void c_dup_lang_specific_decl           PARAMS ((tree));
 extern void c_print_identifier                 PARAMS ((FILE *, tree, int));
 extern tree build_array_declarator              PARAMS ((tree, tree, int, int));
 extern tree build_enumerator                    PARAMS ((tree, tree));
index d2c80e0302fe47cd482d1375e22f7374858f2966..410479c0d22b7bfdd60d9122162884ef98826ceb 100644 (file)
@@ -1,3 +1,12 @@
+2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * class.c (build_clone): Update.
+       * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
+       * cp-tree.h (cxx_dup_lang_specific_decl): New.
+       * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
+       (copy_decl): Update.
+       * method.c (make_thunk): Update.
+
 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
 
        * decl2.c: Delete traditional-mode-related code copied from
index 40702867405acdbe5cba15459840f2c66f3cdf43..9e3c110a2e504116ebff5c3af62e0dbcdca339c0 100644 (file)
@@ -4038,7 +4038,7 @@ build_clone (fn, name)
       for (parms = DECL_ARGUMENTS (clone); parms; parms = TREE_CHAIN (parms))
        {
          DECL_CONTEXT (parms) = clone;
-         copy_lang_decl (parms);
+         cxx_dup_lang_specific_decl (parms);
        }
     }
 
index c40330bc319a39d2ecddd99a4b407262b1ecb9d4..800a8701de2e5dcbd370e15e16b7457546297a7c 100644 (file)
@@ -50,6 +50,8 @@ static HOST_WIDE_INT cxx_get_alias_set PARAMS ((tree));
 #define LANG_HOOKS_EXPAND_CONSTANT cplus_expand_constant
 #undef LANG_HOOKS_SAFE_FROM_P
 #define LANG_HOOKS_SAFE_FROM_P c_safe_from_p
+#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
+#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_dup_lang_specific_decl
 #undef LANG_HOOKS_PRINT_STATISTICS
 #define LANG_HOOKS_PRINT_STATISTICS cxx_print_statistics
 #undef LANG_HOOKS_PRINT_XNODE
index 6581132375170eba754c111c7bae6456baca49c5..73aed25d5bf26b05e48534fada14a3f901638db8 100644 (file)
@@ -3922,6 +3922,7 @@ extern tree build_java_class_ref                PARAMS ((tree));
 /* in input.c */
 
 /* in lex.c */
+extern void cxx_dup_lang_specific_decl         PARAMS ((tree));
 extern tree make_pointer_declarator            PARAMS ((tree, tree));
 extern tree make_reference_declarator          PARAMS ((tree, tree));
 extern tree make_call_declarator               PARAMS ((tree, tree, tree, tree));
index 885002a97934f0f74ef4f0ccc5256a822571fd8d..d338632bc32a37ea752bd5dd01aaaf1d067592ac 100644 (file)
@@ -1516,7 +1516,7 @@ retrofit_lang_decl (t)
 }
 
 void
-copy_lang_decl (node)
+cxx_dup_lang_specific_decl (node)
      tree node;
 {
   int size;
@@ -1548,7 +1548,7 @@ copy_decl (decl)
   tree copy;
 
   copy = copy_node (decl);
-  copy_lang_decl (copy);
+  cxx_dup_lang_specific_decl (copy);
   return copy;
 }
 
index 52a6a8cf59d1b618e3cfd0ee3393eb3d5edc1b39..35e40ebbac62e2c7819148259961fdcf70d18870 100644 (file)
@@ -302,7 +302,7 @@ make_thunk (function, delta, vcall_index)
     {
       thunk = build_decl (FUNCTION_DECL, thunk_id, TREE_TYPE (func_decl));
       DECL_LANG_SPECIFIC (thunk) = DECL_LANG_SPECIFIC (func_decl);
-      copy_lang_decl (func_decl);
+      cxx_dup_lang_specific_decl (func_decl);
       SET_DECL_ASSEMBLER_NAME (thunk, thunk_id);
       DECL_CONTEXT (thunk) = DECL_CONTEXT (func_decl);
       TREE_READONLY (thunk) = TREE_READONLY (func_decl);
index 3809a19b637eb2194535f0eead0a81e97e55a924..94cf6911a57fdbc61e0cdce6871fc763fa78db5e 100644 (file)
@@ -1,3 +1,7 @@
+Thu Feb 28 07:53:46 2002  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * com.c (copy_lang_decl): Delete.
+
 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
 
        * com.c, lex.c, top.c: Delete traditional-mode-related code
index 3c4a1d5d370d904e0a297d36c1c335e6a7eeef75..d1e769a21bcf25c4bc281a5dbf7eaf1acc98fc60 100644 (file)
@@ -14049,15 +14049,6 @@ convert (type, expr)
   return error_mark_node;
 }
 
-/* integrate_decl_tree calls this function, but since we don't use the
-   DECL_LANG_SPECIFIC field, this is a no-op.  */
-
-void
-copy_lang_decl (node)
-     tree node UNUSED;
-{
-}
-
 /* Return the list of declarations of the current level.
    Note that this list is in reverse order unless/until
    you nreverse it; and when you do nreverse it, you must
index ad6b2a1f52aaa64c4cdecb8e95adbaff1a0a1939..59c1550bd3784ff7438d01e8de79e2de0ada9e79 100644 (file)
@@ -43,6 +43,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "params.h"
 #include "ggc.h"
 #include "target.h"
+#include "langhooks.h"
 
 #include "obstack.h"
 #define        obstack_chunk_alloc     xmalloc
@@ -368,8 +369,7 @@ copy_decl_for_inlining (decl, from_fn, to_fn)
   else
     {
       copy = copy_node (decl);
-      if (DECL_LANG_SPECIFIC (copy))
-       copy_lang_decl (copy);
+      (*lang_hooks.dup_lang_specific_decl) (copy);
 
       /* TREE_ADDRESSABLE isn't used to indicate that a label's
         address has been taken; it's for internal bookkeeping in
index 4076a77b78df1273db52c420ea6f5d8ae4adeb0e..a4ef231a15912dbb3211e9f27c8f1f1c53b237c6 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
+       * java-tree.h (java_dup_lang_specific_decl): New.
+       * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
+
 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
 
        * builtins.c, decl.c: Delete traditional-mode-related code
index f9bbc9f672bc599044b1530c045fe4abfed8812b..eaa7c48144f11286b5f2bcc6f63e39ffedf7c65e 100644 (file)
@@ -1543,13 +1543,20 @@ set_block (block)
 /* integrate_decl_tree calls this function. */
 
 void
-copy_lang_decl (node)
+java_dup_lang_specific_decl (node)
      tree node;
 {
-  int lang_decl_size
-    = TREE_CODE (node) == VAR_DECL ? sizeof (struct lang_decl_var)
-    : sizeof (struct lang_decl);
-  struct lang_decl *x = (struct lang_decl *) ggc_alloc (lang_decl_size);
+  int lang_decl_size;
+  struct lang_decl *x;
+
+  if (!DECL_LANG_SPECIFIC (node))
+    return;
+
+  if (TREE_CODE (node) == VAR_DECL)
+    lang_decl_size = sizeof (struct lang_decl_var);
+  else
+    lang_decl_size = sizeof (struct lang_decl);
+  x = (struct lang_decl *) ggc_alloc (lang_decl_size);
   memcpy (x, DECL_LANG_SPECIFIC (node), lang_decl_size);
   DECL_LANG_SPECIFIC (node) = x;
 }
index 8f64ef2e9a485ad71902a487d5faa52a05e9eb03..7097b56d720df7e06d4fd8997992d3e6c923ec53 100644 (file)
@@ -1069,6 +1069,7 @@ extern tree ident_subst PARAMS ((const char*, int,
 extern tree identifier_subst PARAMS ((const tree,
                                     const char *, int, int, const char *));
 extern void java_init_decl_processing PARAMS ((void));
+extern void java_dup_lang_specific_decl PARAMS ((tree));
 extern tree build_java_signature PARAMS ((tree));
 extern tree build_java_argument_signature PARAMS ((tree));
 extern void set_java_signature PARAMS ((tree, tree));
index 152039021668a9753ce632c65afa8e24cfa4faaf..6be8f2bafa5a05cb85eb2474b4c640a3b77e326a 100644 (file)
@@ -214,6 +214,8 @@ static int dependency_tracking = 0;
 #define LANG_HOOKS_DECODE_OPTION java_decode_option
 #undef LANG_HOOKS_SET_YYDEBUG
 #define LANG_HOOKS_SET_YYDEBUG java_set_yydebug
+#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
+#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL java_dup_lang_specific_decl
 
 /* Each front end provides its own.  */
 const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
index ca55a82797da9cfb676e62384cec099716e76dc2..89002aa07968e928089b79eb85ffbfc46e125bcc 100644 (file)
@@ -38,6 +38,7 @@ extern HOST_WIDE_INT hook_get_alias_set_0     PARAMS ((tree));
 /* See langhooks.h for the definition and documentation of each hook.  */
 
 extern void lhd_do_nothing PARAMS ((void));
+extern void lhd_do_nothing_t PARAMS ((tree));
 extern int lhd_decode_option PARAMS ((int, char **));
 extern HOST_WIDE_INT lhd_get_alias_set PARAMS ((tree));
 extern tree lhd_return_tree PARAMS ((tree));
@@ -75,6 +76,7 @@ void lhd_tree_inlining_end_inlining           PARAMS ((tree));
 #define LANG_HOOKS_EXPAND_CONSTANT     lhd_return_tree
 #define LANG_HOOKS_SAFE_FROM_P         lhd_safe_from_p
 #define LANG_HOOKS_STATICP             lhd_staticp
+#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL lhd_do_nothing_t
 #define LANG_HOOKS_HONOR_READONLY      false
 #define LANG_HOOKS_PRINT_STATISTICS    lhd_do_nothing
 #define LANG_HOOKS_PRINT_XNODE         lhd_print_tree_nothing
@@ -143,6 +145,7 @@ int lhd_tree_dump_type_quals                        PARAMS ((tree));
   LANG_HOOKS_EXPAND_CONSTANT, \
   LANG_HOOKS_SAFE_FROM_P, \
   LANG_HOOKS_STATICP, \
+  LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, \
   LANG_HOOKS_HONOR_READONLY, \
   LANG_HOOKS_PRINT_STATISTICS, \
   LANG_HOOKS_PRINT_XNODE, \
index de5519caf209088d7a2139ebb61f3b1b12372a22..a976d748029b3d755d64b3d82a2d6e68c2a0c179 100644 (file)
@@ -39,6 +39,14 @@ lhd_do_nothing ()
 {
 }
 
+/* Do nothing.  */
+
+void
+lhd_do_nothing_t (t)
+     tree t ATTRIBUTE_UNUSED;
+{
+}
+
 /* Do nothing (return the tree node passed).  */
 
 tree
index 81ae71b4dc0d0794ef4fdc4769bc2c8edc21fb16..8203fd192142bf39cf88a4f58a3d4e4cdb41d245 100644 (file)
@@ -128,6 +128,10 @@ struct lang_hooks
   /* Hook called by staticp for language-specific tree codes.  */
   int (*staticp) PARAMS ((tree));
 
+  /* Replace the DECL_LANG_SPECIFIC data, which may be NULL, of the
+     DECL_NODE with a newly GC-allocated copy.  */
+  void (*dup_lang_specific_decl) PARAMS ((tree));
+
   /* Nonzero if TYPE_READONLY and TREE_READONLY should always be honored.  */
   bool honor_readonly;
 
index 7e2cae7bf008209da099bc71057e1796742eb393..8f155c2b23eac3a0f695281d23d8b434a6668d0d 100644 (file)
@@ -46,6 +46,8 @@ static void objc_post_options                   PARAMS ((void));
 #define LANG_HOOKS_POST_OPTIONS objc_post_options
 #undef LANG_HOOKS_STATICP
 #define LANG_HOOKS_STATICP c_staticp
+#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
+#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl
 #undef LANG_HOOKS_PRINT_IDENTIFIER
 #define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier
 #undef LANG_HOOKS_SET_YYDEBUG
index 8e17b53422549e52160febb493db8d65e85feda0..06d9815ba158b56113c5e73a7fec8b258f80d1b4 100644 (file)
@@ -2859,9 +2859,6 @@ extern tree fold_builtin          PARAMS ((tree));
 \f
 /* The language front-end must define these functions.  */
 
-/* Function to replace the DECL_LANG_SPECIFIC field of a DECL with a copy.  */
-extern void copy_lang_decl                     PARAMS ((tree));
-
 /* Function called with no arguments to parse and compile the input.  */
 extern int yyparse                             PARAMS ((void));
 /* Functions for processing symbol declarations.  */