Patch for _Jv_CheckOrCreateLoadingConstraint

Andrew Haley <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
Maven2 doesn't build at the moment because our code to check the loading
constraints (Section 5.3.4, JVM Spec Second Edition) is wrong.

Tom, is this the correct fix?

Andrew.


2009-03-11  Tom Tromey  <[email protected]>

	* link.cc (_Jv_Linker::find_field): Pass the field_type to
	_Jv_CheckOrCreateLoadingConstraint, not the class that is
	requesting the field.

--- link.cc~	2009-01-14 11:10:39.000000000 +0000
+++ link.cc	2009-03-11 17:33:31.000000000 +0000
@@ -248,7 +248,7 @@ _Jv_Linker::find_field (jclass klass, jc
       // Note that the field returned by find_field_helper is always
       // resolved.  However, we still use the constraint mechanism
       // because this may affect other lookups.
-      _Jv_CheckOrCreateLoadingConstraint (klass, (*found_class)->loader);
+      _Jv_CheckOrCreateLoadingConstraint (field_type, (*found_class)->loader);
     }
   else
     {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.