This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

[gcjx] Patch: FYI: handle interface super correctly


I'm checking this in on the gcjx branch.

Internally we represent interfaces as not having a superclass.  This
changes the class reader to properly handle this when parsing the
Signature attribute.  This only matters when reading a generic
interface from a class file.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* bytecode/classreader.cc (parse_signature): Don't set superclass
	for interface.

Index: bytecode/classreader.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/bytecode/Attic/classreader.cc,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 classreader.cc
--- bytecode/classreader.cc 19 Jan 2005 00:00:42 -0000 1.1.2.2
+++ bytecode/classreader.cc 19 Jan 2005 00:32:19 -0000
@@ -576,7 +576,10 @@
       ref_forwarding_type super;
       std::list<ref_forwarding_type> ifaces;
       parser.parse_class_signature (type_parameters, super, ifaces);
-      result->set_superclass (super);
+      // Internally we represent interfaces as not having a
+      // superclass.
+      if (! result->interface_p ())
+	result->set_superclass (super);
       result->set_type_parameters (type_parameters);
       result->set_implements (ifaces);
     }
@@ -896,7 +899,7 @@
     {
       result->set_interface ();
 
-      // We check that the superclass name is set correct, but
+      // We check that the superclass name is set correctly, but
       // internally we represent interfaces as not having a
       // superclass.
       if (super_class == 0


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