This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ecj] vtable entries for bridge methods

We weren't distinguishing return types when building vtables, but the
VM does so distinguish: for example, is a different method
from, and we need vtable slots for both of them.
Because we weren't using the return type when searching vtables, we
were only building a vtable entry for the first one we saw.

Arguably this is also a bug in mainline, but it really only affects
generic code and bytecode written in languages other than Java.


2006-09-08  Andrew Haley  <>

	* class.c (layout_class_method): Use build_java_signature, not
	build_java_argument_signature.  Use lookup_java_method, not

Index: class.c
--- class.c     (revision 116634)
+++ class.c     (working copy)
@@ -2476,15 +2476,15 @@
            p = ptr;
       DECL_CONSTRUCTOR_P (method_decl) = 1;
-      build_java_argument_signature (TREE_TYPE (method_decl));
+      build_java_signature (TREE_TYPE (method_decl));
   else if (! METHOD_STATIC (method_decl))
       tree method_sig =
-       build_java_argument_signature (TREE_TYPE (method_decl));
+       build_java_signature (TREE_TYPE (method_decl));
       bool method_override = false;
-      tree super_method = lookup_argument_method (super_class, method_name,
-                                                 method_sig);
+      tree super_method = lookup_java_method (super_class, method_name,
+                                             method_sig);
       if (super_method != NULL_TREE
          && ! METHOD_DUMMY (super_method))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]