diff options
author | Per Bothner <per@bothner.com> | 2001-04-26 11:32:22 -0700 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 2001-04-26 11:32:22 -0700 |
commit | 8789b9fa5c893b2eefb47acb5ec84eb46128b057 (patch) | |
tree | e624daa90013162473950afc7f26bad2458e20b3 /gcc/java/constants.c | |
parent | 5acea42bfb17b59aff01ce77fe63d880b4ef5878 (diff) | |
download | gcc-8789b9fa5c893b2eefb47acb5ec84eb46128b057.tar.gz |
jcf-write.c (generate_bytecode_insns case SWITCH_EXPR): Fix thinko: If a single case, use if_icmpeq, not ifeq.
* jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
Fix thinko: If a single case, use if_icmpeq, not ifeq.
* constants.c (find_methodref_with_class_index): New function.
(find_methodref_index): Use find_methodref_with_class_index.
* java-tree.h (find_methodref_with_class_index): New declaration.
* jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
DECL_CONTEXT, instead use new find_methodref_with_class_index function.
If context changed from interface to class, don't use invokeinterface.
From-SVN: r41601
Diffstat (limited to 'gcc/java/constants.c')
-rw-r--r-- | gcc/java/constants.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/java/constants.c b/gcc/java/constants.c index 59b8c4f16c4..c51cec9a7a4 100644 --- a/gcc/java/constants.c +++ b/gcc/java/constants.c @@ -197,7 +197,15 @@ find_methodref_index (cpool, decl) CPool *cpool; tree decl; { - tree mclass = DECL_CONTEXT (decl); + return find_methodref_with_class_index (cpool, decl, DECL_CONTEXT (decl)); +} + +int +find_methodref_with_class_index (cpool, decl, mclass) + CPool *cpool; + tree decl; + tree mclass; +{ int class_index = find_class_constant (cpool, mclass); tree name = DECL_CONSTRUCTOR_P (decl) ? init_identifier_node : DECL_NAME (decl); |