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: fix 'ncode' setting


I'm checking this in on the gcjx branch.

This fixes a bug in the previous patch.  'ncode' was set incorrectly
in the method table.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* classobj.cc (create_one_method_record): Fixed 'ncode' value.

Index: classobj.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Attic/classobj.cc,v
retrieving revision 1.1.2.25
diff -u -r1.1.2.25 classobj.cc
--- classobj.cc 11 Jul 2005 16:25:46 -0000 1.1.2.25
+++ classobj.cc 11 Jul 2005 16:26:40 -0000
@@ -210,7 +210,7 @@
   if (method->abstract_p ())
     mdecl = builtin_Jv_ThrowAbstractMethodError;
   else
-    mdecl = builtins->map_method (method);
+    mdecl = build_address_of (builtins->map_method (method));
   inst.set_field ("name", builtins->map_utf8const (method->get_name()));
   inst.set_field ("signature",
 		  builtins->map_utf8const (get_descriptor (method)));
@@ -218,7 +218,7 @@
 		  build_int_cst (type_jushort, method->get_modifiers ()));
   gcj_abi *abi = builtins->find_abi ();
   inst.set_field ("index", abi->get_vtable_index (klass, method));
-  inst.set_field ("ncode", build_address_of (mdecl));
+  inst.set_field ("ncode", mdecl);
   inst.set_field ("throws", create_method_throws (method));
   return inst.finish_record ();
 }


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