aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/constants.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2001-04-26 11:32:22 -0700
committerPer Bothner <bothner@gcc.gnu.org>2001-04-26 11:32:22 -0700
commit8789b9fa5c893b2eefb47acb5ec84eb46128b057 (patch)
treee624daa90013162473950afc7f26bad2458e20b3 /gcc/java/constants.c
parent5acea42bfb17b59aff01ce77fe63d880b4ef5878 (diff)
downloadgcc-8789b9fa5c893b2eefb47acb5ec84eb46128b057.zip
gcc-8789b9fa5c893b2eefb47acb5ec84eb46128b057.tar.gz
gcc-8789b9fa5c893b2eefb47acb5ec84eb46128b057.tar.bz2
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.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/java/constants.c b/gcc/java/constants.c
index 59b8c4f..c51cec9 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);