[gcjx] Patch: FYI: fix class instance resolution

Tom Tromey tromey@redhat.com
Tue Oct 25 22:05:00 GMT 2005


I'm checking this in on the gcjx branch.

We were creating member classes of a class instance in the resolve
hook, instead of in the member resolve hook -- i.e., too early.
This lead to spurious circularity errors.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* model/classinst.hh (model_class_instance::resolve_hook):
	Removed.
	* model/classinst.cc (resolve_member_hook): Create member classes
	here.
	(resolve_hook): Removed.

Index: model/classinst.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/classinst.cc,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 classinst.cc
--- model/classinst.cc 24 Oct 2005 22:16:18 -0000 1.1.2.4
+++ model/classinst.cc 25 Oct 2005 22:04:19 -0000
@@ -22,7 +22,7 @@
 #include "typedefs.hh"
 
 void
-model_class_instance::resolve_hook (resolution_scope *scope)
+model_class_instance::resolve_member_hook (resolution_scope *scope)
 {
   parent->resolve_members ();
 
@@ -38,11 +38,7 @@
 	mem = mem->apply_type_map (this, type_map);
       member_classes[(*i).first] = mem;
     }
-}
 
-void
-model_class_instance::resolve_member_hook (resolution_scope *scope)
-{
   // Create fields.
   for (std::list<ref_field>::const_iterator i = parent->fields.begin ();
        i != parent->fields.end ();
Index: model/classinst.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/classinst.hh,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 classinst.hh
--- model/classinst.hh 24 Oct 2005 22:16:18 -0000 1.1.2.4
+++ model/classinst.hh 25 Oct 2005 22:04:19 -0000
@@ -34,7 +34,6 @@
 
 protected:
 
-  void resolve_hook (resolution_scope *);
   void resolve_member_hook (resolution_scope *);
   std::string get_signature_map_fragment ();
 



More information about the Java-patches mailing list