This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: class reference in vtable
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 17 Apr 2005 15:35:25 -0600
- Subject: [gcjx] Patch: FYI: class reference in vtable
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
This puts a reference to the class into the generated vtable.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* builtins.cc (lay_out_vtable): Compute class reference.
Index: builtins.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Attic/builtins.cc,v
retrieving revision 1.1.2.32
diff -u -r1.1.2.32 builtins.cc
--- builtins.cc 17 Apr 2005 21:29:28 -0000 1.1.2.32
+++ builtins.cc 17 Apr 2005 21:36:29 -0000
@@ -667,7 +667,10 @@
++index;
}
- TREE_VEC_ELT (vtable_tree, 0) = null_pointer_node; // FIXME: pointer to class
+ gcj_abi *abi = find_abi ();
+ TREE_VEC_ELT (vtable_tree, 0) = abi->build_direct_class_reference (this,
+ klass,
+ mklass);
TREE_VEC_ELT (vtable_tree, 1) = null_pointer_node; // FIXME: GC descriptor
tree klass_ptr_type = map_type (klass->get ());