This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: array types and vtable
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 27 Apr 2005 11:30:27 -0600
- Subject: [gcjx] Patch: FYI: array types and vtable
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
We don't want to lay out the vtable for array types.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* builtins.cc (lay_out_class): Don't lay out vtable for array
types.
Index: builtins.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Attic/builtins.cc,v
retrieving revision 1.1.2.34
diff -u -r1.1.2.34 builtins.cc
--- builtins.cc 20 Apr 2005 16:05:07 -0000 1.1.2.34
+++ builtins.cc 27 Apr 2005 17:31:44 -0000
@@ -758,7 +758,11 @@
}
}
- lay_out_vtable (klass);
+ // Laying out an array's vtable here is incorrect, since we don't
+ // plan to write out the vtable. FIXME: really we should only lay
+ // out a vtable when we write the C++ ABI class itself...?
+ if (! klass->array_p ())
+ lay_out_vtable (klass);
layout_type (klass_record);
return klass_tree;