aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog7
-rw-r--r--gcc/java/class.c6
-rw-r--r--gcc/java/resource.c12
3 files changed, 13 insertions, 12 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 6c8af8a..b142752 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,10 @@
+2004-06-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * class.c (emit_register_classes): Make the function uninlinable,
+ do not set current_function_cannot_inline.
+ * resource.c (write_resource_constructor): Do not reset
+ flag_inline_functions around rest_of_compilation.
+
2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
PR java/15769
diff --git a/gcc/java/class.c b/gcc/java/class.c
index 137b647..57107dd 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -2293,6 +2293,8 @@ emit_register_classes (void)
DECL_SOURCE_LINE (init_decl) = 0;
TREE_STATIC (init_decl) = 1;
current_function_decl = init_decl;
+ DECL_INLINE (init_decl) = 0;
+ DECL_UNINLINABLE (init_decl) = 1;
DECL_RESULT (init_decl) = build_decl (RESULT_DECL, NULL_TREE,
void_type_node);
@@ -2308,10 +2310,6 @@ emit_register_classes (void)
init_function_start (init_decl);
expand_function_start (init_decl, 0);
- /* Do not allow the function to be deferred. */
- current_function_cannot_inline
- = "static constructors and destructors cannot be inlined";
-
for ( t = registered_class; t; t = TREE_CHAIN (t))
emit_library_call (registerClass_libfunc, 0, VOIDmode, 1,
XEXP (DECL_RTL (t), 0), Pmode);
diff --git a/gcc/java/resource.c b/gcc/java/resource.c
index dc42a6f..5ebbf5e 100644
--- a/gcc/java/resource.c
+++ b/gcc/java/resource.c
@@ -151,14 +151,10 @@ write_resource_constructor (void)
input_location = DECL_SOURCE_LOCATION (init_decl);
expand_function_end ();
poplevel (1, 0, 1);
- {
- /* Force generation, even with -O3 or deeper. Gross hack.
- FIXME. */
- int saved_flag = flag_inline_functions;
- flag_inline_functions = 0;
- rest_of_compilation (init_decl);
- flag_inline_functions = saved_flag;
- }
+
+ /* rest_of_compilation forces generation even if -finline-functions. */
+ rest_of_compilation (init_decl);
+
current_function_decl = NULL_TREE;
if (targetm.have_ctors_dtors)
targetm.asm_out.constructor (XEXP (DECL_RTL (init_decl), 0),