From 8ad073269589ffc1b6be4cc31ea053afe83ccc81 Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Thu, 24 Jun 1999 10:21:59 +0000 Subject: [PATCH] class.c (finish_class): Whenever a deferred method is output... 1999-06-24 Andrew Haley * java/class.c (finish_class): Whenever a deferred method is output, rescan the list of methods to see if a new candidate for output can be found. From-SVN: r27725 --- gcc/java/ChangeLog | 6 ++++++ gcc/java/class.c | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 0bea56743353..262dc4841091 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +1999-06-24 Andrew Haley + + * class.c (finish_class): Whenever a deferred method is + output, rescan the list of methods to see if a new candidate for + output can be found. + 1999-06-22 Andrew Haley * verify.c (verify_jvm_instructions): Check for pending blocks diff --git a/gcc/java/class.c b/gcc/java/class.c index 8217a9507687..9c06d44903ad 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1200,10 +1200,10 @@ finish_class (cl) tree cl; { tree method; + tree type_methods = TYPE_METHODS (CLASS_TO_HANDLE_TYPE (current_class)); - /* Emit deferred inline methods. */ - for ( method = TYPE_METHODS (CLASS_TO_HANDLE_TYPE (current_class)); - method != NULL_TREE; method = TREE_CHAIN (method)) + /* Emit deferred inline methods. */ + for (method = type_methods; method != NULL_TREE; ) { if (! TREE_ASM_WRITTEN (method) && DECL_SAVED_INSNS (method) != 0) { @@ -1215,8 +1215,13 @@ finish_class (cl) temporary_allocation (); output_inline_function (method); permanent_allocation (1); + /* Scan the list again to see if there are any earlier + methods to emit. */ + method = type_methods; + continue; } } + method = TREE_CHAIN (method); } make_class_data (current_class); -- 2.47.2