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: array types and vtable


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;


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