[gcjx] Patch: FYI: field count in reflection info

Tom Tromey tromey@redhat.com
Thu Oct 13 01:18:00 GMT 2005


I'm checking this in on the gcjx branch.

This fixes the field count in the reflection data.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* classobj.cc (create_class_instance): Field count includes
	static fields.

Index: classobj.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Attic/classobj.cc,v
retrieving revision 1.1.2.28
diff -u -r1.1.2.28 classobj.cc
--- classobj.cc 13 Oct 2005 01:06:51 -0000 1.1.2.28
+++ classobj.cc 13 Oct 2005 01:15:12 -0000
@@ -550,7 +550,9 @@
 
   inst.set_field ("fields", field_array);
   inst.set_field ("size_in_bytes", abi->get_size_in_bytes (class_tree));
-  inst.set_field ("field_count", build_int_cst (type_jshort, num_fields));
+  inst.set_field ("field_count", build_int_cst (type_jshort,
+						(num_fields
+						 + num_static_fields)));
   inst.set_field ("static_field_count",
 		  build_int_cst (type_jshort, num_static_fields));
 



More information about the Java-patches mailing list