diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-11-05 18:27:28 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-11-05 18:27:28 +0000 |
commit | 3560c6fc6f4b2841d46b77618746df8f1ce1430b (patch) | |
tree | 3b52e6e9e1b58af468ce584c71e1c1a47ce2832b /gcc/java/class.c | |
parent | f14141ce36a9e11dc810da3dfe625543ae118093 (diff) | |
download | ppe42-gcc-3560c6fc6f4b2841d46b77618746df8f1ce1430b.tar.gz ppe42-gcc-3560c6fc6f4b2841d46b77618746df8f1ce1430b.zip |
* class.c (finish_class): Emit inlined methods if any native
methods exist in the class. Fixes PR gcj/85.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30420 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r-- | gcc/java/class.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c index 03335285f41..57930fde0bf 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1205,7 +1205,21 @@ finish_class () { tree method; tree type_methods = TYPE_METHODS (CLASS_TO_HANDLE_TYPE (current_class)); - + int saw_native_method = 0; + + /* Find out if we have any native methods. We use this information + later. */ + for (method = type_methods; + method != NULL_TREE; + method = TREE_CHAIN (method)) + { + if (METHOD_NATIVE (method)) + { + saw_native_method = 1; + break; + } + } + /* Emit deferred inline methods. */ for (method = type_methods; method != NULL_TREE; ) { @@ -1214,7 +1228,8 @@ finish_class () /* It's a deferred inline method. Decide if we need to emit it. */ if (flag_keep_inline_functions || TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (method)) - || ! METHOD_PRIVATE (method)) + || ! METHOD_PRIVATE (method) + || saw_native_method) { temporary_allocation (); output_inline_function (method); |