This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[BC] Patch: FYI: no Miranda methods in BC mode
- From: Tom Tromey <tromey at redhat dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 05 Nov 2004 15:44:05 -0700
- Subject: [BC] Patch: FYI: no Miranda methods in BC mode
- Reply-to: tromey at redhat dot com
I'm checking this in on the BC branch.
With indirect dispatch, there is no need to add Miranda methods to the
`methods' table of a class. In fact, trying to do so can mess things
up, as we may end up with bogus entries. This occurred while
compiling Eclipse 3.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* class.c (layout_class_methods): Don't add Miranda methods when
using indirect dispatch.
Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.180.2.17
diff -u -r1.180.2.17 class.c
--- class.c 5 Nov 2004 19:30:05 -0000 1.180.2.17
+++ class.c 5 Nov 2004 20:19:24 -0000
@@ -2260,7 +2261,8 @@
dtable_count = integer_zero_node;
type_name = TYPE_NAME (this_class);
- if (CLASS_ABSTRACT (type_name) || CLASS_INTERFACE (type_name))
+ if (!flag_indirect_dispatch
+ && (CLASS_ABSTRACT (type_name) || CLASS_INTERFACE (type_name)))
{
/* An abstract class can have methods which are declared only in
an implemented interface. These are called "Miranda