This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: fix interface list
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 08 Mar 2005 18:49:20 -0700
- Subject: [gcjx] Patch: FYI: fix interface list
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
This fixes constructor used to list the interfaces in a Class object.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* classobj.cc (handle_interfaces): Correctly set up constructor.
Index: classobj.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Attic/classobj.cc,v
retrieving revision 1.1.2.17
diff -u -r1.1.2.17 classobj.cc
--- classobj.cc 8 Mar 2005 01:22:00 -0000 1.1.2.17
+++ classobj.cc 9 Mar 2005 01:50:56 -0000
@@ -329,11 +329,12 @@
i != ifaces.end ();
++i)
{
- ++len;
gcj_abi *abi = builtins->find_abi ();
tree one_iface = abi->build_class_reference (builtins, klass,
(*i)->type ());
- result = tree_cons (NULL_TREE, one_iface, result);
+ result = tree_cons (build_int_cst (type_jint, len), one_iface,
+ result);
+ ++len;
}
result = nreverse (result);
@@ -343,7 +344,9 @@
tree type_interface_array = build_array_type (type_class_ptr,
type_index);
- interfaces = make_decl (type_interface_array, result);
+ interfaces = make_decl (type_interface_array,
+ build_constructor (type_interface_array,
+ result));
}
iface_len = build_int_cst (type_jshort, len);