From 2f9834e8055d89ec753d6bea65cb734dcd8f0dc0 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Wed, 13 Mar 2002 01:42:43 +0000 Subject: c-common.c (c_tree_code_type, [...]): Delete. * c-common.c (c_tree_code_type, c_tree_code_length, c_tree_code_name, add_c_tree_codes): Delete. * c-common.h (add_c_tree_codes): Delete. * c-lang.c (tree_code_type, tree_code_length, tree_code_name): Define. * c-objc-common.c (c_objc_common_init): Don't call add_c_tree_codes, instead set lang_unsafe_for_reeval. * objc/objc-act.c (objc_tree_code_type, objc_tree_code_length, objc_tree_code_name, add_objc_tree_codes): Delete. (objc_init): Don't call add_objc_tree_codes. * objc/objc-lang.c (tree_code_type, tree_code_length, tree_code_name): Define. * toplev.c (lang_independent_init): Don't set tree_code_length[IDENTIFIER_NODE]. * tree.c (tree_code_type, tree_code_length, tree_code_name): Delete definitions, moved to language front-ends. * tree.def (IDENTIFIER_NODE): Hardwire the length. * tree.h (tree_code_type, tree_code_length, tree_code_name): Const-ify. (tree_code_length): Change type to unsigned char. ada: * misc.c (gnat_tree_code_type, gnat_tree_code_length, gnat_tree_code_name): Delete. (tree_code_type, tree_code_length, tree_code_name): Define. (gnat_init): Don't try to copy into the various tree_code arrays. ch: * decl.c (chill_tree_code_type, chill_tree_code_length, chill_tree_code_name): Delete. (tree_code_type, tree_code_length, tree_code_name): Define. (init_decl_processing): Don't try to copy into the various tree_code arrays. cp: * cp-lang.c (tree_code_type, tree_code_length, tree_code_name): Define. * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not tree_code_length. * lex.c (cplus_tree_code_type, cplus_tree_code_length, cplus_tree_code_name): Delete. (cxx_init): Don't call add_c_tree_codes, instead set lang_unsafe_for_reeval. Don't try to copy into the various tree_code arrays. f: * com.c (tree_code_type, tree_code_length, tree_code_name): Define. java: * lang.c (java_tree_code_type, java_tree_code_length, tree_code_name): Delete. (tree_code_type, tree_code_length, tree_code_name): Define. (java_init): Don't try to copy into the various tree_code arrays. From-SVN: r50705 --- gcc/java/ChangeLog | 8 ++++++++ gcc/java/lang.c | 22 ++++++---------------- 2 files changed, 14 insertions(+), 16 deletions(-) (limited to 'gcc/java') diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 4267207..be360b4 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,11 @@ +2002-03-12 Kaveh R. Ghazi + + * lang.c (java_tree_code_type, java_tree_code_length, + tree_code_name): Delete. + (tree_code_type, tree_code_length, tree_code_name): Define. + (java_init): Don't try to copy into the various tree_code + arrays. + 2002-03-12 Tom Tromey * jcf-parse.c (get_constant) [CONSTANT_String]: String values are diff --git a/gcc/java/lang.c b/gcc/java/lang.c index a71f5cc..24e0375 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -70,7 +70,8 @@ static int process_option_with_no PARAMS ((const char *, #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE, -static const char java_tree_code_type[] = { +const char tree_code_type[] = { +#include "tree.def" 'x', #include "java-tree.def" }; @@ -82,7 +83,8 @@ static const char java_tree_code_type[] = { #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH, -static const int java_tree_code_length[] = { +const unsigned char tree_code_length[] = { +#include "tree.def" 0, #include "java-tree.def" }; @@ -92,7 +94,8 @@ static const int java_tree_code_length[] = { Used for printing out the tree and error messages. */ #define DEFTREECODE(SYM, NAME, TYPE, LEN) NAME, -static const char *const java_tree_code_name[] = { +const char *const tree_code_name[] = { +#include "tree.def" "@@dummy", #include "java-tree.def" }; @@ -505,19 +508,6 @@ java_init (filename) print_error_function = lang_print_error; lang_expand_expr = java_lang_expand_expr; - /* Append to Gcc tree node definition arrays */ - - memcpy (tree_code_type + (int) LAST_AND_UNUSED_TREE_CODE, - java_tree_code_type, - (int)LAST_JAVA_TREE_CODE - (int)LAST_AND_UNUSED_TREE_CODE); - memcpy (tree_code_length + (int) LAST_AND_UNUSED_TREE_CODE, - java_tree_code_length, - (LAST_JAVA_TREE_CODE - - (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (int)); - memcpy (tree_code_name + (int) LAST_AND_UNUSED_TREE_CODE, - java_tree_code_name, - (LAST_JAVA_TREE_CODE - - (int)LAST_AND_UNUSED_TREE_CODE) * sizeof (char *)); java_init_decl_processing (); using_eh_for_cleanups (); -- cgit v1.1