diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-11-15 10:01:10 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-11-15 10:01:10 +0000 |
commit | f5e99456f19b80978984f781e1d847b90d09b30a (patch) | |
tree | cac90266aeb52525edc15fddc73e9428ce8a8556 /gcc/java | |
parent | 87bc7fa6aab909eb842be0800e0284b0daa3de70 (diff) | |
download | gcc-f5e99456f19b80978984f781e1d847b90d09b30a.zip gcc-f5e99456f19b80978984f781e1d847b90d09b30a.tar.gz gcc-f5e99456f19b80978984f781e1d847b90d09b30a.tar.bz2 |
c-common.c: Include c-lex.h.
* c-common.c: Include c-lex.h.
(c_common_lang_init): Change prototype. Call init_c_lex and
init_pragma from here.
* c-common.h (c_common_lang_init): Change prototype.
* c-decl.c (init_decl_processing): Rename. Call c_parse_init.
* c-lang.c (c_init): Change prototype. Update.
(c_init_options): Update.
* c-lex.c (cpp_filename): Remove.
(init_c_lex): Update. Read the main file, and get the original
file name.
(yyparse): Finish the command line options.
* c-parse.in (c_parse_init): Call init_reswords here.
(init_parse): Remove.
* c-tree.h (c_init_decl_processing): New.
* cpphash.c (_cpp_init_hashtable): After initializing the hash
table, populate it.
* cppinit.c (read_original_filename, cpp_finish_options): New.
(cpp_create_reader): New prototype. Defer hash table initialization.
(cpp_start_read): Rename cpp_read_main_file. Initialize the
hash table. Get the original filename.
* cpplib.h (cpp_create_reader): Update.
(cpp_start_read): Remove.
(cpp_read_main_file, cpp_finish_options): New.
* cppmain.c (main, do_preprocessing): Update.
* langhooks.h (struct langhooks): Update init prototype.
* toplev.c (general_init, parse_options_and_default_flags,
process_options, lang_indpendent_init, lang_dependent_init,
init_asm_output): New; perform the bulk of initialization.
(compile_file): Move most of initialization to above functions.
(debug_hooks): Initialize statically.
(set_Wunused): Relocate.
(toplev_main): Move most of initialization to other init functions.
Have a clear logic flow.
* tree.h (init_parse, init_decl_processing): Remove.
ada:
* misc.c (gnat_init): Change prototype. Include the
functionality of the old init_parse and init_decl_processing.
(gnat_init_decl_processing): New prototype.
(init_parse): Remove.
* utils.c (init_decl_processing): Rename gnat_init_decl_processing.
cp: * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
(cxx_init): Update prototype.
* decl.c (init_decl_processing): Rename. Move null node init
to its creation time.
* lex.c (cxx_init_options): Update.
(cxx_init): Combine with old init_parse; also call
cxx_init_decl_processing.
f: * com.c (ffecom_init_decl_processing): Renamed from
init_decl_processing.
(init_parse): Move contents to ffe_init.
(ffe_init): Update prototype.
java: * decl.c (init_decl_processing): Rename java_init_decl_processing.
* java-tree.h: New prototype.
* lang.c (java_init): Update prototype. Combine with old init_parse.
objc: * objc-act.c (objc_init): Update prototype, combine with old
init_parse.
(objc_init_options): Update.
From-SVN: r47046
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/java/decl.c | 2 | ||||
-rw-r--r-- | gcc/java/java-tree.h | 1 | ||||
-rw-r--r-- | gcc/java/lang.c | 69 |
4 files changed, 41 insertions, 37 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 614198b..0826451 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk> + + * decl.c (init_decl_processing): Rename java_init_decl_processing. + * java-tree.h: New prototype. + * lang.c (java_init): Update prototype. Combine with old init_parse. + 2001-11-13 Tom Tromey <tromey@redhat.com> * gjavah.c (method_signature): New global. diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 86b5610..2577122 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -398,7 +398,7 @@ create_primitive_vtable (name) } void -init_decl_processing () +java_init_decl_processing () { register tree endlink; tree field = NULL_TREE; diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index d9417b4..e2e8cf3 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -1031,6 +1031,7 @@ extern tree ident_subst PARAMS ((const char*, int, const char*, int, int, const char*)); extern tree identifier_subst PARAMS ((const tree, const char *, int, int, const char *)); +extern void java_init_decl_processing PARAMS ((void)); 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 9ba1849..977ed17 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -48,7 +48,7 @@ struct string_option int on_value; }; -static void java_init PARAMS ((void)); +static const char *java_init PARAMS ((const char *)); static void java_init_options PARAMS ((void)); static int java_decode_option PARAMS ((int, char **)); static void put_decl_string PARAMS ((const char *, int)); @@ -186,7 +186,7 @@ lang_W_options[] = JCF *current_jcf; /* Variable controlling how dependency tracking is enabled in - init_parse. */ + java_init. */ static int dependency_tracking = 0; /* Flag values for DEPENDENCY_TRACKING. */ @@ -411,10 +411,15 @@ java_decode_option (argc, argv) /* Global open file. */ FILE *finput; -const char * -init_parse (filename) +static const char * +java_init (filename) const char *filename; { +#if 0 + extern int flag_minimal_debug; + flag_minimal_debug = 0; +#endif + /* Open input file. */ if (filename == 0 || !strcmp (filename, "-")) @@ -476,6 +481,30 @@ init_parse (filename) } } + jcf_path_init (); + jcf_path_seal (version_flag); + + decl_printable_name = lang_printable_name; + 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 (); + return filename; } @@ -677,38 +706,6 @@ lang_print_error (context, file) } -static void -java_init () -{ -#if 0 - extern int flag_minimal_debug; - flag_minimal_debug = 0; -#endif - - jcf_path_init (); - jcf_path_seal (version_flag); - - decl_printable_name = lang_printable_name; - 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 *)); - - using_eh_for_cleanups (); -} - /* This doesn't do anything on purpose. It's used to satisfy the print_error_function hook we don't print error messages with bogus function prototypes. */ |