* 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
+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.
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;
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. */
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);
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 ();
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 ();
}
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);
}
}
}