decl.c (java_optimize_inline, [...]): Remove.

* decl.c (java_optimize_inline, dump_function): Remove.
* java-tree.h (java_optimize_inline): Remove declaration.
* jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
* parse.y (source_end_java_method, java_expand_classes):
Likewise.  Remove dead code.

From-SVN: r71882
This commit is contained in:
Jeff Sturm 2003-09-28 13:23:12 +00:00 committed by Jeff Sturm
parent 9442862280
commit 9220b1baed
5 changed files with 18 additions and 53 deletions

View file

@ -1,3 +1,11 @@
2003-09-28 Jeff Sturm <jsturm@one-point.com>
* decl.c (java_optimize_inline, dump_function): Remove.
* java-tree.h (java_optimize_inline): Remove declaration.
* jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
* parse.y (source_end_java_method, java_expand_classes):
Likewise. Remove dead code.
2003-09-27 Roger Sayle <roger@eyesopen.com>
* lang.c (java_init_options): Set flag_evaluation_order.

View file

@ -57,7 +57,6 @@ static struct binding_level *make_binding_level (void);
static tree create_primitive_vtable (const char *);
static tree check_local_named_variable (tree, tree, int, int *);
static tree check_local_unnamed_variable (tree, tree, tree);
static void dump_function (enum tree_dump_index, tree);
/* Name of the Cloneable class. */
tree java_lang_cloneable_identifier_node;
@ -1865,33 +1864,6 @@ java_expand_body (tree fndecl)
current_function_decl = NULL_TREE;
}
/* Dump FUNCTION_DECL FN as tree dump PHASE. */
static void
dump_function (enum tree_dump_index phase, tree fn)
{
FILE *stream;
int flags;
stream = dump_begin (phase, &flags);
if (stream)
{
dump_node (fn, TDF_SLIM | flags, stream);
dump_end (phase, stream);
}
}
void java_optimize_inline (tree fndecl)
{
if (flag_inline_trees)
{
timevar_push (TV_INTEGRATION);
optimize_inline_calls (fndecl);
timevar_pop (TV_INTEGRATION);
dump_function (TDI_inlined, fndecl);
}
}
/* We pessimistically marked all methods and fields external until we
knew what set of classes we were planning to compile. Now mark those
associated with CLASS to be generated locally as not external. */

View file

@ -1281,7 +1281,6 @@ extern void append_gpp_mangled_name (const char *, int);
extern void add_predefined_file (tree);
extern int predefined_filename_p (tree);
extern void java_optimize_inline (tree);
extern tree decl_constant_value (tree);
extern void java_mark_class_local (tree);

View file

@ -1120,13 +1120,12 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
java_expand_classes ();
if (!java_report_errors () && !flag_syntax_only)
{
if (flag_unit_at_a_time)
{
cgraph_finalize_compilation_unit ();
cgraph_optimize ();
java_finish_classes ();
}
/* Optimize and expand all classes compiled from source. */
cgraph_finalize_compilation_unit ();
cgraph_optimize ();
java_finish_classes ();
/* Emit the .jcf section. */
emit_register_classes ();
if (flag_indirect_dispatch)
emit_offset_symbol_table ();

View file

@ -7484,20 +7484,11 @@ source_end_java_method (void)
patched. Dump it to a file if the user requested it. */
dump_java_tree (TDI_original, fndecl);
/* In unit-at-a-time mode, don't expand the method yet. */
if (DECL_SAVED_TREE (fndecl) && flag_unit_at_a_time)
{
cgraph_finalize_function (fndecl, false);
current_function_decl = NULL_TREE;
java_parser_context_restore_global ();
return;
}
java_optimize_inline (fndecl);
/* Expand the function's body. */
java_expand_body (fndecl);
/* Defer expanding the method until cgraph analysis is complete. */
if (DECL_SAVED_TREE (fndecl))
cgraph_finalize_function (fndecl, false);
current_function_decl = NULL_TREE;
java_parser_context_restore_global ();
}
@ -9157,11 +9148,7 @@ java_expand_classes (void)
if (flag_emit_xref)
expand_xref (current_class);
else if (! flag_syntax_only)
{
java_expand_method_bodies (current_class);
if (!flag_unit_at_a_time)
finish_class ();
}
java_expand_method_bodies (current_class);
}
}
}