This is the mail archive of the 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]

Re: New C++ ABI: patches.

Mark Mitchell writes:

> First, the ChangeLog is wrong (it's class.c) and second there are
> C++-style comments in the patch. :-)

Hehe, that's funny. 

> Constructors always wrote the vtable at the beginning of the
> constructor; that's what they're supposed to do.

This is the first time we use a C++ constructor to initialize a Java
object, I think.


2001-01-12  Alexandre Petit-Bianco  <>

	* cp/class.c: (dfs_accumulate_vtbl_inits): No accumulation for
	Java type. 

Index: class.c
RCS file: /cvs/gcc/egcs/gcc/cp/class.c,v
retrieving revision 1.355
diff -u -p -r1.355 class.c
--- class.c	2001/01/10 23:06:26	1.355
+++ class.c	2001/01/13 17:33:57
@@ -7156,7 +7156,10 @@ dfs_accumulate_vtbl_inits (binfo, orig_b
   tree inits = NULL_TREE;
-  if (BINFO_NEW_VTABLE_MARKED (orig_binfo, t))
+  if (BINFO_NEW_VTABLE_MARKED (orig_binfo, t)
+      /* Don't accumulate for Java types. Java object ctors written in
+	 C++ shouldn't fix the vtbl. */
+      && !TYPE_FOR_JAVA (BINFO_TYPE (binfo)))
       tree vtbl;
       tree index;

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