From ac8f5d48cba9387f8ccb22bb91786805a213bf5a Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Thu, 1 Jul 1999 06:03:28 +0000 Subject: [PATCH] class.c (finish_class): Whenever a deferred method is output... 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. From-SVN: r27872 --- gcc/java/ChangeLog | 6 ++++++ gcc/java/class.c | 13 +++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 0c14d37ff6e..7241c550861 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-28 Tom Tromey * jvspec.c (lang_specific_driver): Recognize --help. diff --git a/gcc/java/class.c b/gcc/java/class.c index 8217a950768..9a73364c8c9 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1200,10 +1200,10 @@ finish_class (cl) tree cl; { tree method; - - /* Emit deferred inline methods. */ - for ( method = TYPE_METHODS (CLASS_TO_HANDLE_TYPE (current_class)); - method != NULL_TREE; method = TREE_CHAIN (method)) + tree type_methods = TYPE_METHODS (CLASS_TO_HANDLE_TYPE (current_class)); + + /* 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.30.2