diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2015-06-05 18:44:53 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2015-06-05 18:44:53 +0000 |
commit | d7438551ff5ffa0afeca2aa3efd13035b26bee34 (patch) | |
tree | 906774b04a2315e6e0109ec866407a4b6ee1195f /gcc/java | |
parent | 46ba128114d3fd892b94c3767fb7a681088c7d79 (diff) | |
download | gcc-d7438551ff5ffa0afeca2aa3efd13035b26bee34.zip gcc-d7438551ff5ffa0afeca2aa3efd13035b26bee34.tar.gz gcc-d7438551ff5ffa0afeca2aa3efd13035b26bee34.tar.bz2 |
Merge debug-early branch into mainline.
* dwarf2out.c: Remove deferred_locations*.
(dwarf2_debug_hooks): Add early_finish hook.
Remove global_decl hook.
Add early_global_decl and late_global_decl hook.
New global early_dwarf.
New structure set_early_dwarf.
(output_die): Indicate whether a DIE was generated early
when generating assembly with -dA.
(struct limbo_die_struct): Document created_for field.
Remove file_table_last_lookup.
(remove_AT): Return TRUE if successful.
(remove_child_TAG): Clear die_parent.
(reparent_child): New function abstracted from...
(splice_child_die): ...here.
(new_die): ICE if a DIE ends up in limbo too late.
(check_die): New.
(defer_location): Remove.
(add_subscript_info): Reuse DW_TAG_subrange_type if available.
(fill_variable_array_bounds): New.
(decl_start_label): Call fill_variable_array_bounds.
(gen_formal_parameter_die): Rewrite to reuse previously generated
DIEs.
(gen_subprogram_die): Same.
(gen_variable_die): Same.
(gen_const_die): Same.
(gen_label_die): Same.
(gen_lexical_block_die): Same.
(decl_will_get_specification_p): New.
(local_function_static): New.
(gen_struct_or_union_type_die): Fill in variable-length fields.
(gen_typedef_die): Fill in variable-length typedefs.
(gen_tagged_type_die): Gracefully return on error_mark_node.
Handle re-entrancy.
(gen_type_die_with_usage): Handle variable-length types.
Remove duplicate code for ARRAY_TYPE case.
(process_scope_var): Only process imported modules during early
dwarf.
(dwarf2out_early_global_decl): New.
(dwarf2out_late_global_decl): Rename from dwarf2out_global_decl.
(dwarf2out_type_decl): Set early_dwarf while calling
dwarf2out_decl.
(dwarf2out_decl): Verify that we did not recreate a previously
generated DIE.
Do not return on DECL_EXTERNALs in VAR_DECLs.
Abstract some code to local_function_static.
(lookup_filename): Remove use of file_table_last_lookup.
Gracefully exit on missing file_name.
(dwarf2out_finish): Verify limbo list.
Remove deferred_locations_list use.
Move deferred_asm_name and limbo flushing to...
(dwarf2out_early_finish): ...here. New.
(dwarf2out_c_finalize): Remove set of deferred_location_list,
deferred_asm_name, and file_table_last_lookup.
* cgraph.h (referred_to_p): Add default argument.
* cgraphunit.c (referred_to_p): Add and handle include_self
argument.
(analyze_functions): Add first_time argument.
Call check_global_declaration for all symbols.
Call late_global_decl for nodes for moribund nodes.
(finalize_compilation_unit): Add new argument to
analyze_functions.
Call early_global_decl for functions.
Call early_finish debug hook.
* dbxout.c (dbxout_early_global_decl): New.
(dbxout_late_global_decl): New. Adapted from dbxout_global_decl.
(dbx_debug_hooks): Add new hooks.
(xcoff_debug_hooks): Same.
* debug.c (do_nothing_debug_hooks): Add early_finish field.
Add early and late debug hooks.
Remove global_decl hook.
* debug.h (struct gcc_debug_hooks): Add early_finish,
early_global_decl, and late_global_decl fields.
Remove global_decl field.
Document gcc_debug_hooks.
* gengtype.c (output_typename): Remove.
* godump.c (go_early_global_decl): New.
(go_late_global_decl): New.
(go_global_decl): Remove.
(dump_go_spec_init): Remove global_decl. Add
{early,late}_global_decl.
* langhooks-def.h (LANG_HOOKS_WRITE_GLOBALS): Remove.
(LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New.
* langhooks.c (lhd_warn_unused_global_decl): Adjust comment.
(write_global_declarations): Remove.
(global_decl_processing): New.
* langhooks.h (struct lang_hooks_for_decls): Remove
final_write_globals field.
Add post_compilation_parsing_cleanups field.
* passes.c (rest_of_decl_compilation): Call early_global_decl.
* sdbout.c: Add early and late_global_decl hooks. Remove
sdbout_global_decl hook.
Add early_finish field for sdb_debug_hooks.
(sdbout_global_decl): Remove.
(sdbout_early_global_decl): New.
(sdbout_late_global_decl): New.
* timevar.def (TV_PHASE_LATE_PARSING_CLEANUPS): New.
* toplev.c (check_global_declaration): Rename from
check_global_declaration_1.
Adapt to use symtab infrastructure.
(check_global_declarations): Remove.
(emit_debug_global_declarations): Remove.
(compile_file): Remove call to final_write_globals langhook.
Run the actual compilation process.
Perform any post compilation parser cleanups.
Generate late debug info.
* toplev.h (check_global_declaration): New.
(check_global_declaration_1): Remove.
(check_global_declarations): Remove.
(write_global_declarations): Remove.
(emit_debug_global_declarations): Remove.
(global_decl_processing): New.
* tree-core.h (struct tree_block): Add DIE field.
* tree.h (BLOCK_DIE): New.
* vmsdbgout.c (vmsdbgout_global_decl): Remove function and its use
throughout.
(vmsdbgout_early_global_decl): New.
(vmsdbgout_late_global_decl): New.
Add early_finish debug hook field to vmsdbg_debug_hooks.
Remove vmsdbgout_decl to vmsdbgout_function_decl.
Add early and late_global_decl debug hooks.
From-SVN: r224161
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/java/class.c | 19 | ||||
-rw-r--r-- | gcc/java/decl.c | 6 | ||||
-rw-r--r-- | gcc/java/java-tree.h | 4 | ||||
-rw-r--r-- | gcc/java/jcf-parse.c | 3 | ||||
-rw-r--r-- | gcc/java/lang.c | 2 |
6 files changed, 16 insertions, 30 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index fd9e2b1..ebd3f17 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,15 @@ +2015-06-05 Aldy Hernandez <aldyh@redhat.com> + + * class.c: Remove pending_static_fields. + (add_field): Remove use of pending_static_fields. + (java_write_globals): Remove. + * decl.c (java_mark_class_local): Remove use of + pending_static_fields. + * java-tree.h: Remove pending_static_fields and + java_write_globals. + * jcf-parse.c (java_parse_file): Call global_decl_processing. + * lang.c (LANG_HOOKS_WRITE_GLOBALS): Remove. + 2015-06-04 Andrew MacLeod <amacleod@redhat.com> * boehm.c: Adjust includes for restructured coretypes.h. diff --git a/gcc/java/class.c b/gcc/java/class.c index 54aea3c..1d66c72 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -120,10 +120,6 @@ static GTY(()) vec<tree, va_gc> *registered_class; currently being compiled. */ static GTY(()) tree this_classdollar; -/* A list of static class fields. This is to emit proper debug - info for them. */ -vec<tree, va_gc> *pending_static_fields; - /* Return the node that most closely represents the class whose name is IDENT. Start the search from NODE (followed by its siblings). Return NULL if an appropriate node does not exist. */ @@ -892,8 +888,6 @@ add_field (tree klass, tree name, tree field_type, int flags) /* Considered external unless we are compiling it into this object file. */ DECL_EXTERNAL (field) = (is_compiled_class (klass) != 2); - if (!DECL_EXTERNAL (field)) - vec_safe_push (pending_static_fields, field); } return field; @@ -3270,17 +3264,4 @@ in_same_package (tree name1, tree name2) return (pkg1 == pkg2); } -/* lang_hooks.decls.final_write_globals: perform final processing on - global variables. */ - -void -java_write_globals (void) -{ - tree *vec = vec_safe_address (pending_static_fields); - int len = vec_safe_length (pending_static_fields); - write_global_declarations (); - emit_debug_global_declarations (vec, len); - vec_free (pending_static_fields); -} - #include "gt-java-class.h" diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 8a2c66d..de75eb6 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -1967,11 +1967,7 @@ java_mark_class_local (tree klass) for (t = TYPE_FIELDS (klass); t ; t = DECL_CHAIN (t)) if (FIELD_STATIC (t)) - { - if (DECL_EXTERNAL (t)) - vec_safe_push (pending_static_fields, t); - java_mark_decl_local (t); - } + java_mark_decl_local (t); for (t = TYPE_METHODS (klass); t ; t = DECL_CHAIN (t)) if (!METHOD_ABSTRACT (t)) diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 22c9789..58a60b8 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -1194,10 +1194,6 @@ extern void rewrite_reflection_indexes (void *); int cxx_keyword_p (const char *name, int length); -extern GTY(()) vec<tree, va_gc> *pending_static_fields; - -extern void java_write_globals (void); - #define DECL_FINAL(DECL) DECL_LANG_FLAG_3 (DECL) /* Access flags etc for a method (a FUNCTION_DECL): */ diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 038f7f8..ba216a1 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -1996,6 +1996,9 @@ java_parse_file (void) /* Arrange for any necessary initialization to happen. */ java_emit_static_constructor (); gcc_assert (global_bindings_p ()); + + /* Do final processing on globals. */ + global_decl_processing (); } diff --git a/gcc/java/lang.c b/gcc/java/lang.c index 8caa28e..84b1680 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -146,8 +146,6 @@ struct GTY(()) language_function { #define LANG_HOOKS_DECL_PRINTABLE_NAME lang_printable_name #undef LANG_HOOKS_PRINT_ERROR_FUNCTION #define LANG_HOOKS_PRINT_ERROR_FUNCTION java_print_error_function -#undef LANG_HOOKS_WRITE_GLOBALS -#define LANG_HOOKS_WRITE_GLOBALS java_write_globals #undef LANG_HOOKS_TYPE_FOR_MODE #define LANG_HOOKS_TYPE_FOR_MODE java_type_for_mode |