diff options
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/java/decl.c | 17 | ||||
-rw-r--r-- | gcc/java/java-tree.h | 1 | ||||
-rw-r--r-- | gcc/java/lang.c | 2 |
4 files changed, 21 insertions, 5 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 4076a77..a4ef231 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -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 diff --git a/gcc/java/decl.c b/gcc/java/decl.c index f9bbc9f..eaa7c48 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -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; } diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 8f64ef2..7097b56 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -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)); diff --git a/gcc/java/lang.c b/gcc/java/lang.c index 1520390..6be8f2b 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -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; |